eap_msg_alloc - Allocate a buffer for an EAP message @vendor: Vendor-Id (0 = IETF) @type: EAP type @payload_len: Payload length in bytes (data after Type)
: Message Code (EAP_CODE_*)
@identifier: Identifier
Returns: Pointer to the allocated message buffer or %NULL on error
This function can be used to allocate a buffer for an EAP message and fill
in the EAP header. This function is automatically using expanded EAP header
if the selected Vendor-Id is not IETF. In other words, most EAP methods do
not need to separately select which header type to use when using this
function to allocate the message buffers. The returned buffer has room for
payload_len bytes and has the EAP header and Type field already filled in.