Changeset 39409 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Nov 24, 2011 3:28:32 PM (13 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r39101 r39409 263 263 rbp->bp_ciaddr.s_addr = bc->addr.s_addr; /* Client IP address */ 264 264 } 265 #ifndef VBOX_WITH_NAT_SERVICE266 265 saddr.s_addr = RT_H2N_U32(RT_N2H_U32(pData->special_addr.s_addr) | CTL_ALIAS); 267 #else268 saddr.s_addr = pData->special_addr.s_addr;269 #endif270 266 Log(("NAT: DHCP: s_addr:%RTnaipv4\n", saddr)); 271 267 … … 739 735 q += offReply; 740 736 741 #ifndef VBOX_WITH_NAT_SERVICE742 737 saddr.sin_addr.s_addr = RT_H2N_U32(RT_N2H_U32(pData->special_addr.s_addr) | CTL_ALIAS); 743 #else744 saddr.sin_addr.s_addr = pData->special_addr.s_addr;745 #endif746 738 747 739 FILL_BOOTP_EXT(q, RFC2132_SRV_ID, 4, &saddr.sin_addr); -
trunk/src/VBox/Devices/Network/slirp/ext.h
r39101 r39409 83 83 vbox_slirp_printV(format, args); 84 84 va_end(args); 85 # else 86 NOREF(format); 87 NOREF(ignored); 85 88 # endif 86 89 } -
trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
r39101 r39409 722 722 m_append(pData, m, message_len, message); 723 723 } 724 #else 725 NOREF(message); 724 726 #endif 725 727 -
trunk/src/VBox/Devices/Network/slirp/ip_output.c
r39259 r39409 128 128 STAM_PROFILE_START(&pData->StatIP_output, a); 129 129 130 #ifdef LOG_ENABLED 130 131 LogFlowFunc(("ip_output: so = %R[natsock], m0 = %lx\n", so, (long)m0)); 132 #else 133 NOREF(so); 134 #endif 131 135 132 136 M_ASSERTPKTHDR(m); -
trunk/src/VBox/Devices/Network/slirp/misc.c
r39362 r39409 137 137 138 138 LogFlowFunc(("ENTER: %R[mzone], size:%d, pflags:%p, %RTbool\n", zone, size, pflags, fWait)); 139 #ifndef LOG_ENABLED 140 NOREF(size); 141 NOREF(pflags); 142 NOREF(fWait); 143 #endif 139 144 RTCritSectEnter(&zone->csZone); 140 145 for (;;) … … 210 215 struct item *it; 211 216 uma_zone_t zone; 217 #ifndef LOG_ENABLED 218 NOREF(size); 219 NOREF(flags); 220 #endif 212 221 213 222 Assert(item); … … 241 250 { 242 251 uma_zone_t zone = NULL; 252 #ifndef LOG_ENABLED 253 NOREF(flags1); 254 NOREF(flags2); 255 #endif 243 256 LogFlowFunc(("ENTER: name:%s size:%d, ctor:%p, dtor:%p, init:%p, fini:%p, flags1:%RX32, flags2:%RX32\n", 244 257 name, ctor, dtor, init, fini, flags1, flags2)); … … 328 341 reference counters */ 329 342 struct item *it = NULL; 343 #ifndef LOG_ENABLED 344 NOREF(zone); 345 #endif 330 346 LogFlowFunc(("ENTER: zone:%R[mzone], mem:%p\n", zone, mem)); 331 347 it = (struct item *)mem; /* 1st element */ … … 341 357 { 342 358 void *mem; 359 #ifndef LOG_ENABLED 360 NOREF(how); 361 #endif 343 362 Assert(zone->magic == ZONE_MAGIC); 344 363 LogFlowFunc(("ENTER: zone:%R[mzone], args:%p, how:%RX32\n", zone, args, how)); … … 374 393 Assert((mem)); 375 394 LogFlowFunc(("ENTER: zone:%R[mzone], mem:%p, flags:%p\n", zone, mem, flags)); 395 #ifndef LOG_ENABLED 396 NOREF(flags); 397 #endif 376 398 377 399 RTCritSectEnter(&zone->csZone); … … 431 453 LogFlowFunc(("ENTER: mem:%p, arg:%p\n", mem, arg)); 432 454 Assert(mem); 455 #ifndef LOG_ENABLED 456 NOREF(arg); 457 #endif 433 458 RTMemFree(mem); 434 459 LogFlowFuncLeave(); … … 437 462 void *uma_zalloc(uma_zone_t zone, int len) 438 463 { 464 #ifndef LOG_ENABLED 465 NOREF(zone); 466 NOREF(len); 467 #endif 439 468 LogFlowFunc(("ENTER: zone:%R[mzone], len:%d\n", zone, len)); 440 469 LogFlowFunc(("LEAVE: NULL")); -
trunk/src/VBox/Devices/Network/slirp/sbuf.c
r39101 r39409 203 203 { 204 204 int len, n, nn; 205 #ifndef VBOX_WITH_STATISTICS 206 NOREF(pData); 207 #endif 205 208 206 209 len = m_length(m, NULL); -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r39360 r39409 708 708 * ipstats(pData); tcpstats(pData); udpstats(pData); icmpstats(pData); 709 709 * mbufstats(pData); sockstats(pData); */ 710 #endif /* VBOX_WITH_STATISTICS */ 710 #else /* VBOX_WITH_STATISTICS */ 711 NOREF(pData); 712 NOREF(pDrvIns); 713 #endif /* !VBOX_WITH_STATISTICS */ 711 714 } 712 715 … … 722 725 # define COUNTING_COUNTER(name, dsc) DEREGISTER_COUNTER(name, pData) 723 726 # include "counters.h" 724 #endif /* VBOX_WITH_STATISTICS */ 727 #else /* VBOX_WITH_STATISTICS */ 728 NOREF(pData); 729 NOREF(pDrvIns); 730 #endif /* !VBOX_WITH_STATISTICS */ 725 731 } 726 732 … … 999 1005 so->so_poll_index = -1; 1000 1006 #endif 1001 #ifdef VBOX_WITH_NAT_UDP_SOCKET_CLONE1002 if (so->so_cloneOf)1003 CONTINUE_NO_UNLOCK(udp);1004 #endif1005 1007 1006 1008 /* … … 1024 1026 } 1025 1027 } 1028 #ifdef VBOX_WITH_NAT_UDP_SOCKET_CLONE 1029 if (so->so_cloneOf) 1030 CONTINUE_NO_UNLOCK(udp); 1031 #endif 1026 1032 1027 1033 /* … … 1484 1490 mr->m_len = sizeof(struct arphdr); 1485 1491 memcpy(reh->h_source, eh->h_source, ETH_ALEN); /* XXX: if_encap will swap src and dst*/ 1486 if ( 0 1487 #ifdef VBOX_WITH_NAT_SERVICE 1488 || (tip == pData->special_addr.s_addr) 1489 #endif 1490 || ( ((htip & pData->netmask) == RT_N2H_U32(pData->special_addr.s_addr)) 1491 && ( CTL_CHECK(htip, CTL_DNS) 1492 || CTL_CHECK(htip, CTL_ALIAS) 1493 || CTL_CHECK(htip, CTL_TFTP)) 1494 ) 1495 ) 1492 if ( ((htip & pData->netmask) == RT_N2H_U32(pData->special_addr.s_addr)) 1493 && ( CTL_CHECK(htip, CTL_DNS) 1494 || CTL_CHECK(htip, CTL_ALIAS) 1495 || CTL_CHECK(htip, CTL_TFTP))) 1496 1496 { 1497 1497 rah->ar_hrd = RT_H2N_U16_C(1); -
trunk/src/VBox/Devices/Network/slirp/tcp_subr.c
r39101 r39409 244 244 { 245 245 */ 246 #ifndef LOG_ENABLED 247 NOREF(err); 248 #endif 246 249 LogFlowFunc(("ENTER: tp = %R[tcpcb793], errno = %d\n", tp, err)); 247 250
Note:
See TracChangeset
for help on using the changeset viewer.