source: trunk/minix/servers/inet/generic/ipr.h@ 12

Last change on this file since 12 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.5 KB
Line 
1/*
2ipr.h
3
4Copyright 1995 Philip Homburg
5*/
6
7#ifndef IPR_H
8#define IPR_H
9
10typedef struct oroute
11{
12 int ort_port;
13 ipaddr_t ort_dest;
14 ipaddr_t ort_subnetmask;
15 int ort_dist;
16 i32_t ort_pref;
17 u32_t ort_mtu;
18 ipaddr_t ort_gateway;
19 time_t ort_exp_tim;
20 time_t ort_timestamp;
21 int ort_flags;
22
23 struct oroute *ort_nextnw;
24 struct oroute *ort_nextgw;
25 struct oroute *ort_nextdist;
26} oroute_t;
27
28#define ORTD_UNREACHABLE 512
29
30#define ORTF_EMPTY 0
31#define ORTF_INUSE 1
32#define ORTF_STATIC 2
33
34typedef struct iroute
35{
36 ipaddr_t irt_dest;
37 ipaddr_t irt_gateway;
38 ipaddr_t irt_subnetmask;
39 int irt_dist;
40 u32_t irt_mtu;
41 int irt_port;
42 int irt_flags;
43} iroute_t;
44
45#define IRTD_UNREACHABLE 512
46
47#define IRTF_EMPTY 0
48#define IRTF_INUSE 1
49#define IRTF_STATIC 2
50
51#define IPR_UNRCH_TIMEOUT (60L * HZ)
52#define IPR_TTL_TIMEOUT (60L * HZ)
53#define IPR_REDIRECT_TIMEOUT (20 * 60L * HZ)
54#define IPR_GW_DOWN_TIMEOUT (60L * HZ)
55#define IPR_MTU_TIMEOUT (10*60L * HZ) /* RFC-1191 */
56
57/* Prototypes */
58
59iroute_t *iroute_frag ARGS(( int port_nr, ipaddr_t dest ));
60int oroute_frag ARGS(( int port_nr, ipaddr_t dest, int ttl, size_t msgsize,
61 ipaddr_t *nexthop ));
62void ipr_init ARGS(( void ));
63int ipr_get_iroute ARGS(( int ent_no, nwio_route_t *route_ent ));
64int ipr_add_iroute ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
65 ipaddr_t gateway, int dist, int mtu, int static_route,
66 iroute_t **route_p ));
67int ipr_del_iroute ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
68 ipaddr_t gateway, int static_route ));
69void ipr_chk_itab ARGS(( int port_nr, ipaddr_t addr, ipaddr_t mask ));
70int ipr_get_oroute ARGS(( int ent_no, nwio_route_t *route_ent ));
71int ipr_add_oroute ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
72 ipaddr_t gateway, time_t timeout, int dist, int mtu, int static_route,
73 i32_t preference, oroute_t **route_p ));
74int ipr_del_oroute ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
75 ipaddr_t gateway, int static_route ));
76void ipr_chk_otab ARGS(( int port_nr, ipaddr_t addr, ipaddr_t mask ));
77void ipr_gateway_down ARGS(( int port_nr, ipaddr_t gateway, time_t timeout ));
78void ipr_redirect ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
79 ipaddr_t old_gateway, ipaddr_t new_gateway, time_t timeout ));
80void ipr_destunrch ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
81 time_t timeout ));
82void ipr_ttl_exc ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
83 time_t timeout ));
84void ipr_mtu ARGS(( int port_nr, ipaddr_t dest, U16_t mtu, time_t timeout ));
85
86#endif /* IPR_H */
87
88/*
89 * $PchId: ipr.h,v 1.8 2002/06/09 07:48:11 philip Exp $
90 */
Note: See TracBrowser for help on using the repository browser.