aboutsummaryrefslogtreecommitdiff
path: root/ip.h
diff options
context:
space:
mode:
authorJuha Riihimäki <juha.riihimaki@nokia.com>2009-12-03 15:56:04 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-12-18 23:23:56 +0100
commit4a90db9b2be8ddaefce11528e95bf4c40a2560b6 (patch)
tree82fbff95808701c4b081a6aff75c514a5495ff26 /ip.h
parent1e784fd7fccbab2e4c161f02d890ba304e0fdd3f (diff)
downloadslirp-4a90db9b2be8ddaefce11528e95bf4c40a2560b6.zip
slirp-4a90db9b2be8ddaefce11528e95bf4c40a2560b6.tar.gz
slirp-4a90db9b2be8ddaefce11528e95bf4c40a2560b6.tar.bz2
fix networking on win32 host
At least under some mingw compilers slirp networking fails without declaring these fields packed. From: Juha Riihimäki <juha.riihimaki@nokia.com> Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> Signed-off-by: Riku Voipio <riku.voipio@nokia.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'ip.h')
-rw-r--r--ip.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/ip.h b/ip.h
index 84080fa..4a227d3 100644
--- a/ip.h
+++ b/ip.h
@@ -91,7 +91,7 @@ struct ip {
u_int8_t ip_p; /* protocol */
u_int16_t ip_sum; /* checksum */
struct in_addr ip_src, ip_dst; /* source and dest address */
-};
+} __attribute__((packed));
#define IP_MAXPACKET 65535 /* maximum packet size */
@@ -153,7 +153,7 @@ struct ip_timestamp {
n_long ipt_time;
} ipt_ta[1];
} ipt_timestamp;
-};
+} __attribute__((packed));
/* flag bits for ipt_flg */
#define IPOPT_TS_TSONLY 0 /* timestamps only */
@@ -183,11 +183,11 @@ struct ip_timestamp {
struct mbuf_ptr {
struct mbuf *mptr;
uint32_t dummy;
-};
+} __attribute__((packed));
#else
struct mbuf_ptr {
struct mbuf *mptr;
-};
+} __attribute__((packed));
#endif
struct qlink {
void *next, *prev;
@@ -219,7 +219,7 @@ struct ipq {
u_int8_t ipq_p; /* protocol of this fragment */
u_int16_t ipq_id; /* sequence id for reassembly */
struct in_addr ipq_src, ipq_dst;
-};
+} __attribute__((packed));
/*
* Ip header, when holding a fragment.
@@ -229,7 +229,7 @@ struct ipq {
struct ipasfrag {
struct qlink ipf_link;
struct ip ipf_ip;
-};
+} __attribute__((packed));
#define ipf_off ipf_ip.ip_off
#define ipf_tos ipf_ip.ip_tos
@@ -248,6 +248,6 @@ struct ipasfrag {
struct ipoption {
struct in_addr ipopt_dst; /* first-hop dst if source routed */
int8_t ipopt_list[MAX_IPOPTLEN]; /* options proper */
-};
+} __attribute__((packed));
#endif