wpa_supplicant / hostapd
2.5
|
P2P - IE parser. More...
#include "includes.h"
#include "common.h"
#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h"
#include "wps/wps_i.h"
#include "p2p_i.h"
Functions | |
int | p2p_parse_p2p_ie (const struct wpabuf *buf, struct p2p_message *msg) |
Parse P2P IE. More... | |
int | p2p_parse_ies (const u8 *data, size_t len, struct p2p_message *msg) |
Parse P2P message IEs (both WPS and P2P IE) More... | |
int | p2p_parse (const u8 *data, size_t len, struct p2p_message *msg) |
Parse a P2P Action frame contents. More... | |
int | p2p_parse_ies_separate (const u8 *wsc, size_t wsc_len, const u8 *p2p, size_t p2p_len, struct p2p_message *msg) |
void | p2p_parse_free (struct p2p_message *msg) |
Free temporary data from P2P parsing. More... | |
int | p2p_group_info_parse (const u8 *gi, size_t gi_len, struct p2p_group_info *info) |
int | p2p_attr_text (struct wpabuf *data, char *buf, char *end) |
Build text format description of P2P IE attributes. More... | |
int | p2p_get_cross_connect_disallowed (const struct wpabuf *p2p_ie) |
Does WLAN AP disallows cross connection. More... | |
u8 | p2p_get_group_capab (const struct wpabuf *p2p_ie) |
Get Group Capability from P2P IE data. More... | |
const u8 * | p2p_get_go_dev_addr (const struct wpabuf *p2p_ie) |
Get P2P Device Address from P2P IE data. More... | |
P2P - IE parser.
int p2p_attr_text | ( | struct wpabuf * | data, |
char * | buf, | ||
char * | end | ||
) |
Build text format description of P2P IE attributes.
data | P2P IE contents |
buf | Buffer for returning text |
end | Pointer to the end of the buf area |
This function can be used to parse P2P IE contents into text format field=value lines.
int p2p_get_cross_connect_disallowed | ( | const struct wpabuf * | p2p_ie | ) |
Does WLAN AP disallows cross connection.
p2p_ie | P2P IE(s) contents |
const u8* p2p_get_go_dev_addr | ( | const struct wpabuf * | p2p_ie | ) |
Get P2P Device Address from P2P IE data.
p2p_ie | P2P IE(s) contents |
u8 p2p_get_group_capab | ( | const struct wpabuf * | p2p_ie | ) |
Get Group Capability from P2P IE data.
p2p_ie | P2P IE(s) contents |
int p2p_parse | ( | const u8 * | data, |
size_t | len, | ||
struct p2p_message * | msg | ||
) |
Parse a P2P Action frame contents.
data | Action frame payload after Category and Code fields |
len | Length of data buffer in octets |
msg | Buffer for returning parsed attributes |
Note: Caller must free temporary memory allocations by calling p2p_parse_free() when the parsed data is not needed anymore.
void p2p_parse_free | ( | struct p2p_message * | msg | ) |
Free temporary data from P2P parsing.
msg | Parsed attributes |
int p2p_parse_ies | ( | const u8 * | data, |
size_t | len, | ||
struct p2p_message * | msg | ||
) |
Parse P2P message IEs (both WPS and P2P IE)
data | IEs from the message |
len | Length of data buffer in octets |
msg | Buffer for returning parsed attributes |
Note: Caller is responsible for clearing the msg data structure before calling this function.
Note: Caller must free temporary memory allocations by calling p2p_parse_free() when the parsed data is not needed anymore.
int p2p_parse_p2p_ie | ( | const struct wpabuf * | buf, |
struct p2p_message * | msg | ||
) |
Parse P2P IE.
buf | Concatenated P2P IE(s) payload |
msg | Buffer for returning parsed attributes |
Note: Caller is responsible for clearing the msg data structure before calling this function.