#include <wvinterface.h>
Public Methods | |
WvInterface (const WvString &_name) | |
~WvInterface () | |
void | rescan () |
const WvAddr & | hwaddr () |
const WvIPNet & | ipaddr () |
const WvIPAddr | dstaddr () |
int | getflags () |
int | setflags (int clear, int set) |
bool | isup () |
void | up (bool enable) |
bool | ispromisc () |
void | promisc (bool enable) |
int | setipaddr (const WvIPNet &addr) |
int | setmtu (int mtu) |
int | addroute (const WvIPNet &dest, int metric=0, const WvString &table="default") |
int | addroute (const WvIPNet &dest, const WvIPAddr &gw, int metric=0, const WvString &table="default") |
int | delroute (const WvIPNet &dest, int metric=0, const WvString &table="default") |
int | delroute (const WvIPNet &dest, const WvIPAddr &gw, int metric=0, const WvString &table="default") |
bool | isarp () |
int | addarp (const WvIPNet &proto, const WvAddr &hw, bool proxy) |
WvInterface (const WvString &_name) | |
~WvInterface () | |
void | rescan () |
const WvAddr & | hwaddr () |
const WvIPNet & | ipaddr () |
const WvIPAddr | dstaddr () |
int | getflags () |
int | setflags (int clear, int set) |
bool | isup () |
void | up (bool enable) |
bool | ispromisc () |
void | promisc (bool enable) |
int | setipaddr (const WvIPNet &addr) |
int | setmtu (int mtu) |
int | addroute (const WvIPNet &dest, int metric=0, const WvString &table="default") |
int | addroute (const WvIPNet &dest, const WvIPAddr &gw, int metric=0, const WvString &table="default") |
int | delroute (const WvIPNet &dest, int metric=0, const WvString &table="default") |
int | delroute (const WvIPNet &dest, const WvIPAddr &gw, int metric=0, const WvString &table="default") |
bool | isarp () |
int | addarp (const WvIPNet &proto, const WvAddr &hw, bool proxy) |
Public Attributes | |
WvString | name |
bool | valid |
Private Methods | |
int | getinfo (struct ifreq *ifr, int ioctl_num) |
void | fill_rte (struct rtentry *rte, char *ifname, const WvIPNet &dest, const WvIPAddr &gw, int metric) |
int | getinfo (struct ifreq *ifr, int ioctl_num) |
void | fill_rte (struct rtentry *rte, char *ifname, const WvIPNet &dest, const WvIPAddr &gw, int metric) |
Private Attributes | |
WvAddr * | my_hwaddr |
WvIPNet * | my_ipaddr |
WvLog | err |
WvAddr * | my_hwaddr |
WvIPNet * | my_ipaddr |
Definition at line 21 of file include/wvinterface.h.
|
Definition at line 28 of file wvinterface.cc. References my_hwaddr, my_ipaddr, name, WvString::unique(), and valid. |
|
Definition at line 37 of file wvinterface.cc. References rescan(). |
|
|
|
|
|
|
|
Definition at line 471 of file wvinterface.cc. References err, WvIPNet::is_host(), min, name, WvIPNet::netmask(), WvIPNet::network(), WvLog::perror(), WvAddr::sockaddr(), WvIPAddr::sockaddr(), WvAddr::sockaddr_len(), and WvIPAddr::sockaddr_len(). |
|
|
|
add a route to the given network through this interface. |
|
Definition at line 343 of file wvinterface.cc. References WvLog::Debug2, err, WvSubProc::estatus, fill_rte(), WvIPNet::is_default(), isup(), name, WvLog::perror(), WvSubProc::startv(), and WvSubProc::wait(). |
|
add a route to the given network through this interface. Definition at line 404 of file wvinterface.cc. Referenced by WvIPRouteList::set_kernel(). |
|
|
|
delete a route to the given network through this interface. |
|
Definition at line 411 of file wvinterface.cc. References WvLog::Debug2, err, WvSubProc::estatus, fill_rte(), WvIPNet::is_default(), name, WvLog::perror(), WvSubProc::startv(), and WvSubProc::wait(). |
|
delete a route to the given network through this interface. Definition at line 464 of file wvinterface.cc. Referenced by WvIPRouteList::set_kernel(). |
|
get the point-to-point IP address of this interface |
|
get the point-to-point IP address of this interface Definition at line 110 of file wvinterface.cc. |
|
|
|
get the current kernel flags |
|
get the current kernel flags Definition at line 120 of file wvinterface.cc. |
|
get/set information about an interface |
|
get/set information about an interface Definition at line 43 of file wvinterface.cc. References name. |
|
get the hardware address of this interface |
|
get the hardware address of this interface Definition at line 76 of file wvinterface.cc. References WvAddr::gen(), getinfo(), my_hwaddr, and WvEncap::Unknown. Referenced by WvInterfaceDict::islocal(), and WvInterfaceDict::update(). |
|
get the local IP net of this interface |
|
get the local IP net of this interface Definition at line 93 of file wvinterface.cc. References getinfo(), and my_ipaddr. Referenced by WvIPAliaser::Alias::Alias(), WvInterfaceDict::islocal(), WvInterfaceDict::on_local_net(), and setipaddr(). |
|
add an ARP entry on this interface |
|
add an ARP entry on this interface Definition at line 513 of file wvinterface.cc. References getflags(). |
|
turn promiscuous (see-all-packets) mode on or off. |
|
turn promiscuous (see-all-packets) mode on or off. Definition at line 201 of file wvinterface.cc. References getflags(). |
|
set the interface state up or down. |
|
set the interface state up or down. Definition at line 189 of file wvinterface.cc. References getflags(), and valid. Referenced by addroute(), WvIPAliaser::Alias::Alias(), and WvInterfaceDict::on_local_net(). |
|
|
|
Definition at line 195 of file wvinterface.cc. References setflags(). |
|
forget all stored information about the address(es) of this interface |
|
forget all stored information about the address(es) of this interface Definition at line 59 of file wvinterface.cc. References my_hwaddr, and my_ipaddr. Referenced by setipaddr(), up(), WvInterfaceDict::update(), and ~WvInterface(). |
|
toggle kernel flags on this netdevice. Be careful! |
|
toggle kernel flags on this netdevice. Be careful! Definition at line 144 of file wvinterface.cc. References err, name, and WvLog::perror(). |
|
Set the local address, netmask, and broadcast of this interface and set a route to the local net. |
|
Set the local address, netmask, and broadcast of this interface and set a route to the local net. Definition at line 207 of file wvinterface.cc. References WvIPNet::base(), WvIPNet::bits(), WvIPNet::broadcast(), err, WvLog::Info, ipaddr(), min, name, WvIPNet::netmask(), WvLog::perror(), rescan(), WvIPAddr::sockaddr(), and WvIPAddr::sockaddr_len(). Referenced by WvIPAliaser::Alias::Alias(). |
|
Set the MTU of the interface. |
|
Set the MTU of the interface. Definition at line 275 of file wvinterface.cc. References err, name, and WvLog::perror(). |
|
|
|
Definition at line 182 of file wvinterface.cc. References rescan(), and setflags(). Referenced by WvIPAliaser::Alias::Alias(), and WvIPAliaser::Alias::~Alias(). |
|
Definition at line 26 of file ipstreams/wvinterface.h. Referenced by addarp(), addroute(), delroute(), setflags(), setipaddr(), and setmtu(). |
|
Definition at line 23 of file ipstreams/wvinterface.h. |
|
Definition at line 23 of file include/wvinterface.h. Referenced by hwaddr(), rescan(), and WvInterface(). |
|
Definition at line 24 of file ipstreams/wvinterface.h. |
|
Definition at line 24 of file include/wvinterface.h. Referenced by ipaddr(), rescan(), and WvInterface(). |
|
Definition at line 41 of file ipstreams/wvinterface.h. Referenced by addarp(), addroute(), delroute(), getflags(), getinfo(), setflags(), setipaddr(), setmtu(), and WvInterface(). |
|
Definition at line 42 of file ipstreams/wvinterface.h. Referenced by getflags(), WvInterfaceDict::islocal(), isup(), WvInterfaceDict::on_local_net(), WvInterfaceDict::update(), and WvInterface(). |