00001 /* 00002 * Worldvisions Weaver Software: 00003 * Copyright (C) 1997-2002 Net Integration Technologies, Inc. 00004 * 00005 * The WvIPRoute and WvIPRouteList classes, which can manipulate the kernel 00006 * routing table in useful ways. 00007 */ 00008 #ifndef __WVIPROUTE_H 00009 #define __WVIPROUTE_H 00010 00011 #include "wvaddr.h" 00012 #include "wvlinklist.h" 00013 #include "wvlog.h" 00014 00018 class WvIPRoute 00019 { 00020 public: 00021 WvIPRoute(const WvString &_ifc, const WvIPNet &_net, const WvIPAddr &_gate, 00022 int _metric, const WvString &_table); 00023 operator WvString() const; 00024 bool operator== (const WvIPRoute &r2) const; 00025 00026 WvString ifc; 00027 WvIPNet ip; 00028 WvIPAddr gateway; 00029 int metric; 00030 WvString table; // "advanced ip routing" table name 00031 }; 00032 00033 00034 DeclareWvList3(WvIPRoute, WvIPRouteListBase, ); 00035 00039 class WvIPRouteList : public WvIPRouteListBase 00040 { 00041 public: 00042 WvLog log; 00043 00044 WvIPRouteList(); 00045 00049 void get_kernel(); 00050 00054 void set_kernel(); 00055 00059 WvIPRoute *find(const WvIPAddr &addr); 00060 }; 00061 00062 00063 #endif // __WVIPROUTE_H