Mistake on this page?
Report an issue in GitHub or email us
Typedefs | Enumerator | Functions | Variables
WHD Event handling API

Functions that allow user applications to receive event callbacks and set event handlers. More...

Typedefs

typedef void *(* whd_event_handler_t) (whd_interface_t ifp, const whd_event_header_t *event_header, const uint8_t *event_data, void *handler_user_data)
 Event handler prototype definition. More...
 
typedef void *(* whd_error_handler_t) (whd_driver_t whd_driver, const uint8_t *error_type, const uint8_t *event_data, void *handler_user_data)
 Error handler prototype definition. More...
 

Functions

uint32_t whd_wifi_set_event_handler (whd_interface_t ifp, const uint32_t *event_type, whd_event_handler_t handler_func, void *handler_user_data, uint16_t *event_index)
 Registers a handler to receive event callbacks. More...
 
uint32_t whd_wifi_set_error_handler (whd_interface_t ifp, const uint8_t *error_nums, whd_error_handler_t handler_func, void *handler_user_data, uint16_t *error_index)
 Registers a handler to receive error callbacks. More...
 
uint32_t whd_wifi_deregister_event_handler (whd_interface_t ifp, uint16_t event_index)
 Delete/Deregister the event entry where callback is registered. More...
 
uint32_t whd_wifi_deregister_error_handler (whd_interface_t ifp, uint16_t error_index)
 Delete/Deregister the error entry where callback is registered. More...
 

Variables

uint16_t subtype
 Vendor specific..32769. More...
 
uint16_t length
 Length of ethernet header. More...
 
uint8_t version
 Version is 0. More...
 
uint8_t oui [3]
 Organizationally Unique Identifier. More...
 
uint16_t usr_subtype
 User specific data. More...
 
whd_mac_t destination_address
 Ethernet destination address. More...
 
whd_mac_t source_address
 Ethernet source address. More...
 
uint16_t ethertype
 Ethertype for identifying event packets. More...
 
uint16_t version
 Version. More...
 
uint16_t flags
 see flags below More...
 
uint32_t event_type
 Event type indicating a response from firmware for IOCTLs/IOVARs sent. More...
 
uint32_t status
 Status code corresponding to any event type. More...
 
uint32_t reason
 Reason code associated with the event occurred. More...
 
uint32_t auth_type
 WLC_E_AUTH: 802.11 AUTH request. More...
 
uint32_t datalen
 Length of data in event message. More...
 
whd_mac_t addr
 Station address (if applicable) More...
 
char ifname [16]
 name of the incoming packet interface More...
 
uint8_t ifidx
 destination OS i/f index More...
 
uint8_t bsscfgidx
 source bsscfg index More...
 
whd_event_ether_header_t eth
 Variable to store ethernet destination, source and ethertype in event packets. More...
 
whd_event_eth_hdr_t eth_evt_hdr
 Variable to store ethernet header fields in event message. More...
 
whd_event_header_t whd_event
 Variable to store rest of the event packet fields after ethernet header. More...
 

Detailed Description

Functions that allow user applications to receive event callbacks and set event handlers.

Functions that allow user applications to receive error callbacks and set error handlers.

Typedef Documentation

typedef void*(* whd_error_handler_t) (whd_driver_t whd_driver, const uint8_t *error_type, const uint8_t *event_data, void *handler_user_data)

Error handler prototype definition.

Parameters
whd_driverPointer to handle instance of whd driver
error_typewhd error type
event_dataevent data
handler_user_datasemaphore data

Definition at line 200 of file whd_events.h.

typedef void*(* whd_event_handler_t) (whd_interface_t ifp, const whd_event_header_t *event_header, const uint8_t *event_data, void *handler_user_data)

Event handler prototype definition.

Parameters
ifpPointer to handle instance of whd interface
event_headerwhd event header
event_dataevent data
handler_user_datasemaphore data

Definition at line 187 of file whd_events.h.

Function Documentation

uint32_t whd_wifi_deregister_error_handler ( whd_interface_t  ifp,
uint16_t  error_index 
)

Delete/Deregister the error entry where callback is registered.

Parameters
ifpPointer to handle instance of whd interface
error_indexError index obtained during registration by whd_wifi_set_error_handler
Returns
WHD_SUCCESS or Error code
uint32_t whd_wifi_deregister_event_handler ( whd_interface_t  ifp,
uint16_t  event_index 
)

