C# Class OpenHome.Net.Core.NetworkAdapter

A network adapter.
Mostrar archivo Open project: openhome/ohNet Class Usage Examples

Public Methods

Method Description
AddRef ( string aCookie ) : void

Claim a reference to the network adapter.

Can only be called from code that can guarantee another reference is already held. Each call to AddRef() must later have exactly one matching call to RemoveRef().

Address ( ) : uint

Get the ip address for the network interface.

FullName ( ) : string

Get the full name for a given network interface.

Mask ( ) : uint

Get the netmask for the network interface.

Name ( ) : string

Get the name for a given network interface.

NetworkAdapter ( IntPtr aHandle ) : System

Constructor. Not intended for external use.

Network adapters should be constructed via the SubnetList classes.

RemoveRef ( string aCookie ) : void

Remove a reference to the network adapter.

Removing the final reference causes the network adapter to be deleted.

Subnet ( ) : uint

Get the subnet address for the network interface.

Private Methods

Method Description
AddManagedCookie ( string aCookie, IntPtr aCString ) : CookieWrapper
Handle ( ) : IntPtr
OhNetNetworkAdapterAddRef ( IntPtr aNif, IntPtr aCookie ) : void
OhNetNetworkAdapterAddress ( IntPtr aNif ) : uint
OhNetNetworkAdapterFullName ( IntPtr aNif ) : IntPtr
OhNetNetworkAdapterMask ( IntPtr aNif ) : uint
OhNetNetworkAdapterName ( IntPtr aNif ) : IntPtr
OhNetNetworkAdapterRemoveRef ( IntPtr aNif, IntPtr aCookie ) : void
OhNetNetworkAdapterSubnet ( IntPtr aNif ) : uint

Method Details

AddRef() public method

Claim a reference to the network adapter.
Can only be called from code that can guarantee another reference is already held. Each call to AddRef() must later have exactly one matching call to RemoveRef().
public AddRef ( string aCookie ) : void
aCookie string
return void

Address() public method

Get the ip address for the network interface.
public Address ( ) : uint
return uint

FullName() public method

Get the full name for a given network interface.
public FullName ( ) : string
return string

Mask() public method

Get the netmask for the network interface.
public Mask ( ) : uint
return uint

Name() public method

Get the name for a given network interface.
public Name ( ) : string
return string

NetworkAdapter() public method

Constructor. Not intended for external use.
Network adapters should be constructed via the SubnetList classes.
public NetworkAdapter ( IntPtr aHandle ) : System
aHandle System.IntPtr Handle to the underlying native network adapter.
return System

RemoveRef() public method

Remove a reference to the network adapter.
Removing the final reference causes the network adapter to be deleted.
public RemoveRef ( string aCookie ) : void
aCookie string
return void

Subnet() public method

Get the subnet address for the network interface.
public Subnet ( ) : uint
return uint