mausezahn: use getopt_long instead of getopt
[netsniff-ng.git] / proto.h
blob0cc1fd870153d92b9d1e325f04697b7e538a359d
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * Copyright (C) 2009, 2010 Daniel Borkmann
4 * Copyright (C) 2012 Christoph Jaeger <christoph@netsniff-ng.org>
5 * Subject to the GPL, version 2.
6 */
8 #ifndef PROTO_H
9 #define PROTO_H
11 #include <ctype.h>
12 #include <stdint.h>
14 #include "tprintf.h"
16 struct pkt_buff;
18 struct protocol {
19 /* Needs to be filled out by user */
20 const unsigned int key;
21 void (*print_full)(struct pkt_buff *pkt);
22 void (*print_less)(struct pkt_buff *pkt);
23 /* Used by program logic */
24 struct protocol *next;
25 void (*process) (struct pkt_buff *pkt);
28 extern void empty(struct pkt_buff *pkt);
29 extern void _hex(uint8_t *ptr, size_t len);
30 extern void hex(struct pkt_buff *pkt);
31 extern void _ascii(uint8_t *ptr, size_t len);
32 extern void ascii(struct pkt_buff *pkt);
33 extern void hex_ascii(struct pkt_buff *pkt);
35 #endif /* PROTO_H */