Delete/Deregister the event entry where callback is registered.

Parameters
ifpPointer to handle instance of whd interface
event_indexEvent index obtained during registration by whd_wifi_set_event_handler
Returns
WHD_SUCCESS or Error code
uint32_t whd_wifi_set_error_handler ( whd_interface_t  ifp,
const uint8_t *  error_nums,
whd_error_handler_t  handler_func,
void *  handler_user_data,
uint16_t *  error_index 
)

Registers a handler to receive error callbacks.

This function registers a callback handler to be notified when a particular event is received.

Note
Currently each event may only be registered to one handler and there is a limit to the number of simultaneously registered events. Maximum of 5 event handlers can registered simultaneously, this also includes the internal event handler registration which happens during scan, join and starting an AP.
Parameters
ifpPointer to handle instance of whd interface
error_numsPointer to the event list as WLC_ERR_BUS and WLC_ERR_FW
handler_funcA function pointer to the handler callback
handler_user_dataA pointer value which will be passed to the event handler function at the time an event is triggered (NULL is allowed)
error_indexEntry where the error handler is registered in the list
Returns
WHD_SUCCESS or Error code
uint32_t whd_wifi_set_event_handler ( whd_interface_t  ifp,
const uint32_t *  event_type,
whd_event_handler_t  handler_func,
void *  handler_user_data,
uint16_t *  event_index 
)

Registers a handler to receive event callbacks.

This function registers a callback handler to be notified when a particular event is received.

Note
Currently each event may only be registered to one handler and there is a limit to the number of simultaneously registered events. Maximum of 5 event handlers can registered simultaneously, this also includes the internal event handler registration which happens during scan, join and starting an AP.
Parameters
ifpPointer to handle instance of whd interface
event_typePointer to the event list array
handler_funcA function pointer to the handler callback
handler_user_dataA pointer value which will be passed to the event handler function at the time an event is triggered (NULL is allowed)
event_indexEntry where the event handler is registered in the list
Returns
WHD_SUCCESS or Error code

Variable Documentation

whd_mac_t addr

Station address (if applicable)

Definition at line 157 of file whd_events.h.

uint32_t auth_type

WLC_E_AUTH: 802.11 AUTH request.

Definition at line 155 of file whd_events.h.

uint8_t bsscfgidx

source bsscfg index

Definition at line 160 of file whd_events.h.

uint32_t datalen

Length of data in event message.

Definition at line 156 of file whd_events.h.

whd_mac_t destination_address

Ethernet destination address.

Definition at line 140 of file whd_events.h.

Variable to store ethernet destination, source and ethertype in event packets.

Definition at line 168 of file whd_events.h.

whd_event_eth_hdr_t eth_evt_hdr

Variable to store ethernet header fields in event message.

Definition at line 169 of file whd_events.h.

uint16_t ethertype

Ethertype for identifying event packets.

Definition at line 142 of file whd_events.h.

uint32_t event_type

Event type indicating a response from firmware for IOCTLs/IOVARs sent.

Definition at line 152 of file whd_events.h.

uint16_t flags

see flags below

Definition at line 151 of file whd_events.h.

uint8_t ifidx

destination OS i/f index

Definition at line 159 of file whd_events.h.

char ifname[16 ]

name of the incoming packet interface

Definition at line 158 of file whd_events.h.

uint16_t length

Length of ethernet header.

Definition at line 129 of file whd_events.h.

uint8_t oui[3]

Organizationally Unique Identifier.

Definition at line 131 of file whd_events.h.

uint32_t reason

Reason code associated with the event occurred.

Definition at line 154 of file whd_events.h.

whd_mac_t source_address

Ethernet source address.

Definition at line 141 of file whd_events.h.

uint32_t status

Status code corresponding to any event type.

Definition at line 153 of file whd_events.h.

uint16_t subtype

Vendor specific..32769.

Definition at line 128 of file whd_events.h.

uint16_t usr_subtype

User specific data.

Definition at line 132 of file whd_events.h.

uint8_t version

Version is 0.

Definition at line 130 of file whd_events.h.

uint16_t version

Version.

Definition at line 150 of file whd_events.h.

whd_event_header_t whd_event

Variable to store rest of the event packet fields after ethernet header.

Definition at line 170 of file whd_events.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.