NetworkAdapterInterface Class Reference

#include <network_ip.h>

Detailed Description

The NetworkAdapterInterface represents a physical Ethernet connection.

Public Member Functions

MAXON_METHOD Result< IntGetAdapterIndex () const
 
MAXON_METHOD String GetName () const
 
MAXON_METHOD Result< BaseArray< UChar > > GetMacAddress () const
 
MAXON_METHOD Bool SetMacAddress (const BaseArray< UChar > &macAddress)
 
MAXON_METHOD void SetInterfaceName (const String &interfaceName)
 
MAXON_METHOD String GetInterfaceName () const
 
MAXON_METHOD Result< void > Append (const NetworkIpAddr &ipAddr, const NetworkIpAddr &broadcastAddress, const NetworkIpAddr &subnetMask)
 
MAXON_METHOD Int64 GetLinkSpeed () const
 
MAXON_METHOD void SetLinkSpeed (Int64 linkSpeed)
 
MAXON_METHOD Bool IsSetViaDhcp () const
 
MAXON_METHOD void SetViaDhcp (Bool setViaDhcp)
 
MAXON_METHOD String GetDescription () const
 
MAXON_METHOD void SetDescription (const String &description)
 
MAXON_METHOD void SetInterfaceIndex (Int interfaceIndex)
 
MAXON_METHOD Int GetInterfaceIndex () const
 
MAXON_METHOD Bool IsLoopback () const
 
MAXON_METHOD void SetLoopback (Bool isLoopback)
 
MAXON_METHOD Result< BaseArray< NetworkIpAddressStruct > > GetIpAddresses () const
 
MAXON_METHOD DataDictionary GetCustomData () const
 
MAXON_METHOD HashInt GetHashCode () const
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (NetworkAdapterInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.networkadapter")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( NetworkAdapterInterface  ,
MAXON_REFERENCE_COPY_ON_WRITE  ,
"net.maxon.interface.networkadapter"   
)
private

◆ GetAdapterIndex()

MAXON_METHOD Result<Int> GetAdapterIndex ( ) const

Returns the index of the adapter. This value is system dependent.

◆ GetName()

MAXON_METHOD String GetName ( ) const

Returns the name of the network adapter.

◆ GetMacAddress()

MAXON_METHOD Result<BaseArray<UChar> > GetMacAddress ( ) const

Returns the mac address of the adapter.

Returns
Array with the adapter mac address. Usually the mac address contains 6 characters. You can use NetworkIpInterface::MacAddressToString() to convert the address to a string.

◆ SetMacAddress()

MAXON_METHOD Bool SetMacAddress ( const BaseArray< UChar > &  macAddress)

◆ SetInterfaceName()

MAXON_METHOD void SetInterfaceName ( const String interfaceName)

◆ GetInterfaceName()

MAXON_METHOD String GetInterfaceName ( ) const

◆ Append()

MAXON_METHOD Result<void> Append ( const NetworkIpAddr ipAddr,
const NetworkIpAddr broadcastAddress,
const NetworkIpAddr subnetMask 
)

◆ GetLinkSpeed()

MAXON_METHOD Int64 GetLinkSpeed ( ) const

◆ SetLinkSpeed()

MAXON_METHOD void SetLinkSpeed ( Int64  linkSpeed)

◆ IsSetViaDhcp()

MAXON_METHOD Bool IsSetViaDhcp ( ) const

◆ SetViaDhcp()

MAXON_METHOD void SetViaDhcp ( Bool  setViaDhcp)

◆ GetDescription()

MAXON_METHOD String GetDescription ( ) const

Returns a description of the network adapter.

◆ SetDescription()

MAXON_METHOD void SetDescription ( const String description)

◆ SetInterfaceIndex()

MAXON_METHOD void SetInterfaceIndex ( Int  interfaceIndex)

◆ GetInterfaceIndex()

MAXON_METHOD Int GetInterfaceIndex ( ) const

◆ IsLoopback()

MAXON_METHOD Bool IsLoopback ( ) const

TODO: (Sebastian) please explain what this is.

◆ SetLoopback()

MAXON_METHOD void SetLoopback ( Bool  isLoopback)

◆ GetIpAddresses()

MAXON_METHOD Result<BaseArray<NetworkIpAddressStruct> > GetIpAddresses ( ) const

Returns the number of ip addresses connected to this adapter. This defines the valid range for GetIpAddress(), GetBroadcastAddress() and GetSubnetMask().

◆ GetCustomData()

MAXON_METHOD DataDictionary GetCustomData ( ) const

Returns custom data connected to this device. Currently unused.

◆ GetHashCode()

MAXON_METHOD HashInt GetHashCode ( ) const

Returns the hash code of the object.