Changeset 63012 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Aug 4, 2016 9:25:17 PM (8 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r62511 r63012 592 592 return offReply; 593 593 } 594 else 595 { 596 bc = find_addr(pData, &daddr, bp->bp_hwaddr); 597 if (!bc) 598 { 599 LogRel(("NAT: DHCP Inform was ignored no boot client was found\n")); 600 return -1; 601 } 602 603 LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr.s_addr)); 604 offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 0); 605 return offReply; 606 } 607 608 return -1; 594 595 bc = find_addr(pData, &daddr, bp->bp_hwaddr); 596 if (!bc) 597 { 598 LogRel(("NAT: DHCP Inform was ignored no boot client was found\n")); 599 return -1; 600 } 601 602 LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr.s_addr)); 603 offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 0); 604 return offReply; 609 605 } 610 606 … … 617 613 return 0; 618 614 } 615 619 616 /** 620 617 * fields for discovering t -
trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
r62511 r63012 130 130 fd_nonblock(pData->icmp_socket.s); 131 131 NSOCK_INC(); 132 132 133 #else /* RT_OS_WINDOWS */ 134 RT_NOREF(iIcmpCacheLimit); 135 133 136 if (icmpwin_init(pData) != 0) 134 137 return 1; … … 618 621 struct icmp *icp; 619 622 void *payload; 623 RT_NOREF(minsize); 620 624 621 625 LogFlow(("icmp_error: msrc = %p, msrc_len = %d\n", -
trunk/src/VBox/Devices/Network/slirp/ip_output.c
r62511 r63012 174 174 175 175 if (!(m->m_flags & M_SKIP_FIREWALL)){ 176 struct m_tag *t;177 176 STAM_PROFILE_START(&pData->StatALIAS_output, b); 178 177 rc = LibAliasOut(pData->proxy_alias, mtod(m, char *), m_length(m, NULL)); … … 293 292 send_or_free: 294 293 if (!(m->m_flags & M_SKIP_FIREWALL)){ 295 /* @todo:We can't alias all fragments because the way libalias processing294 /** @todo We can't alias all fragments because the way libalias processing 296 295 * the fragments brake the sequence. libalias put alias_address to the source 297 296 * address of IP header of fragment, while IP header of the first packet is … … 302 301 * solution. 303 302 */ 304 struct m_tag *t;305 303 int rcLa; 306 304 -
trunk/src/VBox/Devices/Network/slirp/misc.c
r62511 r63012 91 91 { 92 92 # ifdef FIONBIO 93 # ifdef RT_OS_WINDOWS 94 u_long opt = 1; 95 # else 93 96 int opt = 1; 94 97 # endif 95 98 ioctlsocket(fd, FIONBIO, &opt); 96 99 # else /* !FIONBIO */ … … 171 174 rc = 0; 172 175 if (zone->pfInit) 173 rc = zone->pfInit(zone->pData, (void *)&it[1], zone->size, M_DONTWAIT);176 rc = zone->pfInit(zone->pData, (void *)&it[1], (int /*sigh*/)zone->size, M_DONTWAIT); 174 177 if (rc == 0) 175 178 { … … 200 203 * it into sub-zone conforming chunks. 201 204 */ 202 sub_area = slirp_uma_alloc(zone->master_zone, zone->master_zone->size, NULL, 0);205 sub_area = slirp_uma_alloc(zone->master_zone, (int /*sigh*/)zone->master_zone->size, NULL, 0); 203 206 if (!sub_area) 204 207 { … … 253 256 if (zone->pfFini) 254 257 { 255 zone->pfFini(zone->pData, item, zone->size);258 zone->pfFini(zone->pData, item, (int /*sigh*/)zone->size); 256 259 } 257 260 if (zone->pfDtor) 258 261 { 259 zone->pfDtor(zone->pData, item, zone->size, NULL);262 zone->pfDtor(zone->pData, item, (int /*sigh*/)zone->size, NULL); 260 263 } 261 264 LIST_INSERT_HEAD(&zone->free_items, it, list); … … 388 391 } 389 392 RTCritSectEnter(&zone->csZone); 390 mem = zone->pfAlloc(zone, zone->size, NULL, 0);393 mem = zone->pfAlloc(zone, (int /*sigh*/)zone->size, NULL, 0); 391 394 if (mem != NULL) 392 395 { 393 396 if (zone->pfCtor) 394 zone->pfCtor(zone->pData, mem, zone->size, args, M_DONTWAIT);397 zone->pfCtor(zone->pData, mem, (int /*sigh*/)zone->size, args, M_DONTWAIT); 395 398 } 396 399 RTCritSectLeave(&zone->csZone); … … 494 497 { 495 498 struct mbuf *m; 496 size_t size = MCLBYTES;499 int size = MCLBYTES; 497 500 LogFlowFunc(("ENTER: cbMin:%d, ppvBuf:%p, pcbBuf:%p\n", cbMin, ppvBuf, pcbBuf)); 498 501 -
trunk/src/VBox/Devices/Network/slirp/sbuf.c
r62511 r63012 77 77 { 78 78 /* Already alloced, realloc if necessary */ 79 if (sb->sb_datalen != size)79 if (sb->sb_datalen != (u_int)size) 80 80 { 81 81 sb->sb_wptr = -
trunk/src/VBox/Devices/Network/slirp/slirp.h
r62761 r63012 474 474 int slirp_arp_lookup_ether_by_ip(PNATState, uint32_t, uint8_t *); 475 475 476 static inline size_tslirp_size(PNATState pData)476 DECLINLINE(unsigned) slirp_size(PNATState pData) 477 477 { 478 478 if (if_mtu < MSIZE) -
trunk/src/VBox/Devices/Network/slirp/slirp_dns.c
r62696 r63012 31 31 # include <iprt/win/iphlpapi.h> 32 32 33 static int get_dns_addr_domain(PNATState pData, 34 const char **ppszDomain) 35 { 36 ULONG flags = GAA_FLAG_INCLUDE_PREFIX; /*GAA_FLAG_INCLUDE_ALL_INTERFACES;*/ /* all interfaces registered in NDIS */ 33 static int get_dns_addr_domain(PNATState pData) 34 { 35 //ULONG flags = GAA_FLAG_INCLUDE_PREFIX; /*GAA_FLAG_INCLUDE_ALL_INTERFACES;*/ /* all interfaces registered in NDIS */ 37 36 PIP_ADAPTER_ADDRESSES pAdapterAddr = NULL; 38 37 PIP_ADAPTER_ADDRESSES pAddr = NULL; 39 38 PIP_ADAPTER_DNS_SERVER_ADDRESS pDnsAddr = NULL; 40 39 ULONG size; 41 int wlen = 0;42 40 char *pszSuffix; 43 41 struct dns_domain_entry *pDomain = NULL; … … 154 152 #include "resolv_conf_parser.h" 155 153 156 static int get_dns_addr_domain(PNATState pData , const char **ppszDomain)154 static int get_dns_addr_domain(PNATState pData) 157 155 { 158 156 struct rcp_state st; … … 222 220 } 223 221 224 if (ppszDomain && st.rcps_domain != 0)225 *ppszDomain = RTStrDup(st.rcps_domain);226 227 222 return 0; 228 223 } … … 244 239 * so we should other way to configure DNS settings. 245 240 */ 246 if (get_dns_addr_domain(pData, NULL) < 0) 247 { 241 if (get_dns_addr_domain(pData) < 0) 248 242 pData->fUseHostResolver = true; 249 }250 243 else 251 244 {
Note:
See TracChangeset
for help on using the changeset viewer.