wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
gas.c File Reference

Generic advertisement service (GAS) (IEEE 802.11u) Copyright (c) 2011-2012, Qualcomm Atheros. More...

#include "includes.h"
#include "common.h"
#include "ieee802_11_defs.h"
#include "gas.h"

Functions

struct wpabufgas_build_initial_req (u8 dialog_token, size_t size)
 
struct wpabufgas_build_comeback_req (u8 dialog_token)
 
struct wpabufgas_build_initial_resp (u8 dialog_token, u16 status_code, u16 comeback_delay, size_t size)
 
struct wpabufgas_anqp_build_initial_req (u8 dialog_token, size_t size)
 
struct wpabufgas_anqp_build_initial_resp (u8 dialog_token, u16 status_code, u16 comeback_delay, size_t size)
 
struct wpabufgas_anqp_build_initial_resp_buf (u8 dialog_token, u16 status_code, u16 comeback_delay, struct wpabuf *payload)
 
struct wpabufgas_anqp_build_comeback_resp (u8 dialog_token, u16 status_code, u8 frag_id, u8 more, u16 comeback_delay, size_t size)
 
struct wpabufgas_anqp_build_comeback_resp_buf (u8 dialog_token, u16 status_code, u8 frag_id, u8 more, u16 comeback_delay, struct wpabuf *payload)
 
void gas_anqp_set_len (struct wpabuf *buf)
 Set Query Request/Response Length. More...
 
u8 * gas_anqp_add_element (struct wpabuf *buf, u16 info_id)
 Add ANQP element header. More...
 
void gas_anqp_set_element_len (struct wpabuf *buf, u8 *len_pos)
 Update ANQP element Length field. More...
 

Detailed Description

Generic advertisement service (GAS) (IEEE 802.11u) Copyright (c) 2011-2012, Qualcomm Atheros.

Function Documentation

u8* gas_anqp_add_element ( struct wpabuf buf,
u16  info_id 
)

Add ANQP element header.

Parameters
bufGAS message
info_idANQP Info ID
Returns
Pointer to the Length field for gas_anqp_set_element_len()
void gas_anqp_set_element_len ( struct wpabuf buf,
u8 *  len_pos 
)

Update ANQP element Length field.

Parameters
bufGAS message
len_posLength field position from gas_anqp_add_element()

This function is called after the ANQP element payload has been added to the buffer.

void gas_anqp_set_len ( struct wpabuf buf)

Set Query Request/Response Length.

Parameters
bufGAS message

This function is used to update the Query Request/Response Length field once the payload has been filled.