aboutsummaryrefslogtreecommitdiff
path: root/slirp/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/udp.c')
-rw-r--r--slirp/udp.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/slirp/udp.c b/slirp/udp.c
index aefa0b749b..079c543534 100644
--- a/slirp/udp.c
+++ b/slirp/udp.c
@@ -420,10 +420,16 @@ struct talk_request {
#endif
struct cu_header {
- char dest[8];
- short family;
- u_short port;
- u_long addr;
+ uint16_t d_family; // destination family
+ uint16_t d_port; // destination port
+ uint32_t d_addr; // destination address
+ uint16_t s_family; // source family
+ uint16_t s_port; // source port
+ uint32_t s_addr; // source address
+ uint32_t seqn; // sequence number
+ uint16_t message; // message
+ uint16_t data_type; // data type
+ uint16_t pkt_len; // packet length
} *cu_head;
switch(so->so_emu) {
@@ -610,8 +616,8 @@ struct cu_header {
if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0)
return;
cu_head = mtod(m, struct cu_header *);
- cu_head->port = addr.sin_port;
- cu_head->addr = (u_long) our_addr.s_addr;
+ cu_head->s_port = addr.sin_port;
+ cu_head->s_addr = our_addr.s_addr;
}
return;