VirtualBox

Changeset 37746 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jul 4, 2011 6:07:37 AM (13 years ago)
Author:
vboxsync
Message:

NAT/debug: %R[naipv4] -> %RTnaipv4 and &IP -> IP.

Location:
trunk/src/VBox/Devices/Network/slirp
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/bootp.c

    r37724 r37746  
    256256    /* Address/port of the DHCP server. */
    257257    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));
    259259    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));
    261261    if (fDhcpRequest)
    262262    {
     
    268268    saddr.s_addr = pData->special_addr.s_addr;
    269269#endif
    270     Log(("NAT: DHCP: s_addr:%R[naipv4]\n", &saddr));
     270    Log(("NAT: DHCP: s_addr:%RTnaipv4\n", saddr));
    271271
    272272#define FILL_BOOTP_EXT(q, tag, len, pvalue)                     \
     
    455455               if ((bp->bp_ciaddr.s_addr & RT_H2N_U32(pData->netmask)) != pData->special_addr.s_addr)
    456456               {
    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));
    458458                   offReply = dhcp_send_nack(pData, bp, bc, m);
    459459                   return offReply;
     
    479479            if ((ui32 & RT_H2N_U32(pData->netmask)) != pData->special_addr.s_addr)
    480480            {
    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));
    482482                offReply = dhcp_send_nack(pData, bp, bc, m);
    483483                return offReply;
     
    503503    }
    504504
    505     LogRel(("NAT: DHCP offered IP address %R[naipv4]\n", &bc->addr));
     505    LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr));
    506506    offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 1);
    507507    return offReply;
     
    530530
    531531        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));
    533533        offReply = dhcp_send_offer(pData, bp, bc, m);
    534534        return offReply;
     
    543543        }
    544544
    545         LogRel(("NAT: DHCP offered IP address %R[naipv4]\n", &bc->addr));
     545        LogRel(("NAT: DHCP offered IP address %RTnaipv4\n", bc->addr));
    546546        offReply = dhcp_send_ack(pData, bp, bc, m, /* fDhcpRequest=*/ 0);
    547547        return offReply;
     
    554554{
    555555    int rc = release_addr(pData, &bp->bp_ciaddr);
    556     LogRel(("NAT: %s %R[naipv4]\n",
     556    LogRel(("NAT: %s %RTnaipv4\n",
    557557            RT_SUCCESS(rc) ? "DHCP released IP address" : "Ignored DHCP release for IP address",
    558558            &bp->bp_ciaddr));
     
    710710                bc->addr.s_addr = req_ip.s_addr;
    711711                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));
    713713            }
    714714            /* no response required */
  • trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c

    r37724 r37746  
    358358        so->so_expire = curtime + recursive_timeout * 1000; /* let's slirp to care about expiration */
    359359        /* 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));
    361361        if ((byte = sendto(so->s, buf, (unsigned int)byte, 0,
    362362                    (struct sockaddr *)&addr,
     
    367367        }
    368368        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));
    370370#endif
    371371        ++authoritative_queries;
  • trunk/src/VBox/Devices/Network/slirp/ip_icmp.c

    r37724 r37746  
    263263            {
    264264                /* 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));
    266266                if (   so->so_faddr.s_addr == faddr.s_addr
    267267                    && so->so_fport == fport
  • trunk/src/VBox/Devices/Network/slirp/ip_input.c

    r37724 r37746  
    113113    LogFlow(("ip_input: m = %lx\n", (long)m));
    114114    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));
    116116
    117117    ipstat.ips_total++;
     
    238238
    239239bad_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));
    242242    m_freem(pData, m);
    243243no_free_m:
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c

    r37724 r37746  
    7979        return -1;
    8080
    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",
    8282        __FUNCTION__, ntohs(*ah->dport), ntohs(*ah->sport),
    83         &ah->oaddr, &ah->aaddr));
     83        ah->oaddr, ah->aaddr));
    8484
    8585    if (   (ntohs(*ah->dport) == DNS_CONTROL_PORT_NUMBER
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r37724 r37746  
    335335            }
    336336
    337             Log(("NAT: adding %R[naipv4] to DNS server list\n", &InAddr));
     337            Log(("NAT: adding %RTnaipv4 to DNS server list\n", InAddr));
    338338            if ((InAddr.s_addr & RT_H2N_U32_C(IN_CLASSA_NET)) == RT_N2H_U32_C(INADDR_LOOPBACK & IN_CLASSA_NET))
    339339                pDns->de_addr.s_addr = RT_H2N_U32(RT_N2H_U32(pData->special_addr.s_addr) | CTL_ALIAS);
     
    14701470                if (!fGratuitousArpReported)
    14711471                {
    1472                     LogRel(("NAT: Gratuitous ARP [IP:%R[naipv4], ether:%RTmac]\n",
     1472                    LogRel(("NAT: Gratuitous ARP [IP:%RTnaipv4, ether:%RTmac]\n",
    14731473                            ah->ar_sip, ah->ar_sha));
    14741474                    fGratuitousArpReported = true;
     
    16861686#endif
    16871687
    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));
    16901690
    16911691        if (rule->proto == IPPROTO_UDP)
     
    18001800            && rule->activated)
    18011801        {
    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));
    18041804
    18051805            LibAliasUninit(rule->so->so_la);
     
    20952095        if (!fBroadcastEtherAddReported)
    20962096        {
    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));
    20992099            fBroadcastEtherAddReported = true;
    21002100        }
     
    21452145    LIST_FOREACH(ac, &pData->arp_cache, list)
    21462146    {
    2147         pHlp->pfnPrintf(pHlp, " %R[naipv4] %RTmac\n", &ac->ip, &ac->ether);
     2147        pHlp->pfnPrintf(pHlp, " %RTnaipv4 %RTmac\n", ac->ip, &ac->ether);
    21482148    }
    21492149
     
    21512151    LIST_FOREACH(rule, &pData->port_forward_rule_head, list)
    21522152    {
    2153         pHlp->pfnPrintf(pHlp, " %s %d => %R[naipv4]:%d %c\n",
     2153        pHlp->pfnPrintf(pHlp, " %s %d => %RTnaipv4:%d %c\n",
    21542154                        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,
    21562156                        rule->activated ? ' ' : '*');
    21572157    }
  • trunk/src/VBox/Devices/Network/slirp/udp.c

    r37724 r37746  
    9797    LogFlow(("udp_input: m = %lx, iphlen = %d\n", (long)m, iphlen));
    9898    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));
    100100
    101101    udpstat.udps_ipackets++;
     
    296296        m->m_data -= iphlen;
    297297        *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));
    300300        icmp_error(pData, m, ICMP_UNREACH, ICMP_UNREACH_NET, 0, strerror(errno));
    301301        so->so_m = NULL;
     
    314314
    315315bad_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",
    317317        ip->ip_id, &ip->ip_dst, ip->ip_len));
    318318
     
    518518    if (bind(so->s,(struct sockaddr *)&addr, addrlen) < 0)
    519519    {
    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));
    521521        udp_detach(pData, so);
    522522        return NULL;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette