Support for pre-shared credentials introduced

This commit is contained in:
2016-06-15 20:00:04 +02:00
parent ef9fa750a0
commit a9fdd1d71d
20 changed files with 1300 additions and 625 deletions

View File

@@ -23,6 +23,8 @@
#if !defined(RC_INVOKED) && !defined(MIDL_PASS)
#include <sal.h>
namespace eap
{
///
@@ -33,9 +35,39 @@ namespace eap
enum type_t;
}
namespace eapserial
{
///
/// Packs an EAP method type
///
/// \param[inout] cursor Memory cursor
/// \param[in] val EAP method type to pack
///
inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::type_t &val);
///
/// Returns packed size of an EAP method type
///
/// \param[in] val EAP method type to pack
///
/// \returns Size of data when packed (in bytes)
///
inline size_t get_pk_size(const eap::type_t &val);
///
/// Unpacks an EAP method type
///
/// \param[inout] cursor Memory cursor
/// \param[out] val EAP method type to unpack to
///
inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::type_t &val);
}
#pragma once
#include "EAPSerial.h"
namespace eap
{
@@ -49,4 +81,27 @@ namespace eap
};
}
namespace eapserial
{
inline void pack(_Inout_ unsigned char *&cursor, _In_ const eap::type_t &val)
{
pack(cursor, (unsigned char)val);
}
inline size_t get_pk_size(_In_ const eap::type_t &val)
{
return get_pk_size((unsigned char)val);
}
inline void unpack(_Inout_ const unsigned char *&cursor, _Out_ eap::type_t &val)
{
unsigned char t;
unpack(cursor, t);
val = (eap::type_t)t;
}
}
#endif