- Timestamp:
- Jun 4, 2010 8:38:56 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 62400
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Makefile.kmk
r30016 r30045 854 854 Network/DrvNAT.cpp \ 855 855 Network/slirp/bootp.c \ 856 Network/slirp/debug.c \856 Network/slirp/debug.c \ 857 857 Network/slirp/ip_icmp.c \ 858 858 Network/slirp/ip_input.c \ 859 859 Network/slirp/ip_output.c \ 860 860 Network/slirp/misc.c \ 861 861 Network/slirp/sbuf.c \ 862 862 Network/slirp/slirp.c \ 863 863 Network/slirp/socket.c \ … … 871 871 Network/slirp/dnsproxy/dnsproxy.c 872 872 873 ifdef VBOX_WITH_SLIRP_BSD_SBUF 874 VBOX_SLIRP_SOURCES += Network/slirp/bsd/kern/subr_sbuf.c 875 endif 876 873 877 VBOX_SLIRP_BSD_ARCH = $(subst x86,i386,$(KBUILD_TARGET_ARCH)) 874 878 VBOX_SLIRP_BSD_SOURCES += \ … … 893 897 define def_vbox_slirp_cflags 894 898 $(file)_DEFS += \ 899 $(if $(VBOX_WITH_SLIRP_BSD_SBUF),VBOX_WITH_SLIRP_BSD_SBUF,) \ 895 900 $(if $(VBOX_WITH_SLIRP_MEMORY_CHECK),RTMEM_WRAP_TO_EF_APIS,) \ 896 901 $(if $(VBOX_WITH_DEBUG_NAT_SOCKETS),VBOX_WITH_DEBUG_NAT_SOCKETS,) \ -
trunk/src/VBox/Devices/Network/slirp/bsd/kern/subr_sbuf.c
r30018 r30045 27 27 */ 28 28 29 #ifndef VBOX 29 30 #include <sys/cdefs.h> 30 31 __FBSDID("$FreeBSD: src/sys/kern/subr_sbuf.c,v 1.30.8.1 2009/04/15 03:14:26 kensmith Exp $"); … … 59 60 #define min(x,y) MIN(x,y) 60 61 #endif /* _KERNEL */ 62 #else /* VBOX */ 63 # include <iprt/param.h> 64 # include <iprt/ctype.h> 65 # include <slirp.h> 66 # define SBMALLOC(size) RTMemAlloc((size)) 67 # define SBFREE(buf) RTMemFree((buf)) 68 #endif 61 69 62 70 /* … … 417 425 do { 418 426 va_copy(ap_copy, ap); 427 #ifndef VBOX 419 428 len = vsnprintf(&s->s_buf[s->s_len], SBUF_FREESPACE(s) + 1, 420 429 fmt, ap_copy); 430 #else 431 len = RTStrPrintfV(&s->s_buf[s->s_len], SBUF_FREESPACE(s) + 1, 432 fmt, ap_copy); 433 #endif 421 434 va_end(ap_copy); 422 435 } while (len > SBUF_FREESPACE(s) && … … 492 505 return (-1); 493 506 507 #ifndef VBOX 494 508 while (s->s_len && isspace(s->s_buf[s->s_len-1])) 495 509 --s->s_len; 510 #else 511 while (s->s_len && RT_C_IS_SPACE(s->s_buf[s->s_len-1])) 512 --s->s_len; 513 #endif 496 514 497 515 return (0); -
trunk/src/VBox/Devices/Network/slirp/bsd/sys/sbuf.h
r30018 r30045 32 32 #define _SYS_SBUF_H_ 33 33 34 #ifndef VBOX 34 35 #include <sys/_types.h> 36 #else 37 # include <iprt/types.h> 38 #endif 35 39 36 40 /* … … 65 69 int sbuf_cat(struct sbuf *, const char *); 66 70 int sbuf_cpy(struct sbuf *, const char *); 71 #ifndef VBOX 67 72 int sbuf_printf(struct sbuf *, const char *, ...) __printflike(2, 3); 68 73 int sbuf_vprintf(struct sbuf *, const char *, __va_list) __printflike(2, 0); 74 #else 75 int sbuf_printf(struct sbuf *, const char *, ...); 76 int sbuf_vprintf(struct sbuf *, const char *, va_list); 77 #endif 69 78 int sbuf_putc(struct sbuf *, int); 70 79 int sbuf_trim(struct sbuf *); -
trunk/src/VBox/Devices/Network/slirp/debug.c
r30016 r30045 207 207 lprint("%15s %5d %5d %5d\n", 208 208 inet_ntoa(so->so_faddr), RT_N2H_U16(so->so_fport), 209 so->so_rcv.sb_cc, so->so_snd.sb_cc);209 SBUF_LEN(&so->so_rcv), SBUF_LEN(&so->so_snd)); 210 210 LOOP_LABEL(tcp, so, so_next); 211 211 } … … 221 221 lprint("%15s %5d %5d %5d\n", 222 222 inet_ntoa(so->so_faddr), RT_N2H_U16(so->so_fport), 223 so->so_rcv.sb_cc, so->so_snd.sb_cc);223 SBUF_LEN(&so->so_rcv), SBUF_LEN(&so->so_snd)); 224 224 LOOP_LABEL(udp, so, so_next); 225 225 } -
trunk/src/VBox/Devices/Network/slirp/sbuf.c
r30016 r30045 26 26 27 27 #include <slirp.h> 28 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 28 29 29 30 /* Done as a macro in socket.h */ … … 269 270 } 270 271 } 271 272 #else /* VBOX_WITH_SLIRP_BSD_SBUF */ 273 void 274 sbappend (PNATState pData, struct socket *so, struct mbuf *m) 275 { 276 int ret = 0; 277 int mlen = 0; 278 caddr_t buf = NULL; 279 280 STAM_PROFILE_START(&pData->StatIOSBAppend_pf, a); 281 DEBUG_CALL("sbappend"); 282 DEBUG_ARG("so = %lx", (long)so); 283 DEBUG_ARG("m = %lx", (long)m); 284 DEBUG_ARG("m->m_len = %d", m ? m->m_len : 0); 285 286 STAM_COUNTER_INC(&pData->StatIOSBAppend); 287 mlen = m_length(m, NULL); 288 if (mlen <= 0) 289 { 290 STAM_COUNTER_INC(&pData->StatIOSBAppend_zm); 291 goto done; 292 } 293 294 /* 295 * We only write if there's nothing in the buffer, 296 * ottherwise it'll arrive out of order, and hence corrupt 297 */ 298 buf = RTMemAlloc(mlen); 299 if (buf == NULL) 300 { 301 ret = 0; 302 goto no_sent; 303 } 304 m_copydata(m, 0, mlen, buf); 305 306 /* 307 * If there is urgent data, call sosendoob 308 * if not all was sent, sowrite will take care of the rest 309 * (The rest of this function is just an optimisation) 310 */ 311 if (so->so_urgc) 312 { 313 sbuf_bcpy(&so->so_rcv, buf, mlen); 314 RTMemFree(buf); 315 m_free(pData, m); 316 sosendoob(so); 317 return; 318 } 319 320 if(!sbuf_len(&so->so_rcv)) 321 ret = send(so->s, buf, mlen, 0); 322 no_sent: 323 324 if (ret <= 0) 325 { 326 STAM_COUNTER_INC(&pData->StatIOSBAppend_wf); 327 /* 328 * Nothing was written 329 * It's possible that the socket has closed, but 330 * we don't need to check because if it has closed, 331 * it will be detected in the normal way by soread() 332 */ 333 sbuf_bcpy(&so->so_rcv, buf, mlen); 334 STAM_PROFILE_STOP(&pData->StatIOSBAppend_pf_wf, a); 335 goto done; 336 } 337 else if (ret != mlen) 338 { 339 STAM_COUNTER_INC(&pData->StatIOSBAppend_wp); 340 /* 341 * Something was written, but not everything.. 342 * sbappendsb the rest 343 */ 344 sbuf_bcpy(&so->so_rcv, &buf[ret + 1], mlen - ret); 345 STAM_PROFILE_STOP(&pData->StatIOSBAppend_pf_wp, a); 346 goto done; 347 } /* else */ 348 /* Whatever happened, we free the mbuf */ 349 STAM_COUNTER_INC(&pData->StatIOSBAppend_wa); 350 STAM_PROFILE_STOP(&pData->StatIOSBAppend_pf_wa, a); 351 done: 352 RTMemFree(buf); 353 m_free(pData, m); 354 } 355 #endif -
trunk/src/VBox/Devices/Network/slirp/sbuf.h
r28800 r30045 28 28 #define _SBUF_H_ 29 29 30 #define sbflush(sb) sbdrop((sb),(sb)->sb_cc) 31 #define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) 30 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 31 # define sbflush(sb) sbdrop((sb),(sb)->sb_cc) 32 # define sbspace(sb) ((sb)->sb_datalen - (sb)->sb_cc) 33 # define SBUF_LEN(sb) ((sb)->sb_cc) 34 # define SBUF_SIZE(sb) ((sb)->sb_datalen) 35 32 36 33 37 struct sbuf … … 48 52 void sbappendsb (PNATState, struct sbuf *, struct mbuf *); 49 53 void sbcopy (struct sbuf *, int, int, char *); 54 #else 55 void sbappend (PNATState, struct socket *, struct mbuf *); 56 # include "bsd/sys/sbuf.h" 57 # define SBUF_LEN(sb) (sbuf_len(sb)) 58 /* XXX: @todo SBUF_SIZE is a hack both space and SIZE shouldn't be used out of subr_sbuf.c*/ 59 # define SBUF_SIZE(sb) ((sb)->s_size) 60 /* see subr_sbuf.c to verify the formula */ 61 # define sbspace(sb) (SBUF_SIZE(sb) - SBUF_LEN((sb)) - 1) 50 62 #endif 63 #endif -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r30016 r30045 791 791 WSACleanup(); 792 792 #endif 793 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 793 794 #ifdef LOG_ENABLED 794 795 Log(("\n" … … 806 807 "\n")); 807 808 #endif 809 #endif 808 810 RTMemFree(pData); 809 811 } … … 938 940 * we have something to send 939 941 */ 940 if (CONN_CANFSEND(so) && so->so_rcv.sb_cc)942 if (CONN_CANFSEND(so) && SBUF_LEN(&so->so_rcv)) 941 943 { 942 944 STAM_COUNTER_INC(&pData->StatTCPHot); … … 948 950 * receive more, and we have room for it XXX /2 ? 949 951 */ 950 if (CONN_CANFRCV(so) && (so->so_snd.sb_cc < (so->so_snd.sb_datalen/2))) 952 /* @todo: vvl - check which predicat here will be more useful here in rerm of new sbufs. */ 953 if (CONN_CANFRCV(so) && (SBUF_LEN(&so->so_snd) < (SBUF_SIZE(&so->so_snd)/2))) 951 954 { 952 955 STAM_COUNTER_INC(&pData->StatTCPHot); -
trunk/src/VBox/Devices/Network/slirp/socket.c
r30016 r30045 134 134 * a read() of 0 (or less) means it's disconnected 135 135 */ 136 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 136 137 int 137 138 soread(PNATState pData, struct socket *so) … … 311 312 return nn; 312 313 } 314 #else /* VBOX_WITH_SLIRP_BSD_SBUF */ 315 int 316 soread(PNATState pData, struct socket *so) 317 { 318 int n; 319 char *buf; 320 struct sbuf *sb = &so->so_snd; 321 size_t len = sbspace(sb); 322 int mss = so->so_tcpcb->t_maxseg; 323 324 STAM_PROFILE_START(&pData->StatIOread, a); 325 STAM_COUNTER_RESET(&pData->StatIORead_in_1); 326 STAM_COUNTER_RESET(&pData->StatIORead_in_2); 327 328 QSOCKET_LOCK(tcb); 329 SOCKET_LOCK(so); 330 QSOCKET_UNLOCK(tcb); 331 332 DEBUG_CALL("soread"); 333 DEBUG_ARG("so = %lx", (long)so); 334 335 if (len > mss) 336 len -= len % mss; 337 buf = RTMemAlloc(len); 338 if (buf == NULL) 339 { 340 LogRel(("NAT: can't alloc enough memory\n")); 341 return -1; 342 } 343 344 n = recv(so->s, buf, len, (so->so_tcpcb->t_force? MSG_OOB:0)); 345 if (n <= 0) 346 { 347 /* 348 * Special case for WSAEnumNetworkEvents: If we receive 0 bytes that 349 * _could_ mean that the connection is closed. But we will receive an 350 * FD_CLOSE event later if the connection was _really_ closed. With 351 * www.youtube.com I see this very often. Closing the socket too early 352 * would be dangerous. 353 */ 354 int status; 355 unsigned long pending = 0; 356 status = ioctlsocket(so->s, FIONREAD, &pending); 357 if (status < 0) 358 LogRel(("NAT:error in WSAIoctl: %d\n", errno)); 359 if (n == 0 && (pending != 0)) 360 { 361 SOCKET_UNLOCK(so); 362 STAM_PROFILE_STOP(&pData->StatIOread, a); 363 RTMemFree(buf); 364 return 0; 365 } 366 if ( n < 0 367 && ( errno == EINTR 368 || errno == EAGAIN 369 || errno == EWOULDBLOCK)) 370 { 371 SOCKET_UNLOCK(so); 372 STAM_PROFILE_STOP(&pData->StatIOread, a); 373 RTMemFree(buf); 374 return 0; 375 } 376 else 377 { 378 DEBUG_MISC((dfd, " --- soread() disconnected, n = %d, errno = %d-%s\n", 379 n, errno, strerror(errno))); 380 sofcantrcvmore(so); 381 tcp_sockclosed(pData, sototcpcb(so)); 382 SOCKET_UNLOCK(so); 383 STAM_PROFILE_STOP(&pData->StatIOread, a); 384 RTMemFree(buf); 385 return -1; 386 } 387 } 388 389 sbuf_bcat(sb, buf, n); 390 RTMemFree(buf); 391 return n; 392 } 393 #endif 313 394 314 395 /* … … 337 418 */ 338 419 ret = soread(pData, so); 339 tp->snd_up = tp->snd_una + so->so_snd.sb_cc;420 tp->snd_up = tp->snd_una + SBUF_LEN(&so->so_snd); 340 421 tp->t_force = 1; 341 422 tcp_output(pData, tp); 342 423 tp->t_force = 0; 343 424 } 344 425 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 345 426 /* 346 427 * Send urgent data … … 357 438 DEBUG_CALL("sosendoob"); 358 439 DEBUG_ARG("so = %lx", (long)so); 359 DEBUG_ARG("sb->sb_cc = %d", sb->sb_cc);360 440 361 441 if (so->so_urgc > sizeof(buff)) … … 558 638 return nn; 559 639 } 640 #else /* VBOX_WITH_SLIRP_BSD_SBUF */ 641 static int 642 do_sosend(struct socket *so, int fUrg) 643 { 644 struct sbuf *sb = &so->so_rcv; 645 646 int n, len; 647 648 DEBUG_CALL("sosendoob"); 649 DEBUG_ARG("so = %lx", (long)so); 650 651 len = sbuf_len(sb); 652 653 n = send(so->s, sbuf_data(sb), len, (fUrg ? MSG_OOB : 0)); 654 if (n < 0) 655 { 656 LogRel(("NAT: Can't sent sbuf via socket.\n")); 657 } 658 if (fUrg) 659 so->so_urgc -= n; 660 if (n > 0 && n < len) 661 { 662 char *ptr; 663 char *buff; 664 buff = RTMemAlloc(len); 665 if (buff == NULL) 666 { 667 LogRel(("NAT: No space to allocate temporal buffer\n")); 668 return -1; 669 } 670 ptr = sbuf_data(sb); 671 memcpy(buff, &ptr[n], len - n); 672 sbuf_bcpy(sb, buff, len - n); 673 RTMemFree(buff); 674 return n; 675 } 676 sbuf_clear(sb); 677 return n; 678 } 679 int 680 sosendoob(struct socket *so) 681 { 682 return do_sosend(so, 1); 683 } 684 685 /* 686 * Write data from so_rcv to so's socket, 687 * updating all sbuf field as necessary 688 */ 689 int 690 sowrite(PNATState pData, struct socket *so) 691 { 692 return do_sosend(so, 1); 693 } 694 #endif 560 695 561 696 /* … … 993 1128 sofwdrain(struct socket *so) 994 1129 { 995 if ( so->so_rcv.sb_cc)1130 if (SBUF_LEN(&so->so_rcv)) 996 1131 so->so_state |= SS_FWDRAIN; 997 1132 else -
trunk/src/VBox/Devices/Network/slirp/tcp_input.c
r30016 r30045 511 511 } 512 512 SOCKET_LOCK(so); 513 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 513 514 sbreserve(pData, &so->so_snd, tcp_sndspace); 514 515 sbreserve(pData, &so->so_rcv, tcp_rcvspace); 516 #else 517 sbuf_new(&so->so_snd, NULL, tcp_sndspace, SBUF_AUTOEXTEND); 518 sbuf_new(&so->so_rcv, NULL, tcp_rcvspace, SBUF_AUTOEXTEND); 519 #endif 515 520 516 521 /* tcp_last_so = so; */ /* XXX ? */ … … 633 638 tcpstat.tcps_rcvackpack++; 634 639 tcpstat.tcps_rcvackbyte += acked; 640 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 635 641 sbdrop(&so->so_snd, acked); 642 #else 643 if (sbuf_len(&so->so_snd) < acked) 644 /* drop all what sbuf have */ 645 sbuf_setpos(&so->so_snd, 0); 646 else 647 sbuf_setpos(&so->so_snd, sbuf_len(&so->so_snd) - acked); 648 #endif 636 649 tp->snd_una = ti->ti_ack; 637 650 m_freem(pData, m); … … 664 677 * we don't need this.. XXX??? 665 678 */ 666 if ( so->so_snd.sb_cc)679 if (SBUF_LEN(&so->so_snd)) 667 680 (void) tcp_output(pData, tp); 668 681 … … 1324 1337 tp->snd_cwnd = min(cw + incr, TCP_MAXWIN<<tp->snd_scale); 1325 1338 } 1326 if (acked > so->so_snd.sb_cc) 1327 { 1328 tp->snd_wnd -= so->so_snd.sb_cc; 1339 if (acked > SBUF_LEN(&so->so_snd)) 1340 { 1341 tp->snd_wnd -= SBUF_LEN(&so->so_snd); 1342 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 1329 1343 sbdrop(&so->so_snd, (int )so->so_snd.sb_cc); 1344 #else 1345 sbuf_clear(&so->so_snd); 1346 #endif 1330 1347 ourfinisacked = 1; 1331 1348 } 1332 1349 else 1333 1350 { 1351 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 1334 1352 sbdrop(&so->so_snd, acked); 1353 #else 1354 sbuf_setpos(&so->so_snd, sbuf_len(&so->so_snd) - acked); 1355 #endif 1335 1356 tp->snd_wnd -= acked; 1336 1357 ourfinisacked = 0; … … 1446 1467 TCPS_HAVERCVDFIN(tp->t_state) == 0) 1447 1468 { 1469 /* BSD's sbufs are auto extent so we shouldn't worry here */ 1470 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 1448 1471 /* 1449 1472 * This is a kludge, but if we receive and accept … … 1458 1481 goto dodata; 1459 1482 } 1483 #endif 1460 1484 /* 1461 1485 * If this segment advances the known urgent pointer, … … 1475 1499 { 1476 1500 tp->rcv_up = ti->ti_seq + ti->ti_urp; 1477 so->so_urgc = so->so_rcv.sb_cc+1501 so->so_urgc = SBUF_LEN(&so->so_rcv) + 1478 1502 (tp->rcv_up - tp->rcv_nxt); /* -1; */ 1479 1503 tp->rcv_up = ti->ti_seq + ti->ti_urp; … … 1539 1563 * buffer size. 1540 1564 */ 1541 len = so->so_rcv.sb_datalen- (tp->rcv_adv - tp->rcv_nxt);1565 len = SBUF_SIZE(&so->so_rcv) - (tp->rcv_adv - tp->rcv_nxt); 1542 1566 } 1543 1567 else … … 1891 1915 tp->snd_cwnd = mss; 1892 1916 1917 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 1893 1918 sbreserve(pData, &so->so_snd, tcp_sndspace+((tcp_sndspace%mss)?(mss-(tcp_sndspace%mss)):0)); 1894 1919 sbreserve(pData, &so->so_rcv, tcp_rcvspace+((tcp_rcvspace%mss)?(mss-(tcp_rcvspace%mss)):0)); 1920 #else 1921 sbuf_new(&so->so_snd, NULL, tcp_sndspace+((tcp_sndspace%mss)?(mss-(tcp_sndspace%mss)):0), SBUF_AUTOEXTEND); 1922 sbuf_new(&so->so_rcv, NULL, tcp_rcvspace+((tcp_rcvspace%mss)?(mss-(tcp_rcvspace%mss)):0), SBUF_AUTOEXTEND); 1923 #endif 1895 1924 1896 1925 DEBUG_MISC((dfd, " returning mss = %d\n", mss)); -
trunk/src/VBox/Devices/Network/slirp/tcp_output.c
r30016 r30045 155 155 * itself. 156 156 */ 157 if (off < so->so_snd.sb_cc)157 if (off < SBUF_LEN(&so->so_snd)) 158 158 flags &= ~TH_FIN; 159 159 win = 1; … … 166 166 } 167 167 168 len = min( so->so_snd.sb_cc, win) - off;168 len = min(SBUF_LEN(&so->so_snd), win) - off; 169 169 if (len < 0) 170 170 { … … 191 191 sendalot = 1; 192 192 } 193 if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + so->so_snd.sb_cc))193 if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + SBUF_LEN(&so->so_snd))) 194 194 flags &= ~TH_FIN; 195 195 … … 211 211 goto send; 212 212 if ((1 || idle || tp->t_flags & TF_NODELAY) && 213 len + off >= so->so_snd.sb_cc)213 len + off >= SBUF_LEN(&so->so_snd)) 214 214 goto send; 215 215 if (tp->t_force) … … 241 241 if (adv >= (long) (2 * tp->t_maxseg)) 242 242 goto send; 243 if (2 * adv >= (long) so->so_rcv.sb_datalen)243 if (2 * adv >= (long) SBUF_SIZE(&so->so_rcv)) 244 244 goto send; 245 245 } … … 285 285 * otherwise force out a byte. 286 286 */ 287 if ( so->so_snd.sb_cc287 if ( SBUF_LEN(&so->so_snd) 288 288 && tp->t_timer[TCPT_REXMT] == 0 289 289 && tp->t_timer[TCPT_PERSIST] == 0) … … 421 421 { 422 422 #endif 423 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 423 424 sbcopy(&so->so_snd, off, (int) len, mtod(m, caddr_t) + hdrlen); 424 425 m->m_len += len; 426 #else 427 m_copyback(pData, m, hdrlen, len, sbuf_data(&so->so_snd) + off); 428 #endif 425 429 #if 0 426 430 } … … 438 442 * a PUSH comes in.) 439 443 */ 440 if (off + len == so->so_snd.sb_cc)444 if (off + len == SBUF_LEN(&so->so_snd)) 441 445 flags |= TH_PUSH; 442 446 } … … 525 529 * but avoid silly window syndrome. 526 530 */ 527 if (win < (long)( so->so_rcv.sb_datalen/ 4) && win < (long)tp->t_maxseg)531 if (win < (long)(SBUF_SIZE(&so->so_rcv) / 4) && win < (long)tp->t_maxseg) 528 532 win = 0; 529 533 if (win > (long)TCP_MAXWIN << tp->rcv_scale) -
trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
r30016 r30045 306 306 if (!(so->so_state & SS_FACCEPTCONN)) 307 307 { 308 #ifndef VBOX_WITH_SLIRP_BSD_SBUF 308 309 sbfree(&so->so_rcv); 309 310 sbfree(&so->so_snd); 311 #else 312 sbuf_delete(&so->so_rcv); 313 sbuf_delete(&so->so_snd); 314 #endif 310 315 } 311 316 sofree(pData, so);
Note:
See TracChangeset
for help on using the changeset viewer.