]> The Tcpdump Group git mirrors - libpcap/blobdiff - gencode.h
CI: Call print_so_deps() on rpcapd in remote enabled build
[libpcap] / gencode.h
index dc099f53d8d0a54ea8b35e296c531e25725f63e9..3d17147bf3e9ec2a396f9c9c48ed1a07ebd62bfa 100644 (file)
--- a/gencode.h
+++ b/gencode.h
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifndef gencode_h
+#define gencode_h
+
 #include "pcap/funcattrs.h"
+/*
+ * pcap/bpf.h (a public header) needs u_char, u_short and u_int, which can be
+ * made available via either pcap-types.h (a private header) or pcap/pcap.h
+ * (a public header), none of which pcap/bpf.h includes.  Include the private
+ * header to keep things simple, this way this private header should compile
+ * even if included early from another file.
+ */
+#include "pcap-types.h"
+#include "pcap/bpf.h" /* bpf_u_int32 and BPF_MEMWORDS */
 
 /*
  * ATM support:
 #define A_OAM          28      /* OAM cells : F4 only */
 #define A_OAMF4                29      /* OAM F4 cells: Segment + End-to-end */
 #define A_LANE         30      /* LANE traffic */
-#define A_LLC          31      /* LLC-encapsulated traffic */
-
-/* Based on Q.2931 signalling protocol */
-#define A_SETUP                41      /* Setup message */
-#define A_CALLPROCEED  42      /* Call proceeding message */
-#define A_CONNECT      43      /* Connect message */
-#define A_CONNECTACK   44      /* Connect Ack message */
-#define A_RELEASE      45      /* Release message */
-#define A_RELEASE_DONE 46      /* Release message */
 
 /* ATM field types */
 #define A_VPI          51
 #define A_VCI          52
-#define A_PROTOTYPE    53
-#define A_MSGTYPE      54
-#define A_CALLREFTYPE  55
 
 #define A_CONNECTMSG   70      /* returns Q.2931 signalling messages for
                                   establishing and destroying switched
@@ -240,7 +240,7 @@ typedef bpf_u_int32 *uset;
  * It's a directed graph, so an edge has a predecessor and a successor.
  */
 struct edge {
-       int id;
+       u_int id;
        int code;               /* opcode for branch corresponding to this edge */
        uset edom;
        struct block *succ;     /* successor vertex */
@@ -254,7 +254,7 @@ struct edge {
  * branch to successor blocks.
  */
 struct block {
-       int id;
+       u_int id;
        struct slist *stmts;    /* side effect stmts */
        struct stmt s;          /* branch stmt */
        int mark;
@@ -314,10 +314,8 @@ struct block *gen_ecode(compiler_state_t *, const char *, struct qual);
 struct block *gen_acode(compiler_state_t *, const char *, struct qual);
 struct block *gen_mcode(compiler_state_t *, const char *, const char *,
     bpf_u_int32, struct qual);
-#ifdef INET6
-struct block *gen_mcode6(compiler_state_t *, const char *, const char *,
-    bpf_u_int32, struct qual);
-#endif
+struct block *gen_mcode6(compiler_state_t *, const char *, bpf_u_int32,
+    struct qual);
 struct block *gen_ncode(compiler_state_t *, const char *, bpf_u_int32,
     struct qual);
 struct block *gen_proto_abbrev(compiler_state_t *, int);
@@ -329,7 +327,7 @@ struct block *gen_byteop(compiler_state_t *, int, int, bpf_u_int32);
 struct block *gen_broadcast(compiler_state_t *, int);
 struct block *gen_multicast(compiler_state_t *, int);
 struct block *gen_ifindex(compiler_state_t *, int);
-struct block *gen_inbound(compiler_state_t *, int);
+struct block *gen_inbound_outbound(compiler_state_t *, const int);
 
 struct block *gen_llc(compiler_state_t *);
 struct block *gen_llc_i(compiler_state_t *);
@@ -345,6 +343,7 @@ struct block *gen_pppoed(compiler_state_t *);
 struct block *gen_pppoes(compiler_state_t *, bpf_u_int32, int);
 
 struct block *gen_geneve(compiler_state_t *, bpf_u_int32, int);
+struct block *gen_vxlan(compiler_state_t *, bpf_u_int32, int);
 
 struct block *gen_atmfield_code(compiler_state_t *, int, bpf_u_int32,
     int, int);
@@ -400,3 +399,5 @@ int pcap_parse(void *, compiler_state_t *);
 /* XXX */
 #define JT(b)  ((b)->et.succ)
 #define JF(b)  ((b)->ef.succ)
+
+#endif /* gencode_h */