extern void brcm_tag_if_print IF_PRINTER_ARGS;
extern void brcm_tag_prepend_if_print IF_PRINTER_ARGS;
extern u_int chdlc_if_print IF_PRINTER_ARGS;
-extern u_int cip_if_print IF_PRINTER_ARGS;
+extern void cip_if_print IF_PRINTER_ARGS;
extern void dsa_if_print IF_PRINTER_ARGS;
extern void edsa_if_print IF_PRINTER_ARGS;
extern void enc_if_print IF_PRINTER_ARGS;
* 'h->len' is the length of the packet off the wire, and 'h->caplen'
* is the number of bytes actually captured.
*/
-u_int
+void
cip_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
size_t cmplen;
int llc_hdrlen;
- ndo->ndo_protocol = "cip_if";
+ ndo->ndo_protocol = "cip";
cmplen = sizeof(rfcllc);
if (cmplen > caplen)
cmplen = caplen;
if (cmplen == 0) {
nd_print_trunc(ndo);
- return 0;
+ return;
}
if (memcmp(rfcllc, p, cmplen) == 0) {
/*
ip_print(ndo, p, length);
}
- return (llc_hdrlen);
+ ndo->ndo_ll_hdr_len += llc_hdrlen;
}
};
static const struct uint_printer uint_printers[] = {
-#ifdef DLT_CIP
- { cip_if_print, DLT_CIP },
-#endif
-#ifdef DLT_ATM_CLIP
- { cip_if_print, DLT_ATM_CLIP },
-#endif
#ifdef DLT_IP_OVER_FC
{ ipfc_if_print, DLT_IP_OVER_FC },
#endif
#ifdef DLT_BLUETOOTH_HCI_H4_WITH_PHDR
{ bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
#endif
+#ifdef DLT_ATM_CLIP
+ { cip_if_print, DLT_ATM_CLIP },
+#endif
+#ifdef DLT_CIP
+ { cip_if_print, DLT_CIP },
+#endif
#ifdef DLT_DSA_TAG_DSA
{ dsa_if_print, DLT_DSA_TAG_DSA },
#endif