home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.lbl.gov
/
2014.05.ftp.ee.lbl.gov.tar
/
ftp.ee.lbl.gov
/
acld-1.11.tar.gz
/
acld-1.11.tar
/
acld-1.11
/
route.h
< prev
next >
Wrap
C/C++ Source or Header
|
2012-01-18
|
814b
|
33 lines
/* @(#) $Id: route.h 804 2012-01-18 08:45:27Z leres $ (LBL) */
#ifndef acld_route_h
#define acld_route_h
/* Route types */
enum routetype {
ROUTE_UNKNOWN = 0,
ROUTE_STATIC,
ROUTE_DYNAMIC,
ROUTE_INTERFACE,
ROUTE_NULLZERO
};
/* Routes */
struct route {
enum routetype type;
struct addr dst;
struct addr gw;
char *raw; /* text as returned from the router */
};
int goodnullzero(struct cf *, struct addr *);
int nullzeronetadd(struct cf *, const char *);
void routeadd(struct state *, struct route *);
int routedelete(struct state *, struct route *);
struct route *routefind(struct state *, struct route *);
void routefree(struct state *);
const char *routeformat(struct route *);
void routeinit(struct state *);
void routelistsfree(struct state *);
int routestradd(struct state *, const char *);
#endif