Network interface configuration block class for interface control and configuration.
More...
#include <netinterface.h>
Inherits config_obj.
Inherited by EtherLikeInterface, MultiHomeInterface, and PPPInterface.
|
| InterfaceBlock (const char *name, const char *desc=NULL) |
| Constructor with interface name and description.
|
|
| InterfaceBlock (config_obj &owner, const char *name, const char *desc=NULL) |
| Constructor with config_obj owner, interface name and description.
|
|
void | RegisterInterface () |
| Register a network interface with system.
|
|
virtual void | EnableMulticast (MACADR macAddress, BOOL addAddress)=0 |
| Enable Multicast on this interface.
|
|
virtual bool | LinkActive ()=0 |
| Returns the link status of the network interface.
|
|
virtual int | LinkSpeed ()=0 |
| Returns the link speed of the network interface.
|
|
virtual bool | LinkDuplex ()=0 |
| Returns the full or half link duplex of the network interface.
|
|
void | InterfaceLinkChange (bool link) |
| Change the link status of the network interface.
|
|
virtual const char * | GetInterfaceName () |
| Returns the interface name network interface.
|
|
int | GetInterfaceNumber () |
| Returns the Interface Number of the network interface.
|
|
bool | IsRootInterface () |
| Returns true if this is the first interface in the interface list.
|
|
| config_obj (config_obj &owner, const char *name, const char *desc) |
| Object constructor with the parent/owner leaf parameter.
|
|
| config_obj (const char *name, const char *desc) |
| Object constructor.
|
|
virtual void | GetTextValue (NBString &s) |
| Get the object value as a text string to the specified NBString object.
|
|
virtual void | GetTypeValue (NBString &s) |
| Assigns the object type value to the specified NBString object.
|
|
Network interface configuration block class for interface control and configuration.
Network Interfaces are configured and controlled C++ InterfaceBlock objects. The InterfaceBlock contains variables and member functions for things such as:
- The Configuration Server interface
- IP settings for both IPv4 and IPv6 types
- Configuration to static or DHCP, and DHCP status (both v4 and v6)
- Multihome
- Routing
- AutoIP
- Note
- While the recommended method for getting and setting network interface parameters is to obtain a pointer to an InterfaceBlock, there are also non-member functions of the object that can be used for situations that are best served by a single function call, such as just getting a single IP address of an interface. When using those functions pay special attention to the return value type. While IPADDR should be used because it supports both IPADDR4 and IPADDR6 types automatically, some of these helper functions may specifically return an IPADDR4 type.
◆ InterfaceBlock() [1/2]
InterfaceBlock::InterfaceBlock |
( |
const char * | name, |
|
|
const char * | desc = NULL ) |
Constructor with interface name and description.
- Parameters
-
name | Interface name. |
desc | Interface description. If not used, default is null. |
◆ InterfaceBlock() [2/2]
InterfaceBlock::InterfaceBlock |
( |
config_obj & | owner, |
|
|
const char * | name, |
|
|
const char * | desc = NULL ) |
Constructor with config_obj owner, interface name and description.
- Parameters
-
owner | Reference to config_obj owner of the interface |
name | Interface name. |
desc | Interface description. If not used, default is null. |
◆ EnableMulticast()
virtual void InterfaceBlock::EnableMulticast |
( |
MACADR | macAddress, |
|
|
BOOL | addAddress ) |
|
pure virtual |
◆ GetInterfaceName()
virtual const char * InterfaceBlock::GetInterfaceName |
( |
| ) |
|
|
virtual |
Returns the interface name network interface.
- Returns
- Pointer to a character string containing the name of the network interface
- See also
- InterfaceName()
◆ GetInterfaceNumber()
int InterfaceBlock::GetInterfaceNumber |
( |
| ) |
|
|
inline |
◆ InterfaceLinkChange()
void InterfaceBlock::InterfaceLinkChange |
( |
bool | link | ) |
|
Change the link status of the network interface.
- Parameters
-
link | Set link active status to true or false |
◆ IsRootInterface()
bool InterfaceBlock::IsRootInterface |
( |
| ) |
|
|
inline |
Returns true if this is the first interface in the interface list.
- Returns
- True if this is the first interface in the interface list, otherwise false
◆ LinkActive()
virtual bool InterfaceBlock::LinkActive |
( |
| ) |
|
|
pure virtual |
◆ LinkDuplex()
virtual bool InterfaceBlock::LinkDuplex |
( |
| ) |
|
|
pure virtual |
Returns the full or half link duplex of the network interface.
- Returns
- True if full duplex, false if half duplex
- See also
- InterfaceLinkDuplex()
◆ LinkSpeed()
virtual int InterfaceBlock::LinkSpeed |
( |
| ) |
|
|
pure virtual |
Returns the link speed of the network interface.
- Returns
- 10 or 100 representing the Mbps speed
- See also
- InterfaceLinkSpeed()
◆ RegisterInterface()
void InterfaceBlock::RegisterInterface |
( |
| ) |
|
The documentation for this class was generated from the following file: