📄 types.h
字号:
/* * Copyright (C) 2002-2003 Ardis Technolgies <roman@ardistech.com> * * Released under the terms of the GNU GPL v2.0. */#ifndef TYPES_H#define TYPES_H#include <sys/types.h>#include <byteswap.h>#include <endian.h>#include <stdint.h>#include <inttypes.h>#if __BYTE_ORDER == __BIG_ENDIAN#define cpu_to_be16(x) (x)#define be16_to_cpu(x) (x)#define cpu_to_be32(x) (x)#define be32_to_cpu(x) (x)#elif __BYTE_ORDER == __LITTLE_ENDIAN#define cpu_to_be16(x) bswap_16(x)#define be16_to_cpu(x) bswap_16(x)#define cpu_to_be32(x) bswap_32(x)#define be32_to_cpu(x) bswap_32(x)#else#error "unknown endianess!"#endiftypedef u_int8_t u8;typedef u_int16_t u16;typedef u_int32_t u32;typedef u_int64_t u64;#endif /* TYPES_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -