one push one pop

This commit is contained in:
Alexandr Dubovikov 2016-04-19 20:22:49 +02:00
parent d710787fa9
commit 024af441b8
1 changed files with 1 additions and 67 deletions

View File

@ -163,130 +163,64 @@ struct hep_chunk {
uint16_t length;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_chunk hep_chunk_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_chunk_uint8 {
hep_chunk_t chunk;
uint8_t data;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_chunk_uint8 hep_chunk_uint8_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_chunk_uint16 {
hep_chunk_t chunk;
uint16_t data;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_chunk_uint16 hep_chunk_uint16_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_chunk_uint32 {
hep_chunk_t chunk;
uint32_t data;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_chunk_uint32 hep_chunk_uint32_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_chunk_str {
hep_chunk_t chunk;
char *data;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_chunk_str hep_chunk_str_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_chunk_ip4 {
hep_chunk_t chunk;
struct in_addr data;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_chunk_ip4 hep_chunk_ip4_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_chunk_ip6 {
hep_chunk_t chunk;
struct in6_addr data;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_chunk_ip6 hep_chunk_ip6_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_chunk_payload {
hep_chunk_t chunk;
char *data;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#elsif
typedef struct hep_chunk_payload hep_chunk_payload_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_ctrl {
char id[4];
uint16_t length;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_ctrl hep_ctrl_t;
#ifdef _MSC_VER
#pragma pack(push, 1)
#endif
struct hep_generic {
hep_ctrl_t header;
hep_chunk_uint8_t ip_family;
@ -298,13 +232,13 @@ struct hep_generic {
hep_chunk_uint8_t proto_t;
hep_chunk_uint32_t capt_id;
} PACKED;
#ifdef _MSC_VER
#pragma pack(pop)
#endif
typedef struct hep_generic hep_generic_t;
/** Maximum size when streaming. */
#define MSG_SSIZE_MAX (USIZE_MAX)