diff options
Diffstat (limited to 'slirp/tcp_subr.c')
-rw-r--r-- | slirp/tcp_subr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index 879a7dcd29..e35628a892 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -163,7 +163,7 @@ tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m, * ti points into m so the next line is just making * the mbuf point to ti */ - m->m_data = (caddr_t)ti; + m->m_data = (char *)ti; m->m_len = sizeof (struct tcpiphdr); tlen = 0; @@ -182,7 +182,7 @@ tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m, } #undef xchg } - ti->ti_len = htons((u_short)(sizeof (struct tcphdr) + tlen)); + ti->ti_len = htons((uint16_t)(sizeof (struct tcphdr) + tlen)); tlen += sizeof (struct tcpiphdr); m->m_len = tlen; @@ -613,10 +613,10 @@ int tcp_emu(struct socket *so, struct mbuf *m) { Slirp *slirp = so->slirp; - u_int n1, n2, n3, n4, n5, n6; + unsigned n1, n2, n3, n4, n5, n6; char buff[257]; uint32_t laddr; - u_int lport; + unsigned lport; char *bptr; DEBUG_CALL("tcp_emu"); @@ -853,7 +853,7 @@ tcp_emu(struct socket *so, struct mbuf *m) bptr = m->m_data; while (bptr < m->m_data + m->m_len) { - u_short p; + uint16_t p; static int ra = 0; char ra_tbl[4]; @@ -909,8 +909,8 @@ tcp_emu(struct socket *so, struct mbuf *m) /* This is the field containing the port * number that RA-player is listening to. */ - lport = (((u_char*)bptr)[0] << 8) - + ((u_char *)bptr)[1]; + lport = (((uint8_t*)bptr)[0] << 8) + + ((uint8_t *)bptr)[1]; if (lport < 6970) lport += 256; /* don't know why */ if (lport < 6970 || lport > 7170) @@ -928,8 +928,8 @@ tcp_emu(struct socket *so, struct mbuf *m) } if (p == 7071) p = 0; - *(u_char *)bptr++ = (p >> 8) & 0xff; - *(u_char *)bptr = p & 0xff; + *(uint8_t *)bptr++ = (p >> 8) & 0xff; + *(uint8_t *)bptr = p & 0xff; ra = 0; return 1; /* port redirected, we're done */ break; |