Upstream vwifi v7.0 (Raizo62/vwifi @ 4a9842e)
Unmodified upstream source from https://github.com/Raizo62/vwifi Commit: 4a9842e "CMakeLists.txt : VERSION = 7.0" Simulator of WiFi (802.11) interfaces to communicate between several Virtual Machines via mac80211_hwsim + TCP relay. License: Apache-2.0
This commit is contained in:
+54
@@ -0,0 +1,54 @@
|
||||
#ifndef _TYPES_H_
|
||||
#define _TYPES_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef int8_t s8;
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef uint64_t u64;
|
||||
typedef int32_t s32;
|
||||
typedef uint32_t u32;
|
||||
|
||||
// int
|
||||
typedef s32 TValue;
|
||||
|
||||
// unsigned int
|
||||
typedef u32 TCID;
|
||||
|
||||
enum TOrder {
|
||||
TORDER_NO, TORDER_LIST, TORDER_SHOW, TORDER_CHANGE_COORDINATE, TORDER_SETNAME, TORDER_PACKET_LOSS, TORDER_STATUS, TORDER_DISTANCE_BETWEEN_CID, TORDER_SET_SCALE, TORDER_CLOSE_ALL_CLIENT
|
||||
};
|
||||
|
||||
// int
|
||||
typedef s32 TDescriptor;
|
||||
|
||||
// unsigned int
|
||||
typedef u32 TIndex;
|
||||
|
||||
// int
|
||||
typedef s32 TSocket;
|
||||
// AF_INET : use IP
|
||||
// AF_VSOCK : use vsock
|
||||
|
||||
// unsigned short
|
||||
typedef u16 TPort;
|
||||
|
||||
// char
|
||||
typedef s8 TPower; // empirical observed values with int : [-123,20]
|
||||
const TPower TPower_MAX=-10; // dBm is always negative. -10 is an empirical value
|
||||
const TPower TPower_MIN=INT8_MIN;
|
||||
|
||||
// double
|
||||
typedef double TDistance; // in meters
|
||||
typedef double TScale;
|
||||
|
||||
// u32
|
||||
typedef u32 TFrequency; // Hz
|
||||
|
||||
// unsigned short
|
||||
typedef u16 TMinimalSize;
|
||||
|
||||
typedef u8 TByte;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user