Changeset 36410 in vbox
- Timestamp:
- Mar 24, 2011 4:39:24 PM (14 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/debug.c
r36354 r36410 243 243 244 244 static 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 else259 return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0, "[ether null]");260 }261 262 static DECLCALLBACK(size_t)263 245 print_socket(PFNRTSTROUTPUT pfnOutput, void *pvArgOutput, 264 246 const char *pszType, void const *pvValue, … … 390 372 if (!g_fFormatRegistered) 391 373 { 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). 395 377 */ 396 378 rc = RTStrFormatTypeRegister("IP4", print_ipv4_address, NULL); 397 379 AssertRC(rc); 398 rc = RTStrFormatTypeRegister("ether", print_ether_address, NULL); 399 AssertRC(rc); 380 400 381 rc = RTStrFormatTypeRegister("natsock", print_socket, NULL); 401 382 AssertRC(rc); 402 383 rc = RTStrFormatTypeRegister("natwinnetevents", 403 print_networkevents, NULL);384 print_networkevents, NULL); 404 385 AssertRC(rc); 405 386 rc = RTStrFormatTypeRegister("tcpcb793", printTcpcbRfc793, NULL); -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r36358 r36410 1459 1459 if (!fGratuitousArpReported) 1460 1460 { 1461 LogRel(("NAT: Gratuitous ARP [IP:%R[IP4], ether:%R [ether]]\n",1461 LogRel(("NAT: Gratuitous ARP [IP:%R[IP4], ether:%RTmac]\n", 1462 1462 ah->ar_sip, ah->ar_sha)); 1463 1463 fGratuitousArpReported = true; … … 2073 2073 if (!fBroadcastEtherAddReported) 2074 2074 { 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", 2076 2076 mac, &dst)); 2077 2077 fBroadcastEtherAddReported = true; … … 2123 2123 LIST_FOREACH(ac, &pData->arp_cache, list) 2124 2124 { 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); 2126 2126 } 2127 2127
Note:
See TracChangeset
for help on using the changeset viewer.