1 /* $NetBSD: ip_lookup.h,v 1.1.1.1 2004/03/28 08:56:44 martti Exp $ */
2
3
4 #ifndef __IP_LOOKUP_H__
5 #define __IP_LOOKUP_H__
6
7 #if defined(__STDC__) || defined(__GNUC__)
8 # define SIOCLOOKUPADDTABLE _IOWR('r', 60, struct iplookupop)
9 # define SIOCLOOKUPDELTABLE _IOWR('r', 61, struct iplookupop)
10 # define SIOCLOOKUPSTAT _IOWR('r', 64, struct iplookupop)
11 # define SIOCLOOKUPSTATW _IOW('r', 64, struct iplookupop)
12 # define SIOCLOOKUPFLUSH _IOWR('r', 65, struct iplookupflush)
13 # define SIOCLOOKUPADDNODE _IOWR('r', 67, struct iplookupop)
14 # define SIOCLOOKUPADDNODEW _IOW('r', 67, struct iplookupop)
15 # define SIOCLOOKUPDELNODE _IOWR('r', 68, struct iplookupop)
16 # define SIOCLOOKUPDELNODEW _IOW('r', 68, struct iplookupop)
17 #else
18 # define SIOCLOOKUPADDTABLE _IOWR(r, 60, struct iplookupop)
19 # define SIOCLOOKUPDELTABLE _IOWR(r, 61, struct iplookupop)
20 # define SIOCLOOKUPSTAT _IOWR(r, 64, struct iplookupop)
21 # define SIOCLOOKUPSTATW _IOW(r, 64, struct iplookupop)
22 # define SIOCLOOKUPFLUSH _IOWR(r, 65, struct iplookupflush)
23 # define SIOCLOOKUPADDNODE _IOWR(r, 67, struct iplookupop)
24 # define SIOCLOOKUPADDNODEW _IOW(r, 67, struct iplookupop)
25 # define SIOCLOOKUPDELNODE _IOWR(r, 68, struct iplookupop)
26 # define SIOCLOOKUPDELNODEW _IOW(r, 68, struct iplookupop)
27 #endif
28
29 typedef struct iplookupop {
30 int iplo_type; /* IPLT_* */
31 int iplo_unit; /* IPL_LOG* */
32 u_int iplo_arg;
33 char iplo_name[FR_GROUPLEN];
34 size_t iplo_size; /* sizeof struct at iplo_struct */
35 void *iplo_struct;
36 } iplookupop_t;
37
38 typedef struct iplookupflush {
39 int iplf_type; /* IPLT_* */
40 int iplf_unit; /* IPL_LOG* */
41 u_int iplf_arg;
42 size_t iplf_count;
43 char iplf_name[FR_GROUPLEN];
44 } iplookupflush_t;
45
46 typedef struct iplookuplink {
47 int ipll_type; /* IPLT_* */
48 int ipll_unit; /* IPL_LOG* */
49 u_int ipll_num;
50 char ipll_group[FR_GROUPLEN];
51 } iplookuplink_t;
52
53 #define IPLT_ALL -1
54 #define IPLT_NONE 0
55 #define IPLT_POOL 1
56 #define IPLT_HASH 2
57
58 #define IPLT_ANON 0x80000000
59
60 extern int ip_lookup_init __P((void));
61 extern int ip_lookup_ioctl __P((caddr_t, ioctlcmd_t, int));
62 extern void ip_lookup_unload __P((void));
63 extern void ip_lookup_deref __P((int, void *));
64
65 #endif /* __IP_LOOKUP_H__ */
Cache object: da8d5899a3a29ced40fa934712a8d844
|