man: add description about different pcap formats
[netsniff-ng.git] / proto.h
blob623caf62591f3ccb6b7b5a5829267b72cdbd0ce0
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 "hash.h"
15 #include "tprintf.h"
17 struct pkt_buff;
19 struct protocol {
20 /* Needs to be filled out by user */
21 unsigned int key;
22 void (*print_full)(struct pkt_buff *pkt);
23 void (*print_less)(struct pkt_buff *pkt);
24 /* Used by program logic */
25 struct protocol *next;
26 void (*process) (struct pkt_buff *pkt);
29 extern void empty(struct pkt_buff *pkt);
30 extern void hex(struct pkt_buff *pkt);
31 extern void ascii(struct pkt_buff *pkt);
32 extern void hex_ascii(struct pkt_buff *pkt);
34 #endif /* PROTO_H */