#endif
/* HEPv3 types */
+
+#if (defined __SUNPRO_CC) || defined(__SUNPRO_C) || defined(_MSC_VER)
+#define PACKED
+#endif
+#ifndef PACKED
+#define PACKED __attribute__ ((__packed__))
+#endif
+
+#ifdef _MSC_VER
+#pragma pack(push, 1)
+#endif
+
struct hep_chunk {
uint16_t vendor_id;
uint16_t type_id;
uint16_t length;
-} __attribute__((packed));
+} 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;
-} __attribute__((packed));
+} 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;
-} __attribute__((packed));
+} 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;
-} __attribute__((packed));
+} 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;
-} __attribute__((packed));
+} 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;
-} __attribute__((packed));
+} 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;
-} __attribute__((packed));
+} 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;
-} __attribute__((packed));
+} 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;
-} __attribute__((packed));
+} 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;
hep_chunk_uint32_t time_usec;
hep_chunk_uint8_t proto_t;
hep_chunk_uint32_t capt_id;
-} __attribute__((packed));
+} PACKED;
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
typedef struct hep_generic hep_generic_t;