/* defs.h 4.3 82/05/26 */
* Internal data structure definitions for
* user routing process. Based on Xerox NS
* protocol specs with mods relevant to more
* general addressing scheme.
* Routing table structure; differs a bit from kernel tables.
* Note: the union below must agree in the first 4 members
* so the ioctl's will work.
struct rt_entry
*rt_forw
;
struct rt_entry
*rt_back
;
struct rt_entry
*rt_forw
;
struct rt_entry
*rt_back
;
struct sockaddr rtu_gateway
;
#define rt_rt rt_rtu.rtu_rt /* pass to ioctl */
#define rt_hash rt_rtu.rtu_entry.rtu_hash /* for net or host */
#define rt_dst rt_rtu.rtu_entry.rtu_dst /* match value */
#define rt_gateway rt_rtu.rtu_entry.rtu_gateway /* who to forward to */
#define rt_flags rt_rtu.rtu_entry.rtu_flags /* kernel flags */
#define rt_retry rt_rtu.rtu_entry.rtu_retry /* retries of ioctl */
#define rt_timer rt_rtu.rtu_entry.rtu_timer /* for invalidation */
#define rt_state rt_rtu.rtu_entry.rtu_state /* see below */
#define rt_metric rt_rtu.rtu_entry.rtu_metric /* cost of route */
#define rt_ifp rt_rtu.rtu_entry.rtu_ifp /* interface to take */
* "State" of routing table entry.
#define RTS_DELRT 0x1 /* delete pending */
#define RTS_CHGRT 0x2 /* change command pending */
#define RTS_ADDRT 0x4 /* add command pending */
#define RTS_SILENT 0x8 /* don't send to router */
struct rthash nethash
[ROUTEHASHSIZ
], hosthash
[ROUTEHASHSIZ
];
struct rt_entry
*rtlookup();
* Per address family routines.
int (*af_hash
)(); /* returns keys based on address */
int (*af_netmatch
)(); /* verifies net # matching */
int (*af_output
)(); /* interprets address for sending */
int (*af_portmatch
)(); /* interprets address on receipt */
int (*af_checkhost
)(); /* tells if address for host or net */
int (*af_canon
)(); /* purges extraneous part of address */
* Structure returned by af_hash routines.
u_int afh_hosthash
; /* host based hash */
u_int afh_nethash
; /* network based hash */
struct afswitch afswitch
[AF_MAX
]; /* table proper */