|
libwebsockets
Lightweight C library for HTML5 websockets
|
Go to the source code of this file.
Data Structures | |
| struct | lws_netdev_config |
| struct | lws_netdev_ops |
| struct | lws_netdevs |
| struct | lws_netdev_instance |
| struct | lws_wifi_creds |
| struct | lws_netdev_instance_wifi |
| struct | lws_wifi_sta |
Macros | |
| #define | LWS_WIFI_MAX_SCAN_TRACK 16 |
| #define | LWS_ETH_ALEN 6 |
| #define | rssi_averaged(_x) |
| #define | lws_netdev_wifi_plat_ops |
Typedefs | |
| typedef uint8_t | lws_wifi_ch_t |
| typedef int8_t | lws_wifi_rssi_t |
| typedef struct lws_netdev_config | lws_netdev_config_t |
| typedef struct lws_netdev_ops | lws_netdev_ops_t |
| typedef struct lws_netdevs | lws_netdevs_t |
| typedef struct lws_netdev_instance | lws_netdev_instance_t |
| typedef struct lws_wifi_creds | lws_wifi_creds_t |
| typedef struct lws_netdev_instance_wifi | lws_netdev_instance_wifi_t |
| typedef struct lws_wifi_sta | lws_wifi_sta_t |
Enumerations | |
| enum | lws_netdev_type_t { LWSNDTYP_UNKNOWN , LWSNDTYP_WIFI , LWSNDTYP_ETH } |
| enum | { LNDIW_ALG_OPEN , LNDIW_ALG_WPA2 , LNDIW_MODE_STA = (1 << 0) , LNDIW_MODE_AP = (1 << 1) , LNDIW_UP = (1 << 7) , LNDIW_ACQ_IPv4 = (1 << 0) , LNDIW_ACQ_IPv6 = (1 << 1) } |
| enum | lws_netdev_wifi_state_t { LWSNDVWIFI_STATE_INITIAL , LWSNDVWIFI_STATE_SCAN , LWSNDVWIFI_STATE_AP , LWSNDVWIFI_STATE_AP_SCAN , LWSNDVWIFI_STATE_STAT_GRP_AP , LWSNDVWIFI_STATE_STAT_GRP_AP_SCAN , LWSNDVWIFI_STATE_STAT , LWSNDVWIFI_STATE_STAT_HAPPY } |
| struct lws_netdev_config |
Definition at line 42 of file lws-netdev.h.
Collaboration diagram for lws_netdev_config:| Data Fields | ||
|---|---|---|
| void * | plat_config | |
| struct lws_netdev_ops |
Definition at line 50 of file lws-netdev.h.
Collaboration diagram for lws_netdev_ops:| Data Fields | ||
|---|---|---|
| struct lws_netdev_instance *(*)(struct lws_context *ctx, const struct lws_netdev_ops *ops, const char *name, void *platinfo) | create | |
| int(*)(struct lws_netdev_instance *nd, lws_netdev_config_t *config) | configure | |
| int(*)(struct lws_netdev_instance *nd) | up | |
| int(*)(struct lws_netdev_instance *nd) | down | |
| int(*)(struct lws_netdev_instance *nd, lws_usec_t timestamp, void *buf, size_t len) | event |
these are SMD events coming from lws event loop thread context |
| void(*)(struct lws_netdev_instance **pnd) | destroy | |
| int(*)(struct lws_netdev_instance *wnd, const char *ssid, const char *passphrase, uint8_t *bssid) | connect | |
| void(*)(struct lws_netdev_instance *nd) | scan | |
| struct lws_netdevs |
Definition at line 75 of file lws-netdev.h.
Collaboration diagram for lws_netdevs:| Data Fields | ||
|---|---|---|
| lws_dll2_owner_t | owner |
list of netdevs / lws_netdev_instance_t -based objects |
| lws_dll2_owner_t | owner_creds |
list of known credentials |
| struct lwsac * | ac_creds |
lwsac holding retreived credentials settings, or NULL |
| lws_settings_instance_t * | si | |
| lws_sockaddr46 | sa46_dns_resolver | |
| uint8_t | refcount_creds |
when there are multiple netdevs, must refcount creds in mem |
| struct lws_netdev_instance |
Definition at line 96 of file lws-netdev.h.
Collaboration diagram for lws_netdev_instance:| Data Fields | ||
|---|---|---|
| const char * | name | |
| const lws_netdev_ops_t * | ops | |
| void * | platinfo | |
| lws_dll2_t | list | |
| uint8_t | mac[LWS_ETH_ALEN] | |
| uint8_t | type | |
| struct lws_wifi_creds |
Definition at line 171 of file lws-netdev.h.
Collaboration diagram for lws_wifi_creds:| Data Fields | ||
|---|---|---|
| lws_dll2_t | list | |
| uint8_t | bssid[LWS_ETH_ALEN] | |
| char | passphrase[64] | |
| char | ssid[33] | |
| uint8_t | alg | |
| struct lws_netdev_instance_wifi |
Definition at line 184 of file lws-netdev.h.
Collaboration diagram for lws_netdev_instance_wifi:| Data Fields | ||
|---|---|---|
| lws_netdev_instance_t | inst | |
| lws_dll2_owner_t | scan | |
| lws_sorted_usec_list_t | sul_scan | |
| lws_wifi_creds_t * | ap_cred | |
| const char * | ap_ip | |
| const char * | sta_ads | |
| char | current_attempt_ssid[33] | |
| uint8_t | current_attempt_bssid[LWS_ETH_ALEN] | |
| uint8_t | flags | |
| uint8_t | state | |
| struct lws_wifi_sta |
Definition at line 205 of file lws-netdev.h.
Collaboration diagram for lws_wifi_sta:| Data Fields | ||
|---|---|---|
| lws_dll2_t | list | |
| uint32_t | last_seen | |
| uint32_t | last_tried | |
| uint8_t | bssid[LWS_ETH_ALEN] | |
| char * | ssid | |
| uint8_t | ssid_len | |
| lws_wifi_ch_t | ch | |
| lws_wifi_rssi_t | rssi[8] | |
| int16_t | rssi_avg | |
| uint8_t | authmode | |
| uint8_t | rssi_count | |
| uint8_t | rssi_next | |
| #define LWS_WIFI_MAX_SCAN_TRACK 16 |
Definition at line 25 of file lws-netdev.h.
| #define LWS_ETH_ALEN 6 |
Definition at line 26 of file lws-netdev.h.
| #define rssi_averaged | ( | _x | ) |
Definition at line 225 of file lws-netdev.h.
| #define lws_netdev_wifi_plat_ops |
Definition at line 264 of file lws-netdev.h.
| typedef uint8_t lws_wifi_ch_t |
Definition at line 28 of file lws-netdev.h.
| typedef int8_t lws_wifi_rssi_t |
Definition at line 29 of file lws-netdev.h.
| typedef struct lws_netdev_config lws_netdev_config_t |
| typedef struct lws_netdev_ops lws_netdev_ops_t |
| typedef struct lws_netdevs lws_netdevs_t |
| typedef struct lws_netdev_instance lws_netdev_instance_t |
| typedef struct lws_wifi_creds lws_wifi_creds_t |
| typedef struct lws_netdev_instance_wifi lws_netdev_instance_wifi_t |
| typedef struct lws_wifi_sta lws_wifi_sta_t |
| enum lws_netdev_type_t |
| Enumerator | |
|---|---|
| LWSNDTYP_UNKNOWN | |
| LWSNDTYP_WIFI | |
| LWSNDTYP_ETH | |
Definition at line 32 of file lws-netdev.h.
| anonymous enum |
| Enumerator | |
|---|---|
| LNDIW_ALG_OPEN | |
| LNDIW_ALG_WPA2 | |
| LNDIW_MODE_STA | |
| LNDIW_MODE_AP | |
| LNDIW_UP | |
| LNDIW_ACQ_IPv4 | |
| LNDIW_ACQ_IPv6 | |
Definition at line 105 of file lws-netdev.h.
Definition at line 121 of file lws-netdev.h.
| LWS_VISIBLE LWS_EXTERN lws_netdevs_t * lws_netdevs_from_ctx | ( | struct lws_context * | ctx | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_netdev_credentials_settings_set | ( | lws_netdevs_t * | nds | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_netdev_credentials_settings_get | ( | lws_netdevs_t * | nds | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN struct lws_netdev_instance * lws_netdev_wifi_create_plat | ( | struct lws_context * | ctx, |
| const lws_netdev_ops_t * | ops, | ||
| const char * | name, | ||
| void * | platinfo ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_netdev_wifi_configure_plat | ( | struct lws_netdev_instance * | nd, |
| lws_netdev_config_t * | config ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_netdev_wifi_event_plat | ( | struct lws_netdev_instance * | nd, |
| lws_usec_t | timestamp, | ||
| void * | buf, | ||
| size_t | len ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_netdev_wifi_up_plat | ( | struct lws_netdev_instance * | nd | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_netdev_wifi_down_plat | ( | struct lws_netdev_instance * | nd | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_netdev_wifi_destroy_plat | ( | struct lws_netdev_instance ** | pnd | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN void lws_netdev_wifi_scan_plat | ( | lws_netdev_instance_t * | nd | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_netdev_wifi_connect_plat | ( | lws_netdev_instance_t * | wnd, |
| const char * | ssid, | ||
| const char * | passphrase, | ||
| uint8_t * | bssid ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN lws_netdev_instance_t * lws_netdev_find | ( | lws_netdevs_t * | netdevs, |
| const char * | ifname ) |
| LWS_VISIBLE LWS_EXTERN int lws_netdev_plat_init | ( | void | ) |
References LWS_EXTERN, and LWS_VISIBLE.
| LWS_VISIBLE LWS_EXTERN int lws_netdev_plat_wifi_init | ( | void | ) |