]> The Tcpdump Group git mirrors - libpcap/blobdiff - gencode.h
Define ffs() in optimize.c; that's all that uses it.
[libpcap] / gencode.h
index 71fc1237fe2f307c31af26c19381ee68f5f0ae0d..67ed0dc076bbad49369957903239f2b7bbf2bc25 100644 (file)
--- a/gencode.h
+++ b/gencode.h
@@ -17,8 +17,6 @@
  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.70 2007-06-11 10:04:25 guy Exp $ (LBL)
  */
 
 /*
 
 #define Q_RADIO                40
 
+#define Q_CARP         41
+
 /* Directional qualifiers. */
 
 #define Q_SRC          1
 #define Q_DST          2
 #define Q_OR           3
 #define Q_AND          4
+#define Q_ADDR1                5
+#define Q_ADDR2                6
+#define Q_ADDR3                7
+#define Q_ADDR4                8
+#define Q_RA           9
+#define Q_TA           10
 
 #define Q_DEFAULT      0
 #define Q_UNDEF                255
 #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 M_LSSU         23      /* LSSU */
 #define M_MSU          24      /* MSU */
 
+/* MTP2 HSL types */
+#define MH_FISU                25      /* FISU for HSL */
+#define MH_LSSU                26      /* LSSU */
+#define MH_MSU         27      /* MSU */
+
 /* MTP3 field types */
 #define M_SIO          1
 #define M_OPC          2
 #define M_DPC          3
 #define M_SLS          4
 
+/* MTP3 field types in case of MTP2 HSL */
+#define MH_SIO         5
+#define MH_OPC         6
+#define MH_DPC         7
+#define MH_SLS         8
+
 
 struct slist;
 
@@ -232,8 +249,8 @@ struct block {
        struct slist *stmts;    /* side effect stmts */
        struct stmt s;          /* branch stmt */
        int mark;
-       int longjt;             /* jt branch requires long jump */
-       int longjf;             /* jf branch requires long jump */
+       u_int longjt;           /* jt branch requires long jump */
+       u_int longjf;           /* jf branch requires long jump */
        int level;
        int offset;
        int sense;
@@ -277,9 +294,9 @@ void gen_not(struct block *);
 struct block *gen_scode(const char *, struct qual);
 struct block *gen_ecode(const u_char *, struct qual);
 struct block *gen_acode(const u_char *, struct qual);
-struct block *gen_mcode(const char *, const char *, int, struct qual);
+struct block *gen_mcode(const char *, const char *, unsigned int, struct qual);
 #ifdef INET6
-struct block *gen_mcode6(const char *, const char *, int, struct qual);
+struct block *gen_mcode6(const char *, const char *, unsigned int, struct qual);
 #endif
 struct block *gen_ncode(const char *, bpf_u_int32, struct qual);
 struct block *gen_proto_abbrev(int);
@@ -291,11 +308,20 @@ struct block *gen_broadcast(int);
 struct block *gen_multicast(int);
 struct block *gen_inbound(int);
 
+struct block *gen_llc(void);
+struct block *gen_llc_i(void);
+struct block *gen_llc_s(void);
+struct block *gen_llc_u(void);
+struct block *gen_llc_s_subtype(bpf_u_int32);
+struct block *gen_llc_u_subtype(bpf_u_int32);
+
 struct block *gen_vlan(int);
 struct block *gen_mpls(int);
 
 struct block *gen_pppoed(void);
-struct block *gen_pppoes(void);
+struct block *gen_pppoes(int);
+
+struct block *gen_geneve(int);
 
 struct block *gen_atmfield_code(int atmfield, bpf_int32 jvalue, bpf_u_int32 jtype, int reverse);
 struct block *gen_atmtype_abbrev(int type);
@@ -313,15 +339,20 @@ struct block *gen_pf_action(int);
 struct block *gen_pf_dir(int);
 
 struct block *gen_p80211_type(int, int);
+struct block *gen_p80211_fcdir(int);
 
 void bpf_optimize(struct block **);
 void bpf_error(const char *, ...)
-    __attribute__((noreturn, format (printf, 1, 2)));
+    __attribute__((noreturn))
+#ifdef __ATTRIBUTE___FORMAT_OK
+    __attribute__((format (printf, 1, 2)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+    ;
 
 void finish_parse(struct block *);
 char *sdup(const char *);
 
-struct bpf_insn *icode_to_fcode(struct block *, int *);
+struct bpf_insn *icode_to_fcode(struct block *, u_int *);
 int pcap_parse(void);
 void lex_init(const char *);
 void lex_cleanup(void);