C# Class NativeWifi.WlanClient.WlanInterface

Represents a Wifi network interface.
Exibir arquivo Open project: ATNoG/ODTONE Class Usage Examples

Public Methods

Method Description
Connect ( Wlan connectionMode, Wlan bssType, Wlan ssid, Wlan flags ) : void

Connects to the specified wireless network.

The method returns immediately. Progress is reported through the WlanNotification event.

Connect ( Wlan connectionMode, Wlan bssType, string profile ) : void

Requests a connection (association) to the specified wireless network.

The method returns immediately. Progress is reported through the WlanNotification event.

ConnectSynchronously ( Wlan connectionMode, Wlan bssType, string profile, int connectTimeout ) : bool

Connects (associates) to the specified wireless network, returning either on a success to connect or a failure.

DeleteProfile ( string profileName ) : void

Deletes a profile.

Disconnect ( ) : void

Disconnects to a network

GetAvailableNetworkList ( Wlan flags ) : NativeWifi.Wlan.WlanAvailableNetwork[]

Retrieves the EventList of available networks.

GetNetworkBssList ( ) : NativeWifi.Wlan.WlanBssEntry[]

Retrieves the basic service sets (BSS) EventList of all available networks.

GetNetworkBssList ( Wlan ssid, Wlan bssType, bool securityEnabled ) : NativeWifi.Wlan.WlanBssEntry[]

Retrieves the basic service sets (BSS) EventList of the specified network.

GetProfileXml ( string profileName ) : string

Gets the profile'line XML specification.

GetProfiles ( ) : NativeWifi.Wlan.WlanProfileInfo[]

Gets the information of all profiles on this interface.

Scan ( ) : void

Requests a scan for available networks.

The method returns immediately. Progress is reported through the WlanNotification event.

SetProfile ( Wlan flags, string profileXml, bool overwrite ) : Wlan.WlanReasonCode

Sets the profile.

UpdateSSIDs ( Wlan bssList ) : bool

Protected Methods

Method Description
Connect ( Wlan connectionParams ) : void

Connects to a network defined by a connection parameters structure.

Private Methods

Method Description
ConvertAvailableNetworkListPtr ( IntPtr availNetListPtr ) : NativeWifi.Wlan.WlanAvailableNetwork[]

Converts a pointer to a available networks EventList (header + entries) to an array of available network entries.

ConvertBssListPtr ( IntPtr bssListPtr ) : NativeWifi.Wlan.WlanBssEntry[]

Converts a pointer to a BSS EventList (header + entries) to an array of BSS entries.

EnqueueEvent ( object queuedEvent ) : void

Enqueues a notification event to be processed serially.

GetInterfaceInt ( Wlan opCode ) : int

Gets a parameter of the interface whose data type is int.

OnWlanConnection ( Wlan notifyData, Wlan connNotifyData ) : void
OnWlanNotification ( Wlan notifyData ) : void
OnWlanReason ( Wlan notifyData, Wlan reasonCode ) : void
SetInterfaceInt ( Wlan opCode, int value ) : void

Sets a parameter of the interface whose data type is int.

WlanInterface ( WlanClient client, Wlan info ) : System
sameSSID ( byte ssid1, byte ssid2 ) : bool

Method Details

Connect() protected method

Connects to a network defined by a connection parameters structure.
protected Connect ( Wlan connectionParams ) : void
connectionParams Wlan The connection paramters.
return void

Connect() public method

Connects to the specified wireless network.
The method returns immediately. Progress is reported through the WlanNotification event.
public Connect ( Wlan connectionMode, Wlan bssType, Wlan ssid, Wlan flags ) : void
connectionMode Wlan
bssType Wlan
ssid Wlan
flags Wlan
return void

Connect() public method

Requests a connection (association) to the specified wireless network.
The method returns immediately. Progress is reported through the WlanNotification event.
public Connect ( Wlan connectionMode, Wlan bssType, string profile ) : void
connectionMode Wlan
bssType Wlan
profile string
return void

ConnectSynchronously() public method

Connects (associates) to the specified wireless network, returning either on a success to connect or a failure.
public ConnectSynchronously ( Wlan connectionMode, Wlan bssType, string profile, int connectTimeout ) : bool
connectionMode Wlan
bssType Wlan
profile string
connectTimeout int
return bool

DeleteProfile() public method

Deletes a profile.
public DeleteProfile ( string profileName ) : void
profileName string /// The name of the profile to be deleted. Profile names are case-sensitive. /// On Windows XP SP2, the supplied name must match the profile name derived automatically from the SSID of the network. For an infrastructure network profile, the SSID must be supplied for the profile name. For an ad hoc network profile, the supplied name must be the SSID of the ad hoc network followed by -adhoc. ///
return void

Disconnect() public method

Disconnects to a network
public Disconnect ( ) : void
return void

GetAvailableNetworkList() public method

Retrieves the EventList of available networks.
public GetAvailableNetworkList ( Wlan flags ) : NativeWifi.Wlan.WlanAvailableNetwork[]
flags Wlan Controls the type of networks returned.
return NativeWifi.Wlan.WlanAvailableNetwork[]

GetNetworkBssList() public method

Retrieves the basic service sets (BSS) EventList of all available networks.
public GetNetworkBssList ( ) : NativeWifi.Wlan.WlanBssEntry[]
return NativeWifi.Wlan.WlanBssEntry[]

GetNetworkBssList() public method

Retrieves the basic service sets (BSS) EventList of the specified network.
public GetNetworkBssList ( Wlan ssid, Wlan bssType, bool securityEnabled ) : NativeWifi.Wlan.WlanBssEntry[]
ssid Wlan Specifies the SSID of the network from which the BSS EventList is requested.
bssType Wlan Indicates the BSS type of the network.
securityEnabled bool Indicates whether security is enabled on the network.
return NativeWifi.Wlan.WlanBssEntry[]

GetProfileXml() public method

Gets the profile'line XML specification.
public GetProfileXml ( string profileName ) : string
profileName string The name of the profile.
return string

GetProfiles() public method

Gets the information of all profiles on this interface.
public GetProfiles ( ) : NativeWifi.Wlan.WlanProfileInfo[]
return NativeWifi.Wlan.WlanProfileInfo[]

Scan() public method

Requests a scan for available networks.
The method returns immediately. Progress is reported through the WlanNotification event.
public Scan ( ) : void
return void

SetProfile() public method

Sets the profile.
public SetProfile ( Wlan flags, string profileXml, bool overwrite ) : Wlan.WlanReasonCode
flags Wlan The flags to set on the profile.
profileXml string The XML representation of the profile. On Windows XP SP 2, special care should be taken to adhere to its limitations.
overwrite bool If a profile by the given name already exists, then specifies whether to overwrite it (if true) or return an error (if false).
return Wlan.WlanReasonCode

UpdateSSIDs() public method

public UpdateSSIDs ( Wlan bssList ) : bool
bssList Wlan
return bool