flowtop: Use strncpy instead of strcat
[netsniff-ng.git] / proto.h
blob227a74862af337936c58ae5578cd903aa0ad6acd
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(struct pkt_buff *pkt);
30 extern void ascii(struct pkt_buff *pkt);
31 extern void hex_ascii(struct pkt_buff *pkt);
33 #endif /* PROTO_H */