]> The Tcpdump Group git mirrors - libpcap/blobdiff - gencode.h
Clean up the ether_hostton() stuff.
[libpcap] / gencode.h
index 2b089d21d561689cbabd4d165906a54e08f2863a..58828ecd5854b3f43eb28b4fed251a83278e0f33 100644 (file)
--- a/gencode.h
+++ b/gencode.h
@@ -19,6 +19,8 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#include "pcap/funcattrs.h"
+
 /*
  * ATM support:
  *
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif /* HAVE___ATTRIBUTE__ */
-
 /* Address qualifiers. */
 
 #define Q_HOST         1
@@ -268,6 +266,11 @@ struct block {
        int val[N_ATOMS];
 };
 
+/*
+ * A value of 0 for val[i] means the value is unknown.
+ */
+#define VAL_UNKNOWN    0
+
 struct arth {
        struct block *b;        /* protocol checks */
        struct slist *s;        /* stmt list */
@@ -367,19 +370,12 @@ struct icode {
 
 void bpf_optimize(compiler_state_t *, struct icode *ic);
 void bpf_syntax_error(compiler_state_t *, const char *);
-void bpf_error(compiler_state_t *, const char *, ...)
-    __attribute__((noreturn))
-#ifdef __ATTRIBUTE___FORMAT_OK
-    __attribute__((format (printf, 2, 3)))
-#endif /* __ATTRIBUTE___FORMAT_OK */
-    ;
+void PCAP_NORETURN bpf_error(compiler_state_t *, const char *, ...)
+    PCAP_PRINTFLIKE(2, 3);
 
 void finish_parse(compiler_state_t *, struct block *);
 char *sdup(compiler_state_t *, const char *);
 
-struct _opt_state;
-typedef struct _opt_state opt_state_t;
-
 struct bpf_insn *icode_to_fcode(compiler_state_t *, struct icode *,
     struct block *, u_int *);
 void sappend(struct slist *, struct slist *);