VirtualBox

Changeset 36410 in vbox


Ignore:
Timestamp:
Mar 24, 2011 4:39:24 PM (14 years ago)
Author:
vboxsync
Message:

slipr: %R[ether] -> %RTmac.

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

Legend:

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

    r36354 r36410  
    243243
    244244static DECLCALLBACK(size_t)
    245 print_ether_address(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
    246                    const char *pszType, void const *pvValue,
    247                    int cchWidth, int cchPrecision, unsigned fFlags,
    248                    void *pvUser)
    249 {
    250     char *ether = (char *)pvValue;
    251 
    252     AssertReturn(strcmp(pszType, "ether") == 0, 0);
    253     if (ether)
    254         return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
    255             "[ether %hhx:%hhx:%hhx:%hhx:%hhx:%hhx]",
    256             ether[0], ether[1], ether[2],
    257             ether[3], ether[4], ether[5]);
    258     else
    259         return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "[ether null]");
    260 }
    261 
    262 static DECLCALLBACK(size_t)
    263245print_socket(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput,
    264246             const char *pszType, void const *pvValue,
     
    390372    if (!g_fFormatRegistered)
    391373    {
    392         /*
    393          * XXX(r - frank): Move this to IPRT using RTNETADDRIPV4.
    394          * Use the specifier %RNAipv4.
     374        /** @todo r=frank: XXX Move this to IPRT using RTNETADDRIPV4.
     375         * Use the specifier %RTnaipv4 (tip: takes an "uint32_t" instead of an
     376         * address).
    395377         */
    396378        rc = RTStrFormatTypeRegister("IP4", print_ipv4_address, NULL);
    397379        AssertRC(rc);
    398         rc = RTStrFormatTypeRegister("ether", print_ether_address, NULL);
    399         AssertRC(rc);
     380
    400381        rc = RTStrFormatTypeRegister("natsock", print_socket, NULL);
    401382        AssertRC(rc);
    402383        rc = RTStrFormatTypeRegister("natwinnetevents",
    403             print_networkevents, NULL);
     384                                     print_networkevents, NULL);
    404385        AssertRC(rc);
    405386        rc = RTStrFormatTypeRegister("tcpcb793", printTcpcbRfc793, NULL);
  • trunk/src/VBox/Devices/Network/slirp/slirp.c

    r36358 r36410  
    14591459                if (!fGratuitousArpReported)
    14601460                {
    1461                     LogRel(("NAT: Gratuitous ARP [IP:%R[IP4], ether:%R[ether]]\n",
     1461                    LogRel(("NAT: Gratuitous ARP [IP:%R[IP4], ether:%RTmac]\n",
    14621462                            ah->ar_sip, ah->ar_sha));
    14631463                    fGratuitousArpReported = true;
     
    20732073        if (!fBroadcastEtherAddReported)
    20742074        {
    2075             LogRel(("NAT: Attempt to add pair [%R[ether]:%R[IP4]] in ARP cache was ignored\n",
     2075            LogRel(("NAT: Attempt to add pair [%RTmac:%R[IP4]] in ARP cache was ignored\n",
    20762076                    mac, &dst));
    20772077            fBroadcastEtherAddReported = true;
     
    21232123    LIST_FOREACH(ac, &pData->arp_cache, list)
    21242124    {
    2125         pHlp->pfnPrintf(pHlp, " %R[IP4] %R[ether]\n", &ac->ip, &ac->ether);
     2125        pHlp->pfnPrintf(pHlp, " %R[IP4] %RTmac\n", &ac->ip, &ac->ether);
    21262126    }
    21272127
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