include/iwconfig.h File Reference

#include <event.h>
#include <netinet/in.h>
#include <lowpan/lpstate.h>

Data Structures

struct  net_device
 IEEE 802.15.4 network link device abstraction. More...
struct  net_device_info
 IEEE 802.15.4 network link device information. More...

Defines

#define _IWCONFIG_H   1

Typedefs

typedef struct net_device net_device_t
typedef struct net_device_info net_device_info_t

Enumerations

enum  iwconfig_options {
  O_AUTHEN = 0x1, O_ENCRYPT = 0x2, O_SET_MAC_ADDRESS = 0x4, O_SET_KEY = 0x8,
  O_SET_TX_POWER = 0x12, O_NOT_DEFAULT_LP = 0x14, O_NO_LP = 0x16
}
enum  net_device_status_flags { IFF_DOWN = 0x1, IFF_UP = 0x2, IFF_LOOPBACK = 0x4, IFF_MULTICAST = 0x8 }
enum  { MAX_ADDR_LEN = 8, KEYSIZE = 16 }
enum  InterfaceEnum { LPAN0 = 1 }
enum  IwConfigCmdsEnum { UP = 1, DOWN, CONFIG, STATUS }

Functions

int16_t iwconfig (uint8_t name, uint16_t cmd, uint16_t options, const net_device_t *device_settings, void(*iwconfig_handler)(event_t event, void *cbargs, void *context), net_device_info_t *dev_info, void *context)

Define Documentation

#define _IWCONFIG_H   1


Typedef Documentation

typedef struct net_device net_device_t


Enumeration Type Documentation

anonymous enum

Storage sizes for device data structure abstraction.

Enumerator:
MAX_ADDR_LEN  64 bit MAC Address
KEYSIZE  128 bit security key size

Supported network interfaces.

Enumerator:
LPAN0 

Common configuration options for IEEE 15.4 radio. Multiple options can coexist as flags.

Enumerator:
O_AUTHEN  Enable authentication mode if supported
O_ENCRYPT  Enable encryption mode if supported
O_SET_MAC_ADDRESS  Set 64 bit MAC 15.4 address
O_SET_KEY  Set security key if supported
O_SET_TX_POWER  Set the radio's transmission power
O_NOT_DEFAULT_LP  Use non-default low power settings.
O_NO_LP  Set the radio to not use low power protocol.

iwconfig commands

Enumerator:
UP 
DOWN 
CONFIG 
STATUS 

Flags reflecting the current status of the 15.4 radio.

Enumerator:
IFF_DOWN  Link is down.
IFF_UP  Link is up and running.
IFF_LOOPBACK  Link loopback is supported
IFF_MULTICAST  Link local IPv6 multicast is supported


Function Documentation

int16_t iwconfig ( uint8_t  name,
uint16_t  cmd,
uint16_t  options,
const net_device_t device_settings,
void(*)(event_t event, void *cbargs, void *context)  iwconfig_handler,
net_device_info_t dev_info,
void *  context 
)

A system call to control and configure the wireless link interface. A continuation callback will be fired if iwconfig_handler is not NULL.

Parameters:
[in] name Interface name (e.g. The default 6LowPAN interface is "lpan0")
[in] cmd Support [UP, DOWN, CONFIG, STATUS]. See commands IwConfigCmdsEnum
  • UP power up interface
  • DOWN power down interface
  • CONFIG configure the radio based on options and device_settings
  • STATUS fills dev_info with current interface status
[in] options See iwconfig_options.
[in] device_settings Application specifies radio settings. Required for UP and CONFIG cmd.
[in] iwconfig_handler A continuation callback for the completion of the system call. Passing NULL here will fail the call.
[out] dev_info the results of the calls for the continatuion callback are stored here NULL cannot be passed.
[in] context application context
Returns:
0 if succeed or -1 if fail and errno is set appropriately.
Errors:
EBUSY if the underlying system is busy and cannot service the call at this time.
EINVAL if invalid parameters are passed.

Callback Descriptions

iwconfig_handler

Parameters:
[in] event Type is IWCONFIG in EventsEnum
[in] cbargs is dev_info in iwconfig()
[in] context is context in iwconfig()
Returns:
None.


Generated on Fri May 2 15:41:50 2008 for Arch Rock IP/6LoWPAN Evaluation Software Distribution by  doxygen 1.5.5