ipr.h

Go to the documentation of this file.
00001 /*
00002 ipr.h
00003 
00004 Copyright 1995 Philip Homburg
00005 */
00006 
00007 #ifndef IPR_H
00008 #define IPR_H
00009 
00010 typedef struct oroute
00011 {
00012         int ort_port;
00013         ipaddr_t ort_dest;
00014         ipaddr_t ort_subnetmask;
00015         int ort_dist;
00016         i32_t ort_pref;
00017         u32_t ort_mtu;
00018         ipaddr_t ort_gateway;
00019         time_t ort_exp_tim;
00020         time_t ort_timestamp;
00021         int ort_flags;
00022 
00023         struct oroute *ort_nextnw;
00024         struct oroute *ort_nextgw;
00025         struct oroute *ort_nextdist;
00026 } oroute_t;
00027 
00028 #define ORTD_UNREACHABLE        512
00029 
00030 #define ORTF_EMPTY              0
00031 #define ORTF_INUSE              1
00032 #define ORTF_STATIC             2
00033 
00034 typedef struct iroute
00035 {
00036         ipaddr_t irt_dest;
00037         ipaddr_t irt_gateway;
00038         ipaddr_t irt_subnetmask;
00039         int irt_dist;
00040         u32_t irt_mtu;
00041         int irt_port;
00042         int irt_flags;
00043 } iroute_t;
00044 
00045 #define IRTD_UNREACHABLE        512
00046 
00047 #define IRTF_EMPTY              0
00048 #define IRTF_INUSE              1
00049 #define IRTF_STATIC             2
00050 
00051 #define IPR_UNRCH_TIMEOUT       (60L * HZ)
00052 #define IPR_TTL_TIMEOUT         (60L * HZ)
00053 #define IPR_REDIRECT_TIMEOUT    (20 * 60L * HZ)
00054 #define IPR_GW_DOWN_TIMEOUT     (60L * HZ)
00055 #define IPR_MTU_TIMEOUT         (10*60L * HZ)   /* RFC-1191 */
00056 
00057 /* Prototypes */
00058 
00059 iroute_t *iroute_frag ARGS(( int port_nr, ipaddr_t dest ));
00060 int oroute_frag ARGS(( int port_nr, ipaddr_t dest, int ttl, size_t msgsize,
00061                                                         ipaddr_t *nexthop ));
00062 void ipr_init ARGS(( void ));
00063 int ipr_get_iroute ARGS(( int ent_no, nwio_route_t *route_ent ));
00064 int ipr_add_iroute ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask, 
00065         ipaddr_t gateway, int dist, int mtu, int static_route,
00066         iroute_t **route_p ));
00067 int ipr_del_iroute ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask, 
00068         ipaddr_t gateway, int static_route ));
00069 void ipr_chk_itab ARGS(( int port_nr, ipaddr_t addr, ipaddr_t mask ));
00070 int ipr_get_oroute ARGS(( int ent_no, nwio_route_t *route_ent ));
00071 int ipr_add_oroute ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask, 
00072         ipaddr_t gateway, time_t timeout, int dist, int mtu, int static_route,
00073         i32_t preference, oroute_t **route_p ));
00074 int ipr_del_oroute ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask, 
00075         ipaddr_t gateway, int static_route ));
00076 void ipr_chk_otab ARGS(( int port_nr, ipaddr_t addr, ipaddr_t mask ));
00077 void ipr_gateway_down ARGS(( int port_nr, ipaddr_t gateway, time_t timeout ));
00078 void ipr_redirect ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
00079         ipaddr_t old_gateway, ipaddr_t new_gateway, time_t timeout ));
00080 void ipr_destunrch ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
00081         time_t timeout ));
00082 void ipr_ttl_exc ARGS(( int port_nr, ipaddr_t dest, ipaddr_t subnetmask,
00083         time_t timeout ));
00084 void ipr_mtu ARGS(( int port_nr, ipaddr_t dest, U16_t mtu, time_t timeout ));
00085 
00086 #endif /* IPR_H */
00087 
00088 /*
00089  * $PchId: ipr.h,v 1.8 2002/06/09 07:48:11 philip Exp $
00090  */

Generated on Fri Apr 14 22:57:30 2006 for minix by  doxygen 1.4.6