"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gencode.c" between
libpcap-1.10.0.tar.gz and libpcap-1.10.1.tar.gz

About: libpcap is a packet filter library used by tools like tcpdump.

gencode.c  (libpcap-1.10.0):gencode.c  (libpcap-1.10.1)
skipping to change at line 51 skipping to change at line 51
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <memory.h> #include <memory.h>
#include <setjmp.h> #include <setjmp.h>
#include <stdarg.h> #include <stdarg.h>
#ifdef MSDOS #ifdef MSDOS
#include "pcap-dos.h" #include "pcap-dos.h"
#endif #endif
#ifdef HAVE_NET_PFVAR_H
/*
* In NetBSD <net/if.h> includes <net/dlt.h>, which is an older version of
* "pcap/dlt.h" with a lower value of DLT_MATCHING_MAX. Include the headers
* below before "pcap-int.h", which eventually includes "pcap/dlt.h", which
* redefines DLT_MATCHING_MAX from what this version of NetBSD has to what
* this version of libpcap has.
*/
#include <sys/socket.h>
#include <net/if.h>
#include <net/pfvar.h>
#include <net/if_pflog.h>
#endif /* HAVE_NET_PFVAR_H */
#include "pcap-int.h" #include "pcap-int.h"
#include "extract.h" #include "extract.h"
#include "ethertype.h" #include "ethertype.h"
#include "nlpid.h" #include "nlpid.h"
#include "llc.h" #include "llc.h"
#include "gencode.h" #include "gencode.h"
#include "ieee80211.h" #include "ieee80211.h"
#include "atmuni31.h" #include "atmuni31.h"
skipping to change at line 76 skipping to change at line 90
#include "grammar.h" #include "grammar.h"
#include "scanner.h" #include "scanner.h"
#if defined(linux) #if defined(linux)
#include <linux/types.h> #include <linux/types.h>
#include <linux/if_packet.h> #include <linux/if_packet.h>
#include <linux/filter.h> #include <linux/filter.h>
#endif #endif
#ifdef HAVE_NET_PFVAR_H
#include <sys/socket.h>
#include <net/if.h>
#include <net/pfvar.h>
#include <net/if_pflog.h>
#endif
#ifndef offsetof #ifndef offsetof
#define offsetof(s, e) ((size_t)&((s *)0)->e) #define offsetof(s, e) ((size_t)&((s *)0)->e)
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#ifdef INET6 #ifdef INET6
#if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF) #if defined(__MINGW32__) && defined(DEFINE_ADDITIONAL_IPV6_STUFF)
/* IPv6 address */ /* IPv6 address */
struct in6_addr struct in6_addr
{ {
skipping to change at line 6082 skipping to change at line 6089
* work, to simplify that and, on platforms that have a BPF * work, to simplify that and, on platforms that have a BPF
* interpreter with the new instructions, let the filtering * interpreter with the new instructions, let the filtering
* be done in the kernel. (We already require a modified BPF * be done in the kernel. (We already require a modified BPF
* engine to do the protochain stuff, to support backward * engine to do the protochain stuff, to support backward
* branches, and backward branch support is unlikely to appear * branches, and backward branch support is unlikely to appear
* in kernel BPF engines.) * in kernel BPF engines.)
*/ */
if (cstate->off_linkpl.is_variable) if (cstate->off_linkpl.is_variable)
bpf_error(cstate, "'protochain' not supported with variable lengt h headers"); bpf_error(cstate, "'protochain' not supported with variable lengt h headers");
cstate->no_optimize = 1; /* this code is not compatible with optimizer ye /*
t */ * To quote a comment in optimize.c:
*
* "These data structures are used in a Cocke and Shwarz style
* value numbering scheme. Since the flowgraph is acyclic,
* exit values can be propagated from a node's predecessors
* provided it is uniquely defined."
*
* "Acyclic" means "no backward branches", which means "no
* loops", so we have to turn the optimizer off.
*/
cstate->no_optimize = 1;
/* /*
* s[0] is a dummy entry to protect other BPF insn from damage * s[0] is a dummy entry to protect other BPF insn from damage
* by s[fix] = foo with uninitialized variable "fix". It is somewhat * by s[fix] = foo with uninitialized variable "fix". It is somewhat
* hard to find interdependency made by jump table fixup. * hard to find interdependency made by jump table fixup.
*/ */
i = 0; i = 0;
s[i] = new_stmt(cstate, 0); /*dummy*/ s[i] = new_stmt(cstate, 0); /*dummy*/
i++; i++;
 End of changes. 3 change blocks. 
9 lines changed or deleted 26 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)