8 #ifndef __WVINTERFACE_H
9 #define __WVINTERFACE_H
12 #include "wvhashtable.h"
33 void fill_rte(
struct rtentry *rte,
char ifname[17],
71 void promisc(
bool enable);
102 const WvIPAddr &src,
int metric = 0,
113 int addarp(
const WvIPNet &proto,
const WvAddr &hw,
bool proxy);
116 int req(
int ioctl_num,
struct ifreq *ifr);
119 int req(
int ioctl_num,
struct iwreq *ifr);
128 static WvInterfaceDictBase slist;
131 class Iter :
public WvInterfaceDictBase::Iter
135 : WvInterfaceDictBase::Iter(l.slist)
139 class Sorter :
public WvInterfaceDictBase::Sorter
143 WvInterfaceDictBase::Sorter::RealCompareFunc *f)
144 : WvInterfaceDictBase::Sorter(l.slist, f)
153 bool on_local_net(
const WvIPNet &addr);
156 {
return slist[str]; }
162 #endif // __WVINTERFACE_H