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) override |
| Get the object value as a text string to the specified NBString object.
|
|
virtual void | GetTypeValue (NBString &s) override |
| Assigns the object type value to the specified NBString object.
|
|
|
I4Record | ip4 {"IPv4"} |
| IPv4 configuration for "this" interface, see config_netobj.h for details.
|
|
I6Record | ip6 {"IPv6"} |
| IPv6 configuration for "this" interface, see config_netobj.h for details.
|
|
config_MACADR | MAC {"00:00:00:00:00:00", "MAC"} |
| Interface MAC address. May be 0 or null for interfaces such as PPP.
|
|
config_string | device_name {"", "DeviceName"} |
| Name of interface. Used to register for DNS and NetBIOS.
|
|
config_string | net_domain {"", "NetworkDomain"} |
| Network Domain.
|
|
config_int | dhcp_discover_secs {1, "DhcpDiscoverSec"} |
| Seconds to delay after boot before sending a DHCP Discover message.
|
|
config_string | discovery_server {"discover.netburner.com/DevicePost", "DiscoveryReportUrl"} |
| NetBurner discover server name.
|
|
config_int | discovery_interval {(15 * 60), "DiscoveryReportInterval"} |
| How often to report to the NetBurner discover server.
|
|
config_bool | obfuscate_discovery {true, "DiscoveryObfuscate", "Should discovery obfuscate data"} |
| Obfuscate data instead of plain text.
|
|
config_bool | supress_default_responses {false, "SupressDefault", "Supress ping and udp Echo ports"} |
| Disable Ping and Echo (port 7)
|
|
config_int | vlan_tag_value {0, "VlanTag"} |
| VLAN tag.
|
|
int32_t | root_if |
| Root interface number. If multihomed, the interface would be a child of the root interface.
|
|
int32_t | my_ifnum |
| This interface number.
|
|
uint16_t | netMss |
| Network max segment size for this interface.
|
|
uint8_t | checksumOffload |
| Non-zero if hardware interface support offloading checksum calculation.
|
|
bool | bHaveSeenLink |
| True if a link has been present previously at least once.
|
|
DhcpObject | dhcpClient {this} |
| DHCP client support.
|
|
discover_servlet | disco_servlet {this} |
| The servlet that runs the NetBurner discovery server process.
|
|
void(* | MCastLinkNotify )(InterfaceBlock *pBlock, bool bLink) |
| A funciton pointer called when link changes for multicast.
|
|
IPADDR4 | previous_addr |
| Previous IPv4 address.
|
|
IPADDR4 | previous_mask |
| Previous IPv4 mask.
|
|
IPADDR4 | previous_gate |
| Previous IPv4 gateway.
|
|
AutoIPClient | AutoClient |
| AutoIP client object for this interface.
|
|
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, 100, or 1000, representing the Mbps speed
- See also
- InterfaceLinkSpeed()
◆ RegisterInterface()
void InterfaceBlock::RegisterInterface |
( |
| ) |
|
The documentation for this class was generated from the following file: