NetBSD/external/bsd/libpcap/dist/pcap-rpcap-int.h

76 lines
3.4 KiB
C
Raw Normal View History

Import libpcap-1.9.0 Sunday, June 24, 2018, by mcr@sandelman.ca Summary for 1.9.0 libpcap release Added testing system to libpcap, independent of tcpdump Changes to how pcap_t is activated Adding support for Large stream buffers on Endace DAG cards Changes to BSD 3-clause license to 2-clause licence Additions to TCP header parsing, per RFC3168 Add CMake build process (extensive number of changes) Assign a value for OpenBSD DLT_OPENFLOW. Support setting non-blocking mode before activating. Extensive build support for Windows VS2010 and MINGW (many many changes, over many months) Added RPCAPD support when --enable-remote (default no) Add the rpcap daemon source and build instructions. Put back the greasy "save the capture filter string so we can tweak it" hack, that keeps libpcap from capturing rpcap traffic. Fixes for captures on MacOS, utun0 fixes so that non-AF_INET addresses, are not ==AF_INET6 addresses. Add a linktype for IBM SDLC frames containing SNA PDUs. pcap_compile() in 1.8.0 and later is newly thread-safe. bound snaplen for linux tpacket_v2 to ~64k Make VLAN filter handle both metadata and inline tags D-Bus captures can now be up to 128MB in size Added LORATAP DLT value Added DLT_VSOCK for http://qemu-project.org/Features/VirtioVsock probe_devices() fixes not to overrun buffer for name of device Add linux-specific pcap_set_protocol_linux() to allow specifying a specific capture protocol. RDMA sniffing support for pcap Add Nordic Semiconductor Bluetooth LE sniffer link-layer header type. fixes for reading /etc/ethers Make it possible to build on Windows without packet.dll. Add tests for large file support on UN*X. Solaris fixes to work with 2.8.6 configuration test now looks for header files, not capture devices present Fix to work with Berkeley YACC. fixes for DragonBSD compilation of pcap-netmap.c Clean up the ether_hostton() stuff. Add an option to disable Linux memory-mapped capture support. Add DAG API support checks. Add Septel, Myricom SNF, and Riverbed TurboCap checks. Add checks for Linux USB, Linux Bluetooth, D-Bus, and RDMA sniffing support. Add a check for hardware time stamping on Linux. Don't bother supporting pre-2005 Visual Studio. Increased minimum autoconf version requirement to 2.64 Add DLT value 273 for XRA-31 sniffer Clean up handing of signal interrupts in pcap_read_nocb_remote(). Use the XPG 4.2 versions of the networking APIs in Solaris. Fix, and better explain, the "IPv6 means IPv6, not IPv4" option setting. Explicitly warn that negative packet buffer timeouts should not be used. rpcapd: Add support inetd-likes, including xinetd.conf, and systemd units Rename DLT_IEEE802_15_4 to DLT_IEEE802_15_4_WITHFCS. Add DISPLAYPORT AUX link type Remove the sunos4 kernel modules and all references to them. Add more interface flags to pcap_findalldevs(). Summary for 1.9.0 libpcap release (to 2017-01-25 by guy@alum.mit.edu) Man page improvements Fix Linux cooked mode userspace filtering (GitHub pull request #429) Fix compilation if IPv6 support not enabled Fix some Linux memory-mapped capture buffer size issues Don't fail if kernel filter can't be set on Linux (GitHub issue #549) Improve sorting of interfaces for pcap_findalldevs() Don't list Linux usbmon devices if usbmon module isn't loaded Report PCAP_ERROR_PERM_DENIED if no permission to open Linux usbmon devices Fix DLT_ type for Solaris IPNET devices Always return an error message for errors finding DAG or Myricom devices If possible, don't require that a device be openable when enumerating them for pcap_findalldevs() Don't put incompletely-initialized addresses in the address list for When finding Myricom devices, update description for regular interfaces that are Myricom devices and handle SNF_FLAGS=0x2(port aggregation enabled) Fix compilation error in DAG support Fix issues with CMake configuration Add support for stream buffers larger than 2GB on newer DAG cards Remove support for building against DAG versions without STREAMS support (before dag-3.0.0 2007)
2018-09-03 17:43:43 +03:00
/*
* Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
* Copyright (c) 2005 - 2008 CACE Technologies, Davis (California)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Politecnico di Torino, CACE Technologies
* nor the names of its contributors may be used to endorse or promote
* products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef __PCAP_RPCAP_INT_H__
#define __PCAP_RPCAP_INT_H__
#include "pcap.h"
#include "sockutils.h" /* Needed for some structures (like SOCKET, sockaddr_in) which are used here */
/*
* \file pcap-rpcap-int.h
*
* This file keeps all the definitions used by the RPCAP client and server,
* other than the protocol definitions.
*
* \warning All the RPCAP functions that are allowed to return a buffer containing
* the error description can return max PCAP_ERRBUF_SIZE characters.
* However there is no guarantees that the string will be zero-terminated.
* Best practice is to define the errbuf variable as a char of size 'PCAP_ERRBUF_SIZE+1'
* and to insert manually the termination char at the end of the buffer. This will
* guarantee that no buffer overflows occur even if we use the printf() to show
* the error on the screen.
*/
/*********************************************************
* *
* General definitions / typedefs for the RPCAP protocol *
* *
*********************************************************/
/*
* \brief Buffer used by socket functions to send-receive packets.
* In case you plan to have messages larger than this value, you have to increase it.
*/
#define RPCAP_NETBUF_SIZE 64000
/*********************************************************
* *
* Exported function prototypes *
* *
*********************************************************/
void rpcap_createhdr(struct rpcap_header *header, uint8 type, uint16 value, uint32 length);
int rpcap_senderror(SOCKET sock, char *error, unsigned short errcode, char *errbuf);
#endif