4 #ifndef __IP_LOOKUP_H__
5 #define __IP_LOOKUP_H__
7 #if defined(__STDC__) || defined(__GNUC__) || defined(_AIX51)
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)
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)
29 typedef struct iplookupop
{
30 int iplo_type
; /* IPLT_* */
31 int iplo_unit
; /* IPL_LOG* */
33 char iplo_name
[FR_GROUPLEN
];
34 size_t iplo_size
; /* sizeof struct at iplo_struct */
38 #define LOOKUP_ANON 0x80000000
41 typedef struct iplookupflush
{
42 int iplf_type
; /* IPLT_* */
43 int iplf_unit
; /* IPL_LOG* */
46 char iplf_name
[FR_GROUPLEN
];
49 typedef struct iplookuplink
{
50 int ipll_type
; /* IPLT_* */
51 int ipll_unit
; /* IPL_LOG* */
53 char ipll_group
[FR_GROUPLEN
];
61 #define IPLT_ANON 0x80000000
65 struct iplookupiterkey
{
67 u_char ilik_type
; /* IPLT_* */
69 u_char ilik_unit
; /* IPL_LOG* */
74 typedef struct ipflookupiter
{
76 iplookupiterkey_t ili_lkey
;
77 char ili_name
[FR_GROUPLEN
];
81 #define ili_key ili_lkey.ilik_key
82 #define ili_ival ili_lkey.ilik_unstr.ilik_ival
83 #define ili_unit ili_lkey.ilik_unstr.ilik_unit
84 #define ili_type ili_lkey.ilik_unstr.ilik_type
85 #define ili_otype ili_lkey.ilik_unstr.ilik_otype
87 #define IPFLOOKUPITER_LIST 0
88 #define IPFLOOKUPITER_NODE 1
91 extern int ip_lookup_init
__P((void));
92 extern int ip_lookup_ioctl
__P((caddr_t
, ioctlcmd_t
, int, int, void *));
93 extern void ip_lookup_unload
__P((void));
94 extern void ip_lookup_deref
__P((int, void *));
95 extern void ip_lookup_iterderef
__P((u_32_t
, void *));
97 #endif /* __IP_LOOKUP_H__ */