C# Class NativeWifi.WlanClient.WlanInterface

Represents a Wifi network interface.
Afficher le fichier Open project: ATNoG/ODTONE Class Usage Examples

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
Connect ( Wlan connectionParams ) : void

Connects to a network defined by a connection parameters structure.

Private Methods

Méthode 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 méthode

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

Connect() public méthode

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
Résultat void

Connect() public méthode

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
Résultat void

ConnectSynchronously() public méthode

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
Résultat bool

DeleteProfile() public méthode

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. ///
Résultat void

Disconnect() public méthode

Disconnects to a network
public Disconnect ( ) : void
Résultat void

GetAvailableNetworkList() public méthode

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

GetNetworkBssList() public méthode

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

GetNetworkBssList() public méthode

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.
Résultat NativeWifi.Wlan.WlanBssEntry[]

GetProfileXml() public méthode

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

GetProfiles() public méthode

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

Scan() public méthode

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

SetProfile() public méthode

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).
Résultat Wlan.WlanReasonCode

UpdateSSIDs() public méthode

public UpdateSSIDs ( Wlan bssList ) : bool
bssList Wlan
Résultat bool