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 >
C/C++ Source or Header  |  2012-01-18  |  814b  |  33 lines

  1. /* @(#) $Id: route.h 804 2012-01-18 08:45:27Z leres $ (LBL) */
  2. #ifndef acld_route_h
  3. #define acld_route_h
  4.  
  5. /* Route types */
  6. enum routetype {
  7.     ROUTE_UNKNOWN = 0,
  8.     ROUTE_STATIC,
  9.     ROUTE_DYNAMIC,
  10.     ROUTE_INTERFACE,
  11.     ROUTE_NULLZERO
  12. };
  13.  
  14. /* Routes */
  15. struct route {
  16.     enum routetype type;
  17.     struct addr dst;
  18.     struct addr gw;
  19.     char *raw;            /* text as returned from the router */
  20. };
  21.  
  22. int goodnullzero(struct cf *, struct addr *);
  23. int nullzeronetadd(struct cf *, const char *);
  24. void routeadd(struct state *, struct route *);
  25. int routedelete(struct state *, struct route *);
  26. struct route *routefind(struct state *, struct route *);
  27. void routefree(struct state *);
  28. const char *routeformat(struct route *);
  29. void routeinit(struct state *);
  30. void routelistsfree(struct state *);
  31. int routestradd(struct state *, const char *);
  32. #endif
  33.