Changeset 14616 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 26, 2008 4:20:08 AM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/ip.h
r14567 r14616 203 203 204 204 #ifdef HAVE_SYS_TYPES32_H /* Overcome some Solaris 2.x junk */ 205 # include <sys/types32.h>206 #else 207 # if SIZEOF_CHAR_P == 4205 # include <sys/types32.h> 206 #else 207 # if SIZEOF_CHAR_P == 4 208 208 typedef caddr_t caddr32_t; 209 # else210 # if !defined(VBOX_WITH_BSD_REASS) && !defined(VBOX_WITH_BSD_TCP_REASS)209 # else 210 # if !defined(VBOX_WITH_BSD_REASS) && !defined(VBOX_WITH_BSD_TCP_REASS) 211 211 typedef u_int32_t caddr32_t; 212 # else /* !VBOX_WITH_BSD_REASS && !VBOX_WITH_BSD_TCP_REASS*/212 # else /* !VBOX_WITH_BSD_REASS && !VBOX_WITH_BSD_TCP_REASS*/ 213 213 typedef caddr_t caddr32_t; 214 # endif /* VBOX_WITH_BSD_REASS || VBOX_WITH_BSD_TCP_REASS*/215 # endif214 # endif /* VBOX_WITH_BSD_REASS || VBOX_WITH_BSD_TCP_REASS*/ 215 # endif 216 216 #endif 217 217 … … 228 228 */ 229 229 struct ipovly { 230 #if !defined(VBOX_WITH_BSD_REASS) && !defined(VBOX_WITH_BSD_TCP_REASS) 230 231 caddr32_t ih_next, ih_prev; /* for protocol sequence q's */ 231 232 u_int8_t ih_x1; /* (unused) */ 233 #else /* !VBOX_WITH_BSD_REASS && !VBOX_WITH_BSD_TCP_REASS */ 234 u_int8_t ih_x1[9]; /* (unused) */ 235 #endif /* VBOX_WITH_BSD_REASS || VBOX_WITH_BSD_TCP_REASS */ 232 236 u_int8_t ih_pr; /* protocol */ 233 237 u_int16_t ih_len; /* protocol length */ -
trunk/src/VBox/Devices/Network/slirp/tcp_input.c
r14577 r14616 470 470 */ 471 471 tlen = ((struct ip *)ti)->ip_len; 472 #if !defined(VBOX_WITH_BSD_REASS) 472 473 ti->ti_next = ti->ti_prev = 0; 473 474 ti->ti_x1 = 0; 475 #else 476 memset(ti->ti_x1, 0, 9); 477 #endif 474 478 ti->ti_len = htons((u_int16_t)tlen); 475 479 len = sizeof(struct ip ) + tlen; -
trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
r14522 r14616 76 76 register struct tcpiphdr *n = &tp->t_template; 77 77 78 #if !defined(VBOX_WITH_BSD_REASS) 78 79 n->ti_next = n->ti_prev = 0; 79 80 n->ti_x1 = 0; 81 #else 82 memset(n->ti_x1, 0, 9); 83 #endif 80 84 n->ti_pr = IPPROTO_TCP; 81 85 n->ti_len = htons(sizeof (struct tcpiphdr) - sizeof (struct ip)); … … 154 158 m->m_len = tlen; 155 159 160 #if !defined(VBOX_WITH_BSD_REASS) 156 161 ti->ti_next = ti->ti_prev = 0; 157 162 ti->ti_x1 = 0; 163 #else 164 memset(ti->ti_x1, 0, 9); 165 #endif 158 166 ti->ti_seq = htonl(seq); 159 167 ti->ti_ack = htonl(ack); -
trunk/src/VBox/Devices/Network/slirp/udp.c
r14470 r14616 123 123 */ 124 124 if (udpcksum && uh->uh_sum) { 125 #if !defined(VBOX_WITH_BSD_REASS) 125 126 ((struct ipovly *)ip)->ih_next = 0; 126 127 ((struct ipovly *)ip)->ih_prev = 0; 127 128 ((struct ipovly *)ip)->ih_x1 = 0; 129 #else 130 memset(((struct ipovly *)ip)->ih_x1, 0, 9); 131 #endif 128 132 ((struct ipovly *)ip)->ih_len = uh->uh_ulen; 129 133 /* keep uh_sum for ICMP reply … … 265 269 */ 266 270 ui = mtod(m, struct udpiphdr *); 271 #if !defined(VBOX_WITH_BSD_REASS) 267 272 ui->ui_next = ui->ui_prev = 0; 268 273 ui->ui_x1 = 0; 274 #else 275 memset(ui->ui_x1, 0, 9); 276 #endif 269 277 ui->ui_pr = IPPROTO_UDP; 270 278 ui->ui_len = htons(m->m_len - sizeof(struct ip)); /* + sizeof (struct udphdr)); */
Note:
See TracChangeset
for help on using the changeset viewer.