-
Notifications
You must be signed in to change notification settings - Fork 0
/
sim_types.h
32 lines (24 loc) · 808 Bytes
/
sim_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <limits.h>
#include <netinet/in.h>
#ifndef SIM_TYPES
#define SIM_TYPES
typedef unsigned long int __uint64;
typedef long int __int64;
typedef long __int32;
typedef short __int16;
typedef unsigned char _BYTE;
typedef unsigned short _WORD;
typedef unsigned int _DWORD;
typedef unsigned long long _QWORD;
typedef struct { _QWORD a; _QWORD b; } _OWORD;
typedef unsigned short uint16;
#define LOBYTE(x) (*((_BYTE*)&(x))) // low byte
#define LOWORD(x) (*((_WORD*)&(x))) // low word
#define LODWORD(x) (*((_DWORD*)&(x))) // low dword
#define HIBYTE(x) (*((_BYTE*)&(x)+1))
#define HIWORD(x) (*((_WORD*)&(x)+1))
#define HIDWORD(x) (*((_DWORD*)&(x)+1))
#define BYTEn(x, n) (*((_BYTE*)&(x)+n))
#define WORDn(x, n) (*((_WORD*)&(x)+n))
#define STD_PACKET_SIZE 768
#endif // SIM_TYPES