Changeset 37746 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jul 4, 2011 6:07:37 AM (13 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r37724 r37746 256 256 /* Address/port of the DHCP server. */ 257 257 rbp->bp_yiaddr = bc->addr; /* Client IP address */ 258 Log(("NAT: DHCP: bp_yiaddr:%R [naipv4]\n", &rbp->bp_yiaddr));258 Log(("NAT: DHCP: bp_yiaddr:%RTnaipv4\n", rbp->bp_yiaddr)); 259 259 rbp->bp_siaddr = pData->tftp_server; /* Next Server IP address, i.e. TFTP */ 260 Log(("NAT: DHCP: bp_siaddr:%R [naipv4]\n", &rbp->bp_siaddr));260 Log(("NAT: DHCP: bp_siaddr:%RTnaipv4\n", rbp->bp_siaddr)); 261 261 if (fDhcpRequest) 262 262 { … … 268 268 saddr.s_addr = pData->special_addr.s_addr; 269 269 #endif 270 Log(("NAT: DHCP: s_addr:%R [naipv4]\n", &saddr));270 Log(("NAT: DHCP: s_addr:%RTnaipv4\n", saddr)); 271 271 272 272 #define FILL_BOOTP_EXT(q, tag, len, pvalue) \ … … 455 455 if ((bp->bp_ciaddr.s_addr & RT_H2N_U32(pData->netmask)) != pData->special_addr.s_addr) 456 456 { 457 LogRel(("NAT: Client %R [naipv4] requested IP -- sending NAK\n", &bp->bp_ciaddr));457 LogRel(("NAT: Client %RTnaipv4 requested IP -- sending NAK\n", bp->bp_ciaddr)); 458 458 offReply = dhcp_send_nack(pData, bp, bc, m); 459 459 return offReply; … … 479 479 if ((ui32 & RT_H2N_U32(pData->netmask)) != pData->special_addr.s_addr) 480 480 { 481 LogRel(("NAT: address %R [naipv4] has been requested -- sending NAK\n", &ui32));481 LogRel(("NAT: address %RTnaipv4 has been requested -- sending NAK\n", ui32)); 482 482 offReply = dhcp_send_nack(pData, bp, bc, m); 483 483 return offReply; … … 503 503 } 504 504 505 LogRel(("NAT: DHCP offered IP address %R [naipv4]\n", &bc->addr));505 LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr)); 506 506 offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 1); 507 507 return offReply; … … 530 530 531 531 bc->xid = bp->bp_xid; 532 LogRel(("NAT: DHCP offered IP address %R [naipv4]\n", &bc->addr));532 LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr)); 533 533 offReply = dhcp_send_offer(pData, bp, bc, m); 534 534 return offReply; … … 543 543 } 544 544 545 LogRel(("NAT: DHCP offered IP address %R [naipv4]\n", &bc->addr));545 LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr)); 546 546 offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 0); 547 547 return offReply; … … 554 554 { 555 555 int rc = release_addr(pData, &bp->bp_ciaddr); 556 LogRel(("NAT: %s %R [naipv4]\n",556 LogRel(("NAT: %s %RTnaipv4\n", 557 557 RT_SUCCESS(rc) ? "DHCP released IP address" : "Ignored DHCP release for IP address", 558 558 &bp->bp_ciaddr)); … … 710 710 bc->addr.s_addr = req_ip.s_addr; 711 711 slirp_arp_who_has(pData, bc->addr.s_addr); 712 LogRel(("NAT: %R [naipv4] has been already registered\n", &req_ip));712 LogRel(("NAT: %RTnaipv4 has been already registered\n", req_ip)); 713 713 } 714 714 /* no response required */ -
trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c
r37724 r37746 358 358 so->so_expire = curtime + recursive_timeout * 1000; /* let's slirp to care about expiration */ 359 359 /* send it to our authoritative server */ 360 Log2(("NAT: request will be sent to %R [naipv4] on %R[natsock]\n", &addr.sin_addr, so));360 Log2(("NAT: request will be sent to %RTnaipv4 on %R[natsock]\n", addr.sin_addr, so)); 361 361 if ((byte = sendto(so->s, buf, (unsigned int)byte, 0, 362 362 (struct sockaddr *)&addr, … … 367 367 } 368 368 so->so_state = SS_ISFCONNECTED; /* now it's selected */ 369 Log2(("NAT: request was sent to %R [naipv4] on %R[natsock]\n", &addr.sin_addr, so));369 Log2(("NAT: request was sent to %RTnaipv4 on %R[natsock]\n", addr.sin_addr, so)); 370 370 #endif 371 371 ++authoritative_queries; -
trunk/src/VBox/Devices/Network/slirp/ip_icmp.c
r37724 r37746 263 263 { 264 264 /* Should be reaplaced by hash here */ 265 Log(("trying:%R[natsock] against %R [naipv4]:%d lport=%d hlport=%d\n", so, &faddr, fport, lport, so->so_hlport));265 Log(("trying:%R[natsock] against %RTnaipv4:%d lport=%d hlport=%d\n", so, &faddr, fport, lport, so->so_hlport)); 266 266 if ( so->so_faddr.s_addr == faddr.s_addr 267 267 && so->so_fport == fport -
trunk/src/VBox/Devices/Network/slirp/ip_input.c
r37724 r37746 113 113 LogFlow(("ip_input: m = %lx\n", (long)m)); 114 114 ip = mtod(m, struct ip *); 115 Log2(("ip_dst=%R [naipv4](len:%d) m_len = %d\n", &ip->ip_dst, RT_N2H_U16(ip->ip_len), m->m_len));115 Log2(("ip_dst=%RTnaipv4(len:%d) m_len = %d\n", ip->ip_dst, RT_N2H_U16(ip->ip_len), m->m_len)); 116 116 117 117 ipstat.ips_total++; … … 238 238 239 239 bad_free_m: 240 Log2(("NAT: IP datagram to %R [naipv4]with size(%d) claimed as bad\n",241 &ip->ip_dst, ip->ip_len));240 Log2(("NAT: IP datagram to %RTnaipv4 with size(%d) claimed as bad\n", 241 ip->ip_dst, ip->ip_len)); 242 242 m_freem(pData, m); 243 243 no_free_m: -
trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c
r37724 r37746 79 79 return -1; 80 80 81 Log(("NAT:%s: ah(dport: %hd, sport: %hd) oaddr:%R [naipv4] aaddr:%R[naipv4]\n",81 Log(("NAT:%s: ah(dport: %hd, sport: %hd) oaddr:%RTnaipv4 aaddr:%RTnaipv4\n", 82 82 __FUNCTION__, ntohs(*ah->dport), ntohs(*ah->sport), 83 &ah->oaddr, &ah->aaddr));83 ah->oaddr, ah->aaddr)); 84 84 85 85 if ( (ntohs(*ah->dport) == DNS_CONTROL_PORT_NUMBER -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r37724 r37746 335 335 } 336 336 337 Log(("NAT: adding %R [naipv4] to DNS server list\n", &InAddr));337 Log(("NAT: adding %RTnaipv4 to DNS server list\n", InAddr)); 338 338 if ((InAddr.s_addr & RT_H2N_U32_C(IN_CLASSA_NET)) == RT_N2H_U32_C(INADDR_LOOPBACK & IN_CLASSA_NET)) 339 339 pDns->de_addr.s_addr = RT_H2N_U32(RT_N2H_U32(pData->special_addr.s_addr) | CTL_ALIAS); … … 1470 1470 if (!fGratuitousArpReported) 1471 1471 { 1472 LogRel(("NAT: Gratuitous ARP [IP:%R [naipv4], ether:%RTmac]\n",1472 LogRel(("NAT: Gratuitous ARP [IP:%RTnaipv4, ether:%RTmac]\n", 1473 1473 ah->ar_sip, ah->ar_sha)); 1474 1474 fGratuitousArpReported = true; … … 1686 1686 #endif 1687 1687 1688 LogRel(("NAT: set redirect %s host port %d => guest port %d @ %R [naipv4]\n",1689 rule->proto == IPPROTO_UDP ? "UDP" : "TCP", rule->host_port, rule->guest_port, &guest_addr));1688 LogRel(("NAT: set redirect %s host port %d => guest port %d @ %RTnaipv4\n", 1689 rule->proto == IPPROTO_UDP ? "UDP" : "TCP", rule->host_port, rule->guest_port, guest_addr)); 1690 1690 1691 1691 if (rule->proto == IPPROTO_UDP) … … 1800 1800 && rule->activated) 1801 1801 { 1802 LogRel(("NAT: remove redirect %s host port %d => guest port %d @ %R [naipv4]\n",1803 rule->proto == IPPROTO_UDP ? "UDP" : "TCP", rule->host_port, rule->guest_port, &guest_addr));1802 LogRel(("NAT: remove redirect %s host port %d => guest port %d @ %RTnaipv4\n", 1803 rule->proto == IPPROTO_UDP ? "UDP" : "TCP", rule->host_port, rule->guest_port, guest_addr)); 1804 1804 1805 1805 LibAliasUninit(rule->so->so_la); … … 2095 2095 if (!fBroadcastEtherAddReported) 2096 2096 { 2097 LogRel(("NAT: Attempt to add pair [%RTmac:%R [naipv4]] in ARP cache was ignored\n",2098 mac, &dst));2097 LogRel(("NAT: Attempt to add pair [%RTmac:%RTnaipv4] in ARP cache was ignored\n", 2098 mac, dst)); 2099 2099 fBroadcastEtherAddReported = true; 2100 2100 } … … 2145 2145 LIST_FOREACH(ac, &pData->arp_cache, list) 2146 2146 { 2147 pHlp->pfnPrintf(pHlp, " %R [naipv4] %RTmac\n", &ac->ip, &ac->ether);2147 pHlp->pfnPrintf(pHlp, " %RTnaipv4 %RTmac\n", ac->ip, &ac->ether); 2148 2148 } 2149 2149 … … 2151 2151 LIST_FOREACH(rule, &pData->port_forward_rule_head, list) 2152 2152 { 2153 pHlp->pfnPrintf(pHlp, " %s %d => %R [naipv4]:%d %c\n",2153 pHlp->pfnPrintf(pHlp, " %s %d => %RTnaipv4:%d %c\n", 2154 2154 rule->proto == IPPROTO_UDP ? "UDP" : "TCP", 2155 rule->host_port, &rule->guest_addr.s_addr, rule->guest_port,2155 rule->host_port, rule->guest_addr.s_addr, rule->guest_port, 2156 2156 rule->activated ? ' ' : '*'); 2157 2157 } -
trunk/src/VBox/Devices/Network/slirp/udp.c
r37724 r37746 97 97 LogFlow(("udp_input: m = %lx, iphlen = %d\n", (long)m, iphlen)); 98 98 ip = mtod(m, struct ip *); 99 Log2(("%R [naipv4] iphlen = %d\n", &ip->ip_dst, iphlen));99 Log2(("%RTnaipv4 iphlen = %d\n", ip->ip_dst, iphlen)); 100 100 101 101 udpstat.udps_ipackets++; … … 296 296 m->m_data -= iphlen; 297 297 *ip = save_ip; 298 Log2(("NAT: UDP tx errno = %d (%s) on sent to %R [naipv4]\n",299 errno, strerror(errno), &ip->ip_dst));298 Log2(("NAT: UDP tx errno = %d (%s) on sent to %RTnaipv4\n", 299 errno, strerror(errno), ip->ip_dst)); 300 300 icmp_error(pData, m, ICMP_UNREACH, ICMP_UNREACH_NET, 0, strerror(errno)); 301 301 so->so_m = NULL; … … 314 314 315 315 bad_free_mbuf: 316 Log2(("NAT: UDP(id: %hd) datagram to %R [naipv4]with size(%d) claimed as bad\n",316 Log2(("NAT: UDP(id: %hd) datagram to %RTnaipv4 with size(%d) claimed as bad\n", 317 317 ip->ip_id, &ip->ip_dst, ip->ip_len)); 318 318 … … 518 518 if (bind(so->s,(struct sockaddr *)&addr, addrlen) < 0) 519 519 { 520 LogRel(("NAT: bind to %R [naipv4] has been failed\n", &addr.sin_addr));520 LogRel(("NAT: bind to %RTnaipv4 has been failed\n", addr.sin_addr)); 521 521 udp_detach(pData, so); 522 522 return NULL;
Note:
See TracChangeset
for help on using the changeset viewer.