proto_ipv4: don't trim length of pkt_buff
[netsniff-ng.git] / src / proto.h
blob26063cd5f882a7879143fe9272a1ab1638ec83bc
1 /*
2 * netsniff-ng - the packet sniffing beast
3 * By Daniel Borkmann <daniel@netsniff-ng.org>.
4 * Copyright (C) 2009, 2010 Daniel Borkmann
5 * Copyright (C) 2012 Christoph Jaeger <christoph@netsniff-ng.org>
6 * Subject to the GPL, version 2.
7 */
9 #ifndef PROTO_H
10 #define PROTO_H
12 #include <ctype.h>
13 #include <stdint.h>
15 #include "hash.h"
16 #include "tprintf.h"
18 struct pkt_buff;
20 struct protocol {
21 /* Needs to be filled out by user */
22 unsigned int key;
23 void (*print_full)(struct pkt_buff *pkt);
24 void (*print_less)(struct pkt_buff *pkt);
25 /* Used by program logic */
26 struct protocol *next;
27 void (*process) (struct pkt_buff *pkt);
30 extern void empty(struct pkt_buff *pkt);
31 extern void hex(struct pkt_buff *pkt);
32 extern void ascii(struct pkt_buff *pkt);
33 extern void hex_ascii(struct pkt_buff *pkt);
35 #endif /* PROTO_H */