2 * netsniff-ng - the packet sniffing beast
3 * Copyright 2009 - 2013 Daniel Borkmann.
4 * Subject to the GPL, version 2.
21 #define PRINT_HEX_ASCII 4
24 static const char * const packet_types
[256]={
33 extern char *if_indextoname(unsigned ifindex
, char *ifname
);
35 static inline void show_frame_hdr(struct frame_map
*hdr
, int mode
)
39 if (mode
== PRINT_NONE
)
45 packet_types
[hdr
->s_ll
.sll_pkttype
] ? : "?",
46 if_indextoname(hdr
->s_ll
.sll_ifindex
, tmp
) ? : "?",
50 tprintf("%s %s %u %us.%uns\n",
51 packet_types
[hdr
->s_ll
.sll_pkttype
] ? : "?",
52 if_indextoname(hdr
->s_ll
.sll_ifindex
, tmp
) ? : "?",
53 hdr
->tp_h
.tp_len
, hdr
->tp_h
.tp_sec
,
59 extern void dissector_init_all(int fnttype
);
60 extern void dissector_entry_point(uint8_t *packet
, size_t len
, int linktype
, int mode
);
61 extern void dissector_cleanup_all(void);
62 extern int dissector_set_print_type(void *ptr
, int type
);
64 #endif /* DISSECTOR_H */