VirtualBox

Changeset 57251 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Aug 8, 2015 11:09:49 PM (9 years ago)
Author:
vboxsync
Message:

style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp

    r56723 r57251  
    14631463    u_int32_t if_unit = ifnet_unit(pIfNet);
    14641464
    1465     for (;;) {
     1465    for (;;)
     1466    {
    14661467        mbuf_t m;
    1467         size_t len = sizeof(struct kern_event_msg) - sizeof(u_int32_t)
    1468             + sizeof(struct kev_in6_data);
     1468        size_t len = sizeof(struct kern_event_msg) - sizeof(u_int32_t) + sizeof(struct kev_in6_data);
    14691469
    14701470        error = sock_receivembuf(pSysSock, NULL, &m, 0, &len);
    1471         if (error == EWOULDBLOCK)
    1472         {
    1473             Log(("vboxNetFltDarwinSysSockUpcall: EWOULDBLOCK - we are done\n"));
    1474             error = 0;
     1471        if (error != 0)
     1472        {
     1473            if (error == EWOULDBLOCK)
     1474            {
     1475                Log(("vboxNetFltDarwinSysSockUpcall: EWOULDBLOCK - we are done\n"));
     1476                error = 0;
     1477            }
     1478            else
     1479                Log(("sock_receivembuf: error %d\n", error));
    14751480            break;
    14761481        }
    1477         else if (error != 0)
    1478         {
    1479             Log(("sock_receivembuf: error %d\n", error));
    1480             break;
    1481         }
    14821482
    14831483        if (len < sizeof(struct kern_event_msg) - sizeof(u_int32_t))
    14841484        {
    1485             Log(("vboxNetFltDarwinSysSockUpcall: %u bytes is too short\n",
    1486                  (unsigned int)len));
     1485            Log(("vboxNetFltDarwinSysSockUpcall: %u bytes is too short\n", (unsigned int)len));
    14871486            mbuf_freem(m);
    14881487            return;
     
    15211520            {
    15221521                case KEV_INET_NEW_ADDR:
    1523                     Log(("KEV_INET_NEW_ADDR %.*s%d: %RTnaipv4\n",
    1524                          IFNAMSIZ, link->if_name, link->if_unit, pAddr->IPv4.u));
    1525 
    1526                     pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort,
    1527                         /* :fAdded */ true, kIntNetAddrType_IPv4, pAddr);
     1522                    Log(("KEV_INET_NEW_ADDR %.*s%d: %RTnaipv4\n", IFNAMSIZ, link->if_name, link->if_unit, pAddr->IPv4.u));
     1523                    pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort, true /*fAdded*/, kIntNetAddrType_IPv4, pAddr);
    15281524                    break;
    15291525
    15301526                case KEV_INET_ADDR_DELETED:
    1531                     Log(("KEV_INET_ADDR_DELETED %.*s%d: %RTnaipv4\n",
    1532                          IFNAMSIZ, link->if_name, link->if_unit, pAddr->IPv4.u));
    1533 
    1534                     pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort,
    1535                         /* :fAdded */ false, kIntNetAddrType_IPv4, pAddr);
     1527                    Log(("KEV_INET_ADDR_DELETED %.*s%d: %RTnaipv4\n", IFNAMSIZ, link->if_name, link->if_unit, pAddr->IPv4.u));
     1528                    pThis->pSwitchPort->pfnNotifyHostAddress(pThis->pSwitchPort, false /*fAdded*/, kIntNetAddrType_IPv4, pAddr);
    15361529                    break;
    15371530
     
    15691562            }
    15701563
    1571 
    1572 
    15731564            switch (msg->event_code)
    15741565            {
     
    16081599        }
    16091600        else
    1610         {
    1611             Log(("vboxNetFltDarwinSysSockUpcall: subclass %u ignored\n",
    1612                  (unsigned)msg->kev_subclass));
    1613         }
     1601            Log(("vboxNetFltDarwinSysSockUpcall: subclass %u ignored\n", (unsigned)msg->kev_subclass));
    16141602
    16151603        mbuf_freem(m);
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