-static void decode_ether(u_char *, const struct pcap_pkthdr *,
- const u_char *);
-static void decode_loop(u_char *, const struct pcap_pkthdr *,
- const u_char *);
-static void decode_null(u_char *, const struct pcap_pkthdr *,
- const u_char *);
-static void decode_ppp(u_char *, const struct pcap_pkthdr *,
- const u_char *);
-static void decode_pppoe(u_char *, const struct pcap_pkthdr *,
- const u_char *);
-static void decode_pppoe_real(const u_char *pdata, const uint32_t len,
- struct pktsummary *sm);
-static void decode_linux_sll(u_char *, const struct pcap_pkthdr *,
- const u_char *);
-static void decode_raw(u_char *, const struct pcap_pkthdr *,
- const u_char *);
-static void decode_ip(const u_char *pdata, const uint32_t len,
- struct pktsummary *sm);
-static void decode_ipv6(const u_char *pdata, const uint32_t len,
- struct pktsummary *sm);
+static int decode_ether(DECODER_ARGS);
+static int decode_loop(DECODER_ARGS);
+static int decode_null(DECODER_ARGS);
+static int decode_ppp(DECODER_ARGS);
+static int decode_pppoe(DECODER_ARGS);
+#ifdef DLT_LINUX_SLL
+static int decode_linux_sll(DECODER_ARGS);
+#endif
+static int decode_raw(DECODER_ARGS);
+
+#define HELPER_ARGS const u_char *pdata, \
+ const uint32_t len, \
+ struct pktsummary *sm
+
+static int helper_pppoe(HELPER_ARGS);
+static int helper_ip(HELPER_ARGS);
+static int helper_ipv6(HELPER_ARGS);
+static void helper_ip_deeper(HELPER_ARGS); /* protocols like TCP/UDP */