#include <stdint.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | le_to_host16(n) (n) |
#define | host_to_le16(n) (n) |
#define | be_to_host16(n) bswap_16(n) |
#define | host_to_be16(n) bswap_16(n) |
#define | le_to_host32(n) (n) |
#define | be_to_host32(n) bswap_32(n) |
#define | host_to_be32(n) bswap_32(n) |
#define | WPA_GET_BE16(a) ((u16) (((a)[0] << 8) | (a)[1])) |
#define | WPA_PUT_BE16(a, val) |
#define | WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0])) |
#define | WPA_PUT_LE16(a, val) |
#define | WPA_GET_BE32(a) |
#define | ETH_ALEN 6 |
#define | WPA_ASSERT(a) do { } while (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 |
Enumerations | |
enum | { MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR } |
Functions | |
int | hostapd_get_rand (u8 *buf, size_t len) |
void | hostapd_hexdump (const char *title, const u8 *buf, size_t len) |
int | hwaddr_aton (const char *txt, u8 *addr) |
Convert ASCII string to MAC address. | |
int | hexstr2bin (const char *hex, u8 *buf, size_t len) |
Convert ASCII hex string into binary data. | |
char * | rel2abs_path (const char *rel_path) |
void | inc_byte_array (u8 *counter, size_t len) |
Increment arbitrary length byte array by one. | |
void | print_char (char c) |
void | fprint_char (FILE *f, char c) |
void | wpa_debug_print_timestamp (void) |
Print timestamp for debug output. | |
void | wpa_printf (int level, char *fmt,...) __attribute__((format(printf |
conditional printf | |
void void | wpa_hexdump (int level, const char *title, const u8 *buf, size_t len) |
conditional hex dump | |
void | wpa_hexdump_key (int level, const char *title, const u8 *buf, size_t len) |
conditional hex dump, hide keys | |
void | wpa_hexdump_ascii (int level, const char *title, const u8 *buf, size_t len) |
conditional hex dump | |
void | wpa_hexdump_ascii_key (int level, const char *title, const u8 *buf, size_t len) |
conditional hex dump, hide keys |
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
Definition in file common.h.
|
Value: ((((u32) (a)[0]) << 24) | (((u32) (a)[1]) << 16) | \ (((u32) (a)[2]) << 8) | ((u32) (a)[3])) |
|
Value: do { \ (a)[0] = ((u16) (val)) >> 8; \ (a)[1] = ((u16) (val)) & 0xff; \ } while (0) |
|
Value: do { \ (a)[1] = ((u16) (val)) >> 8; \ (a)[0] = ((u16) (val)) & 0xff; \ } while (0) |
|
Convert ASCII hex string into binary data.
|
|
Convert ASCII string to MAC address.
|
|
Increment arbitrary length byte array by one.
|
|
Print timestamp for debug output. This function prints a timestamp in <seconds from 1970>.<microsoconds> format if debug output has been configured to include timestamps in debug messages. |
|
conditional hex dump
|
|
conditional hex dump
|
|
conditional hex dump, hide keys
|
|
conditional hex dump, hide keys
|
|
conditional printf
Note: New line ' |