Revision b6dce92e slirp/tcp_subr.c
b/slirp/tcp_subr.c | ||
---|---|---|
134 | 134 |
m->m_len = sizeof (struct tcpiphdr); |
135 | 135 |
tlen = 0; |
136 | 136 |
#define xchg(a,b,type) { type t; t=a; a=b; b=t; } |
137 |
xchg(ti->ti_dst.s_addr, ti->ti_src.s_addr, u_int32_t);
|
|
138 |
xchg(ti->ti_dport, ti->ti_sport, u_int16_t);
|
|
137 |
xchg(ti->ti_dst.s_addr, ti->ti_src.s_addr, uint32_t); |
|
138 |
xchg(ti->ti_dport, ti->ti_sport, uint16_t); |
|
139 | 139 |
#undef xchg |
140 | 140 |
} |
141 | 141 |
ti->ti_len = htons((u_short)(sizeof (struct tcphdr) + tlen)); |
... | ... | |
150 | 150 |
ti->ti_off = sizeof (struct tcphdr) >> 2; |
151 | 151 |
ti->ti_flags = flags; |
152 | 152 |
if (tp) |
153 |
ti->ti_win = htons((u_int16_t) (win >> tp->rcv_scale));
|
|
153 |
ti->ti_win = htons((uint16_t) (win >> tp->rcv_scale)); |
|
154 | 154 |
else |
155 |
ti->ti_win = htons((u_int16_t)win);
|
|
155 |
ti->ti_win = htons((uint16_t)win); |
|
156 | 156 |
ti->ti_urp = 0; |
157 | 157 |
ti->ti_sum = 0; |
158 | 158 |
ti->ti_sum = cksum(m, tlen); |
... | ... | |
491 | 491 |
/* |
492 | 492 |
* Return TOS according to the above table |
493 | 493 |
*/ |
494 |
u_int8_t
|
|
494 |
uint8_t |
|
495 | 495 |
tcp_tos(struct socket *so) |
496 | 496 |
{ |
497 | 497 |
int i = 0; |
... | ... | |
548 | 548 |
Slirp *slirp = so->slirp; |
549 | 549 |
u_int n1, n2, n3, n4, n5, n6; |
550 | 550 |
char buff[257]; |
551 |
u_int32_t laddr;
|
|
551 |
uint32_t laddr; |
|
552 | 552 |
u_int lport; |
553 | 553 |
char *bptr; |
554 | 554 |
|
Also available in: Unified diff