-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathTypes.h
More file actions
39 lines (30 loc) · 684 Bytes
/
Types.h
File metadata and controls
39 lines (30 loc) · 684 Bytes
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
33
34
35
36
37
38
39
#ifndef __Types_h
#define __Types_h
#include <sys/types.h>
#include <stdio.h>
typedef u_int64_t u64;
typedef u_int32_t u32;
typedef u_int16_t u16;
typedef u_int8_t u8;
typedef int64_t s64;
typedef int32_t s32;
typedef int16_t s16;
typedef char s8;
typedef u32 ipv4a; /* in the host byte order */
typedef u32 ipv4na; /* in the network byte order */
typedef enum {
success = 1,
fail = 0
} result;
typedef enum {
true = 1,
false = 0
} bool, boolean;
#define panic(_str_) \
{ \
printf("\nPANIC!! at %s, line %d: ", __FILE__, __LINE__); \
printf _str_; \
printf("\n"); \
abort(); \
}
#endif /* __Types_h */