blob: de632b2885dfdaebaf54a8e01c7e4814aebf7a32 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef _LIBCT_PROTO_H
#define _LIBCT_PROTO_H
/* FIXME: Rename this file pablo... */
#include "linux_list.h"
#include <getopt.h>
struct cta_proto;
struct ctproto_handler {
struct list_head head;
char *name;
u_int16_t protonum;
int (*parse)(char c, char *argv[],
struct ip_conntrack_tuple *orig,
struct ip_conntrack_tuple *reply,
union ip_conntrack_proto *proto,
unsigned int *flags);
void (*print_tuple)(struct ip_conntrack_tuple *t);
void (*print_proto)(union ip_conntrack_proto *proto);
int (*final_check)(unsigned int flags);
struct option *opts;
unsigned int option_offset;
};
extern void register_proto(struct ctproto_handler *h);
extern void unregister_proto(struct ctproto_handler *h);
extern struct ctproto_handler *findproto(char *name);
#define NIPQUAD(addr) \
((unsigned char *)&addr)[0], \
((unsigned char *)&addr)[1], \
((unsigned char *)&addr)[2], \
((unsigned char *)&addr)[3]
#endif
|