2 #ifndef __IP_LOOKUP_H__
3 #define __IP_LOOKUP_H__
5 #if defined(__STDC__) || defined(__GNUC__) || defined(_AIX51)
6 # define SIOCLOOKUPADDTABLE _IOWR('r', 60, struct iplookupop)
7 # define SIOCLOOKUPDELTABLE _IOWR('r', 61, struct iplookupop)
8 # define SIOCLOOKUPSTAT _IOWR('r', 64, struct iplookupop)
9 # define SIOCLOOKUPSTATW _IOW('r', 64, struct iplookupop)
10 # define SIOCLOOKUPFLUSH _IOWR('r', 65, struct iplookupflush)
11 # define SIOCLOOKUPADDNODE _IOWR('r', 67, struct iplookupop)
12 # define SIOCLOOKUPADDNODEW _IOW('r', 67, struct iplookupop)
13 # define SIOCLOOKUPDELNODE _IOWR('r', 68, struct iplookupop)
14 # define SIOCLOOKUPDELNODEW _IOW('r', 68, struct iplookupop)
16 # define SIOCLOOKUPADDTABLE _IOWR(r, 60, struct iplookupop)
17 # define SIOCLOOKUPDELTABLE _IOWR(r, 61, struct iplookupop)
18 # define SIOCLOOKUPSTAT _IOWR(r, 64, struct iplookupop)
19 # define SIOCLOOKUPSTATW _IOW(r, 64, struct iplookupop)
20 # define SIOCLOOKUPFLUSH _IOWR(r, 65, struct iplookupflush)
21 # define SIOCLOOKUPADDNODE _IOWR(r, 67, struct iplookupop)
22 # define SIOCLOOKUPADDNODEW _IOW(r, 67, struct iplookupop)
23 # define SIOCLOOKUPDELNODE _IOWR(r, 68, struct iplookupop)
24 # define SIOCLOOKUPDELNODEW _IOW(r, 68, struct iplookupop)
27 typedef struct iplookupop {
28 int iplo_type; /* IPLT_* */
29 int iplo_unit; /* IPL_LOG* */
31 char iplo_name[FR_GROUPLEN];
32 size_t iplo_size; /* sizeof struct at iplo_struct */
36 #define LOOKUP_ANON 0x80000000
39 typedef struct iplookupflush {
40 int iplf_type; /* IPLT_* */
41 int iplf_unit; /* IPL_LOG* */
44 char iplf_name[FR_GROUPLEN];
47 typedef struct iplookuplink {
48 int ipll_type; /* IPLT_* */
49 int ipll_unit; /* IPL_LOG* */
51 char ipll_group[FR_GROUPLEN];
59 #define IPLT_ANON 0x80000000
63 struct iplookupiterkey {
65 u_char ilik_type; /* IPLT_* */
67 u_char ilik_unit; /* IPL_LOG* */
72 typedef struct ipflookupiter {
74 iplookupiterkey_t ili_lkey;
75 char ili_name[FR_GROUPLEN];
79 #define ili_key ili_lkey.ilik_key
80 #define ili_ival ili_lkey.ilik_unstr.ilik_ival
81 #define ili_unit ili_lkey.ilik_unstr.ilik_unit
82 #define ili_type ili_lkey.ilik_unstr.ilik_type
83 #define ili_otype ili_lkey.ilik_unstr.ilik_otype
85 #define IPFLOOKUPITER_LIST 0
86 #define IPFLOOKUPITER_NODE 1
89 extern int ip_lookup_init __P((void));
90 extern int ip_lookup_ioctl __P((caddr_t, ioctlcmd_t, int, int, void *));
91 extern void ip_lookup_unload __P((void));
92 extern void ip_lookup_deref __P((int, void *));
93 extern void ip_lookup_iterderef __P((u_32_t, void *));
95 #endif /* __IP_LOOKUP_H__ */