mirror of
https://github.com/nmap/nmap.git
synced 2025-12-27 09:59:04 +00:00
Update libpcap to 1.7.3, partially addressing #34
This commit is contained in:
@@ -29,8 +29,6 @@
|
||||
* 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.
|
||||
*
|
||||
* @(#) $Header: /tcpdump/master/libpcap/pcap-int.h,v 1.94 2008-09-16 00:20:23 guy Exp $ (LBL)
|
||||
*/
|
||||
|
||||
#ifndef pcap_int_h
|
||||
@@ -84,6 +82,29 @@ extern CRITICAL_SECTION g_PcapCompileCriticalSection;
|
||||
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
/*
|
||||
* Maximum snapshot length.
|
||||
*
|
||||
* Somewhat arbitrary, but chosen to be:
|
||||
*
|
||||
* 1) big enough for maximum-size Linux loopback packets (65549)
|
||||
* and some USB packets captured with USBPcap:
|
||||
*
|
||||
* http://desowin.org/usbpcap/
|
||||
*
|
||||
* (> 131072, < 262144)
|
||||
*
|
||||
* and
|
||||
*
|
||||
* 2) small enough not to cause attempts to allocate huge amounts of
|
||||
* memory; some applications might use the snapshot length in a
|
||||
* savefile header to control the size of the buffer they allocate,
|
||||
* so a size of, say, 2^31-1 might not work well.
|
||||
*
|
||||
* We don't enforce this in pcap_set_snaplen(), but we use it internally.
|
||||
*/
|
||||
#define MAXIMUM_SNAPLEN 262144
|
||||
|
||||
struct pcap_opt {
|
||||
char *source;
|
||||
int timeout; /* timeout for buffering */
|
||||
@@ -181,6 +202,11 @@ struct pcap {
|
||||
/* We're accepting only packets in this direction/these directions. */
|
||||
pcap_direction_t direction;
|
||||
|
||||
/*
|
||||
* Flags to affect BPF code generation.
|
||||
*/
|
||||
int bpf_codegen_flags;
|
||||
|
||||
/*
|
||||
* Placeholder for filter code if bpf not in kernel.
|
||||
*/
|
||||
@@ -227,6 +253,11 @@ struct pcap {
|
||||
cleanup_op_t cleanup_op;
|
||||
};
|
||||
|
||||
/*
|
||||
* BPF code generation flags.
|
||||
*/
|
||||
#define BPF_SPECIAL_VLAN_HANDLING 0x00000001 /* special VLAN handling for Linux */
|
||||
|
||||
/*
|
||||
* This is a timeval as stored in a savefile.
|
||||
* It has to use the same types everywhere, independent of the actual
|
||||
@@ -387,6 +418,9 @@ int pcap_platform_finddevs(pcap_if_t **, char *);
|
||||
int add_addr_to_iflist(pcap_if_t **, const char *, u_int, struct sockaddr *,
|
||||
size_t, struct sockaddr *, size_t, struct sockaddr *, size_t,
|
||||
struct sockaddr *, size_t, char *);
|
||||
int add_addr_to_dev(pcap_if_t *, struct sockaddr *, size_t,
|
||||
struct sockaddr *, size_t, struct sockaddr *, size_t,
|
||||
struct sockaddr *dstaddr, size_t, char *errbuf);
|
||||
int pcap_add_if(pcap_if_t **, const char *, u_int, const char *, char *);
|
||||
struct sockaddr *dup_sockaddr(struct sockaddr *, size_t);
|
||||
int add_or_find_if(pcap_if_t **, pcap_if_t **, const char *, u_int,
|
||||
|
||||
Reference in New Issue
Block a user