EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the common definitions used by radius and eap. More...
#include <stddef.h>
#include "../utils/allocs.h"
#include "../utils/attributes.h"
#include "../utils/log.h"
Go to the source code of this file.
Data Structures | |
struct | hostapd_radius_attr |
Macros | |
#define | __force |
#define | __bitwise |
#define | BIT(x) (1U << (x)) |
#define | bswap_16(a) ((((u16)(a) << 8) & 0xff00) | (((u16)(a) >> 8) & 0xff)) |
#define | le_to_host16(n) ((__force u16)(le16)(n)) |
#define | host_to_le16(n) ((__force le16)(u16)(n)) |
#define | be_to_host16(n) bswap_16((__force u16)(be16)(n)) |
#define | host_to_be16(n) ((__force be16)bswap_16((n))) |
#define | le_to_host32(n) ((__force u32)(le32)(n)) |
#define | host_to_le32(n) ((__force le32)(u32)(n)) |
#define | be_to_host32(n) bswap_32((__force u32)(be32)(n)) |
#define | host_to_be32(n) ((__force be32)bswap_32((n))) |
#define | le_to_host64(n) ((__force u64)(le64)(n)) |
#define | host_to_le64(n) ((__force le64)(u64)(n)) |
#define | be_to_host64(n) bswap_64((__force u64)(be64)(n)) |
#define | host_to_be64(n) ((__force be64)bswap_64((n))) |
#define | wpa_printf(level, ...) log_levels(level, __FILENAME__, __LINE__, __VA_ARGS__) |
#define | wpa_snprintf_hex(buf, buf_size, data, len) printf_hex(buf, buf_size, data, len, false) |
#define | wpa_trace_show(s) log_trace("%s", s) |
#define | TEST_FAIL() 0 |
Typedefs | |
typedef uint64_t | u64 |
typedef uint32_t | u32 |
typedef uint16_t | u16 |
typedef uint8_t | u8 |
typedef int64_t | s64 |
typedef int32_t | s32 |
typedef int16_t | s16 |
typedef int8_t | s8 |
typedef u16 __bitwise | be16 |
typedef u16 __bitwise | le16 |
typedef u32 __bitwise | be32 |
typedef u32 __bitwise | le32 |
typedef u64 __bitwise | be64 |
typedef u64 __bitwise | le64 |
Enumerations | |
enum | ieee802_11_reason_code { WLAN_REASON_IEEE_802_1X_AUTH_FAILED = 23 } |
enum | hostap_log_level { MSG_EXCESSIVE = LOGC_TRACE , MSG_MSGDUMP = LOGC_TRACE , MSG_DEBUG = LOGC_DEBUG , MSG_INFO = LOGC_INFO , MSG_WARNING = LOGC_WARN , MSG_ERROR = LOGC_ERROR } |
File containing the common definitions used by radius and eap.
src/utils/common.h
#define __bitwise |
#define __force |
#define BIT | ( | x | ) | (1U << (x)) |
#define TEST_FAIL | ( | ) | 0 |
Used in hostap source code to test failures.
#define wpa_printf | ( | level, | |
... | |||
) | log_levels(level, __FILENAME__, __LINE__, __VA_ARGS__) |
Logs the given text.
#define wpa_snprintf_hex | ( | buf, | |
buf_size, | |||
data, | |||
len | |||
) | printf_hex(buf, buf_size, data, len, false) |
Print data as a hex string into a buffer.
[out] | buf | Memory area to use as the output buffer |
buf_size | Maximum buffer size in bytes (should be at least 2 * len + 1) | |
[in] | data | Data to be printed |
len | Length of data in bytes |
#define wpa_trace_show | ( | s | ) | log_trace("%s", s) |
Dummy implementation of hostap's wpa_trace_show()
typedef int16_t s16 |
typedef int32_t s32 |
typedef int64_t s64 |
typedef int8_t s8 |
typedef uint16_t u16 |
typedef uint32_t u32 |
typedef uint64_t u64 |
typedef uint8_t u8 |
enum hostap_log_level |