Changeset 38895 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Sep 28, 2011 12:04:39 PM (13 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
r38736 r38895 21 21 #define LOG_GROUP LOG_GROUP_NET_FLT_DRV 22 22 #ifdef DEBUG_ramshankar 23 # define LOG_ENABLED 23 24 # define LOG_INSTANCE RTLogRelDefaultInstance() 24 25 #endif … … 464 465 int _init(void) 465 466 { 466 LogF lowFunc((DEVICE_NAME ":_init\n"));467 LogFunc((DEVICE_NAME ":_init\n")); 467 468 468 469 /* … … 541 542 { 542 543 int rc; 543 LogF lowFunc((DEVICE_NAME ":_fini\n"));544 LogFunc((DEVICE_NAME ":_fini\n")); 544 545 545 546 /* … … 577 578 int _info(struct modinfo *pModInfo) 578 579 { 579 LogF lowFunc((DEVICE_NAME ":_info\n"));580 LogFunc((DEVICE_NAME ":_info\n")); 580 581 581 582 int rc = mod_info(&g_VBoxNetFltSolarisModLinkage, pModInfo); 582 583 583 Log Flow((DEVICE_NAME ":_info returns %d\n", rc));584 Log((DEVICE_NAME ":_info returns %d\n", rc)); 584 585 return rc; 585 586 } … … 596 597 static int VBoxNetFltSolarisAttach(dev_info_t *pDip, ddi_attach_cmd_t enmCmd) 597 598 { 598 LogF lowFunc((DEVICE_NAME ":VBoxNetFltSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd));599 LogFunc((DEVICE_NAME ":VBoxNetFltSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd)); 599 600 600 601 switch (enmCmd) … … 613 614 int Interval = ddi_getprop(DDI_DEV_T_ANY, pDip, DDI_PROP_DONTPASS, VBOXNETFLT_IP6POLLINTERVAL, -1 /* default */); 614 615 if (Interval == -1) 615 Log Flow((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling: no poll interval property specified. Skipping Ipv6 polling.\n"));616 Log((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling: no poll interval property specified. Skipping Ipv6 polling.\n")); 616 617 else if (Interval < 1 || Interval > 120) 617 618 { … … 654 655 static int VBoxNetFltSolarisDetach(dev_info_t *pDip, ddi_detach_cmd_t enmCmd) 655 656 { 656 LogF lowFunc((DEVICE_NAME ":VBoxNetFltSolarisDetach pDip=%p enmCmd=%d\n", pDip, enmCmd));657 LogFunc((DEVICE_NAME ":VBoxNetFltSolarisDetach pDip=%p enmCmd=%d\n", pDip, enmCmd)); 657 658 658 659 switch (enmCmd) … … 690 691 static int VBoxNetFltSolarisGetInfo(dev_info_t *pDip, ddi_info_cmd_t enmCmd, void *pvArg, void **ppResult) 691 692 { 692 LogF lowFunc((DEVICE_NAME ":VBoxNetFltSolarisGetInfo pDip=%p enmCmd=%d pArg=%p instance=%d\n", pDip, enmCmd,693 LogFunc((DEVICE_NAME ":VBoxNetFltSolarisGetInfo pDip=%p enmCmd=%d pArg=%p instance=%d\n", pDip, enmCmd, 693 694 getminor((dev_t)pvArg))); 694 695 … … 728 729 Assert(pQueue); 729 730 730 LogF lowFunc((DEVICE_NAME ":VBoxNetFltSolarisModOpen pQueue=%p pDev=%p fOpenMode=%d fStreamMode=%d\n", pQueue, pDev,731 LogFunc((DEVICE_NAME ":VBoxNetFltSolarisModOpen pQueue=%p pDev=%p fOpenMode=%d fStreamMode=%d\n", pQueue, pDev, 731 732 fOpenMode, fStreamMode)); 732 733 … … 911 912 NOREF(fOpenMode); 912 913 913 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModOpen returns 0, DevMinor=%d pQueue=%p\n", DevMinor, pStream->pReadQueue));914 Log((DEVICE_NAME ":VBoxNetFltSolarisModOpen returns 0, DevMinor=%d pQueue=%p\n", DevMinor, pStream->pReadQueue)); 914 915 915 916 return 0; … … 930 931 Assert(pQueue); 931 932 932 LogF lowFunc((DEVICE_NAME ":VBoxNetFltSolarisModClose pQueue=%p fOpenMode=%d\n", pQueue, fOpenMode));933 LogFunc((DEVICE_NAME ":VBoxNetFltSolarisModClose pQueue=%p fOpenMode=%d\n", pQueue, fOpenMode)); 933 934 934 935 vboxnetflt_stream_t *pStream = NULL; … … 1053 1054 return 0; 1054 1055 1055 LogF lowFunc((DEVICE_NAME ":VBoxNetFltSolarisModReadPut pQueue=%p pMsg=%p\n", pQueue, pMsg));1056 LogFunc((DEVICE_NAME ":VBoxNetFltSolarisModReadPut pQueue=%p pMsg=%p\n", pQueue, pMsg)); 1056 1057 1057 1058 bool fSendUpstream = true; … … 1087 1088 case M_DATA: 1088 1089 { 1089 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut M_DATA\n"));1090 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut M_DATA\n")); 1090 1091 1091 1092 if ( fActive … … 1103 1104 t_uscalar_t Prim = pPrim->dl_primitive; 1104 1105 1105 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: M_PCPROTO %d\n", Prim));1106 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: M_PCPROTO %d\n", Prim)); 1106 1107 switch (Prim) 1107 1108 { … … 1134 1135 1135 1136 bcopy(pMsg->b_rptr + cOffset, &pThis->u.s.MacAddr, sizeof(pThis->u.s.MacAddr)); 1136 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_NOTE_PHYS_ADDR. New Mac=%.*Rhxs\n",1137 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_NOTE_PHYS_ADDR. New Mac=%.*Rhxs\n", 1137 1138 sizeof(pThis->u.s.MacAddr), &pThis->u.s.MacAddr)); 1138 1139 break; … … 1142 1143 { 1143 1144 if (ASMAtomicXchgBool(&pThis->fDisconnectedFromHost, false)) 1144 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_NOTE_LINK_UP.\n"));1145 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_NOTE_LINK_UP.\n")); 1145 1146 break; 1146 1147 } … … 1149 1150 { 1150 1151 if (!ASMAtomicXchgBool(&pThis->fDisconnectedFromHost, true)) 1151 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_NOTE_LINK_DOWN.\n"));1152 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_NOTE_LINK_DOWN.\n")); 1152 1153 break; 1153 1154 } … … 1161 1162 * Swallow our bind request acknowledgement. 1162 1163 */ 1163 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_BIND_ACK. Bound to requested SAP!\n"));1164 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: DL_BIND_ACK. Bound to requested SAP!\n")); 1164 1165 break; 1165 1166 } … … 1182 1183 if (pOkAck->dl_correct_primitive == DL_PROMISCON_REQ) 1183 1184 { 1184 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: M_PCPROTO: DL_OK_ACK: fPromisc is ON.\n"));1185 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: M_PCPROTO: DL_OK_ACK: fPromisc is ON.\n")); 1185 1186 pPromiscStream->fPromisc = true; 1186 1187 } 1187 1188 else if (pOkAck->dl_correct_primitive == DL_PROMISCOFF_REQ) 1188 1189 { 1189 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: M_PCPROTO: DL_OK_ACK: fPromisc is OFF.\n"));1190 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: M_PCPROTO: DL_OK_ACK: fPromisc is OFF.\n")); 1190 1191 pPromiscStream->fPromisc = false; 1191 1192 } … … 1205 1206 { 1206 1207 pPromiscStream->fRawMode = true; 1207 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: Mode acknowledgement. RawMode is %s\n",1208 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: Mode acknowledgement. RawMode is %s\n", 1208 1209 pPromiscStream->fRawMode ? "ON" : "OFF")); 1209 1210 } … … 1231 1232 * We must support flushing queues. 1232 1233 */ 1233 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: M_FLUSH\n"));1234 Log((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: M_FLUSH\n")); 1234 1235 if (*pMsg->b_rptr & FLUSHR) 1235 1236 flushq(pQueue, FLUSHALL); … … 1276 1277 static int VBoxNetFltSolarisModWritePut(queue_t *pQueue, mblk_t *pMsg) 1277 1278 { 1278 LogF lowFunc((DEVICE_NAME ":VBoxNetFltSolarisModWritePut pQueue=%p pMsg=%p\n", pQueue, pMsg));1279 LogFunc((DEVICE_NAME ":VBoxNetFltSolarisModWritePut pQueue=%p pMsg=%p\n", pQueue, pMsg)); 1279 1280 1280 1281 putnext(pQueue, pMsg); … … 1291 1292 static int vboxNetFltSolarisSetRawMode(vboxnetflt_promisc_stream_t *pPromiscStream) 1292 1293 { 1293 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisSetRawMode pPromiscStream=%p\n", pPromiscStream));1294 LogFunc((DEVICE_NAME ":vboxNetFltSolarisSetRawMode pPromiscStream=%p\n", pPromiscStream)); 1294 1295 1295 1296 mblk_t *pRawMsg = NULL; … … 1320 1321 static int vboxNetFltSolarisSetFastMode(queue_t *pQueue) 1321 1322 { 1322 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisSetFastMode pQueue=%p\n", pQueue));1323 LogFunc((DEVICE_NAME ":vboxNetFltSolarisSetFastMode pQueue=%p\n", pQueue)); 1323 1324 1324 1325 mblk_t *pFastMsg = mkiocb(DL_IOC_HDR_INFO); … … 1369 1370 static int vboxNetFltSolarisPromiscReq(queue_t *pQueue, bool fPromisc) 1370 1371 { 1371 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisPromiscReq pQueue=%p fPromisc=%d\n", pQueue, fPromisc));1372 LogFunc((DEVICE_NAME ":vboxNetFltSolarisPromiscReq pQueue=%p fPromisc=%d\n", pQueue, fPromisc)); 1372 1373 1373 1374 t_uscalar_t Cmd; … … 1496 1497 static int vboxNetFltSolarisPhysAddrReq(queue_t *pQueue) 1497 1498 { 1498 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisPhysAddrReq pQueue=%p\n", pQueue));1499 LogFunc((DEVICE_NAME ":vboxNetFltSolarisPhysAddrReq pQueue=%p\n", pQueue)); 1499 1500 1500 1501 t_uscalar_t Cmd = DL_PHYS_ADDR_REQ; … … 1521 1522 static void vboxNetFltSolarisCachePhysAddr(PVBOXNETFLTINS pThis, mblk_t *pMsg) 1522 1523 { 1523 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisCachePhysAddr pThis=%p pMsg=%p\n", pThis, pMsg));1524 LogFunc((DEVICE_NAME ":vboxNetFltSolarisCachePhysAddr pThis=%p pMsg=%p\n", pThis, pMsg)); 1524 1525 1525 1526 AssertCompile(sizeof(RTMAC) == ETHERADDRL); … … 1529 1530 bcopy(pMsg->b_rptr + pPhysAddrAck->dl_addr_offset, &pThis->u.s.MacAddr, sizeof(pThis->u.s.MacAddr)); 1530 1531 1531 Log Flow((DEVICE_NAME ":vboxNetFltSolarisCachePhysAddr: DL_PHYS_ADDR_ACK: Mac=%.*Rhxs\n",1532 Log((DEVICE_NAME ":vboxNetFltSolarisCachePhysAddr: DL_PHYS_ADDR_ACK: Mac=%.*Rhxs\n", 1532 1533 sizeof(pThis->u.s.MacAddr), &pThis->u.s.MacAddr)); 1533 1534 … … 1557 1558 static int vboxNetFltSolarisBindReq(queue_t *pQueue, int SAP) 1558 1559 { 1559 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisBindReq SAP=%d\n", SAP));1560 LogFunc((DEVICE_NAME ":vboxNetFltSolarisBindReq SAP=%d\n", SAP)); 1560 1561 1561 1562 mblk_t *pBindMsg = mexchange(NULL, NULL, DL_BIND_REQ_SIZE, M_PROTO, DL_BIND_REQ); … … 1583 1584 static int vboxNetFltSolarisNotifyReq(queue_t *pQueue) 1584 1585 { 1585 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisNotifyReq\n"));1586 LogFunc((DEVICE_NAME ":vboxNetFltSolarisNotifyReq\n")); 1586 1587 1587 1588 mblk_t *pNotifyMsg = mexchange(NULL, NULL, DL_NOTIFY_REQ_SIZE, M_PROTO, DL_NOTIFY_REQ); … … 1818 1819 static int vboxNetFltSolarisRelinkIp4(vnode_t *pVNode, struct lifreq *pInterface, int IpMuxFd, int ArpMuxFd) 1819 1820 { 1820 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisRelinkIp4: pVNode=%p pInterface=%p IpMuxFd=%d ArpMuxFd=%d\n", pVNode,1821 LogFunc((DEVICE_NAME ":vboxNetFltSolarisRelinkIp4: pVNode=%p pInterface=%p IpMuxFd=%d ArpMuxFd=%d\n", pVNode, 1821 1822 pInterface, IpMuxFd, ArpMuxFd)); 1822 1823 … … 1853 1854 static int vboxNetFltSolarisRelinkIp6(vnode_t *pVNode, struct lifreq *pInterface, int Ip6MuxFd) 1854 1855 { 1855 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisRelinkIp6: pVNode=%p pInterface=%p Ip6MuxFd=%d\n", pVNode, pInterface, Ip6MuxFd));1856 LogFunc((DEVICE_NAME ":vboxNetFltSolarisRelinkIp6: pVNode=%p pInterface=%p Ip6MuxFd=%d\n", pVNode, pInterface, Ip6MuxFd)); 1856 1857 1857 1858 int NewIp6MuxId; … … 1882 1883 static int vboxNetFltSolarisDetermineModPos(bool fAttach, vnode_t *pVNode, int *pModPos) 1883 1884 { 1884 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisDetermineModPos: fAttach=%d pVNode=%p pModPos=%p\n", fAttach, pVNode, pModPos));1885 LogFunc((DEVICE_NAME ":vboxNetFltSolarisDetermineModPos: fAttach=%d pVNode=%p pModPos=%p\n", fAttach, pVNode, pModPos)); 1885 1886 1886 1887 int cMod; … … 1898 1899 * the host driver. 1899 1900 */ 1900 Log Flow((DEVICE_NAME ":vboxNetFltSolarisDetermineModPos: cMod=%d\n", cMod));1901 Log((DEVICE_NAME ":vboxNetFltSolarisDetermineModPos: cMod=%d\n", cMod)); 1901 1902 if (fAttach) 1902 1903 { … … 1914 1915 if (RT_UNLIKELY(!StrList.sl_modlist)) 1915 1916 { 1916 Log Flow((DEVICE_NAME ":vboxNetFltSolarisDetermineModPos: failed to alloc memory for StrList.\n"));1917 Log((DEVICE_NAME ":vboxNetFltSolarisDetermineModPos: failed to alloc memory for StrList.\n")); 1917 1918 return VERR_NO_MEMORY; 1918 1919 } … … 1932 1933 if (!strcmp(DEVICE_NAME, StrList.sl_modlist[i].l_name)) 1933 1934 { 1934 Log Flow((DEVICE_NAME ":vboxNetFltSolarisDetermineModPos: Success! Found %s at %d.\n", DEVICE_NAME, i));1935 Log((DEVICE_NAME ":vboxNetFltSolarisDetermineModPos: Success! Found %s at %d.\n", DEVICE_NAME, i)); 1935 1936 *pModPos = i; 1936 1937 RTMemFree(StrList.sl_modlist); … … 2130 2131 static void vboxNetFltSolarisCloseStream(PVBOXNETFLTINS pThis) 2131 2132 { 2132 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisCloseStream pThis=%p\n"));2133 LogFunc((DEVICE_NAME ":vboxNetFltSolarisCloseStream pThis=%p\n")); 2133 2134 2134 2135 if (pThis->u.s.hIface) … … 2149 2150 static int vboxNetFltSolarisAttachIp4(PVBOXNETFLTINS pThis, bool fAttach) 2150 2151 { 2151 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisAttachIp4 pThis=%p fAttach=%d\n", pThis, fAttach));2152 LogFunc((DEVICE_NAME ":vboxNetFltSolarisAttachIp4 pThis=%p fAttach=%d\n", pThis, fAttach)); 2152 2153 2153 2154 /* … … 2333 2334 releasef(ArpMuxFd); 2334 2335 2335 Log Flow((DEVICE_NAME ":vboxNetFltSolarisAttachIp4: Success! %s %s@(IPv4:%d Arp:%d) "2336 Log((DEVICE_NAME ":vboxNetFltSolarisAttachIp4: Success! %s %s@(IPv4:%d Arp:%d) " 2336 2337 "%s interface %s\n", fAttach ? "Injected" : "Ejected", StrMod.mod_name, 2337 2338 StrMod.pos, ArpStrMod.pos, fAttach ? "to" : "from", pThis->szName)); … … 2416 2417 static int vboxNetFltSolarisAttachIp6(PVBOXNETFLTINS pThis, bool fAttach) 2417 2418 { 2418 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisAttachIp6 pThis=%p fAttach=%d\n", pThis, fAttach));2419 LogFunc((DEVICE_NAME ":vboxNetFltSolarisAttachIp6 pThis=%p fAttach=%d\n", pThis, fAttach)); 2419 2420 2420 2421 /* … … 2545 2546 releasef(Ip6MuxFd); 2546 2547 2547 Log Flow((DEVICE_NAME ":vboxNetFltSolarisAttachIp6: Success! %s %s@(IPv6:%d) "2548 Log((DEVICE_NAME ":vboxNetFltSolarisAttachIp6: Success! %s %s@(IPv6:%d) " 2548 2549 "%s interface %s\n", fAttach ? "Injected" : "Ejected", StrMod.mod_name, 2549 2550 StrMod.pos, fAttach ? "to" : "from", pThis->szName)); … … 2593 2594 else 2594 2595 { 2595 Log Flow((DEVICE_NAME ":vboxNetFltSolarisAttachIp6: failed to get IPv6 flags.\n", pThis->szName));2596 Log((DEVICE_NAME ":vboxNetFltSolarisAttachIp6: failed to get IPv6 flags.\n", pThis->szName)); 2596 2597 rc = VERR_INTNET_FLT_IF_NOT_FOUND; 2597 2598 } … … 2613 2614 static void vboxNetFltSolarispIp6Timer(PRTTIMER pTimer, void *pvData, uint64_t iTick) 2614 2615 { 2615 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarispIp6Timer pTimer=%p pvData=%p\n", pTimer, pvData));2616 LogFunc((DEVICE_NAME ":vboxNetFltSolarispIp6Timer pTimer=%p pvData=%p\n", pTimer, pvData)); 2616 2617 2617 2618 PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvData; … … 2652 2653 static int vboxNetFltSolarisSetupIp6Polling(PVBOXNETFLTINS pThis) 2653 2654 { 2654 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling pThis=%p\n", pThis));2655 LogFunc((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling pThis=%p\n", pThis)); 2655 2656 2656 2657 int rc = VERR_GENERAL_FAILURE; … … 2679 2680 { 2680 2681 rc = RTTimerStart(pPromiscStream->pIp6Timer, 10 * (uint64_t)1000000000 /* 10 seconds to blastoff */); 2681 Log Flow((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling: Ipv6 %d second timer begins firing in 10 seconds.\n", Interval));2682 Log((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling: Ipv6 %d second timer begins firing in 10 seconds.\n", Interval)); 2682 2683 } 2683 2684 else … … 2704 2705 static int vboxNetFltSolarisDetachFromInterface(PVBOXNETFLTINS pThis) 2705 2706 { 2706 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisDetachFromInterface pThis=%p\n", pThis));2707 LogFunc((DEVICE_NAME ":vboxNetFltSolarisDetachFromInterface pThis=%p\n", pThis)); 2707 2708 2708 2709 ASMAtomicWriteBool(&pThis->fDisconnectedFromHost, true); … … 2737 2738 static int vboxNetFltSolarisAttachToInterface(PVBOXNETFLTINS pThis) 2738 2739 { 2739 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface pThis=%p\n", pThis));2740 LogFunc((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface pThis=%p\n", pThis)); 2740 2741 2741 2742 /* … … 2815 2816 static mblk_t *vboxNetFltSolarisMBlkFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst) 2816 2817 { 2817 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisMBlkFromSG pThis=%p pSG=%p\n", pThis, pSG));2818 LogFunc((DEVICE_NAME ":vboxNetFltSolarisMBlkFromSG pThis=%p pSG=%p\n", pThis, pSG)); 2818 2819 2819 2820 mblk_t *pMsg = allocb(pSG->cbTotal, BPRI_MED); … … 2879 2880 static int vboxNetFltSolarisMBlkToSG(PVBOXNETFLTINS pThis, mblk_t *pMsg, PINTNETSG pSG, unsigned cSegs, uint32_t fSrc) 2880 2881 { 2881 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pThis=%p pMsg=%p pSG=%p cSegs=%d\n", pThis, pMsg, pSG, cSegs));2882 LogFunc((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pThis=%p pMsg=%p pSG=%p cSegs=%d\n", pThis, pMsg, pSG, cSegs)); 2882 2883 2883 2884 /* … … 2906 2907 if (pSG->cbTotal < 60 && (fSrc & INTNETTRUNKDIR_HOST)) 2907 2908 { 2908 Log Flow((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pulling up to length.\n"));2909 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pulling up to length.\n")); 2909 2910 2910 2911 static uint8_t const s_abZero[128] = {0}; … … 2918 2919 #endif 2919 2920 2920 Log Flow((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG iSeg=%d pSG->cbTotal=%d msgdsize=%d\n", iSeg, pSG->cbTotal, msgdsize(pMsg)));2921 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG iSeg=%d pSG->cbTotal=%d msgdsize=%d\n", iSeg, pSG->cbTotal, msgdsize(pMsg))); 2921 2922 return VINF_SUCCESS; 2922 2923 } … … 2936 2937 static int vboxNetFltSolarisRawToUnitData(mblk_t *pMsg, mblk_t **ppDlpiMsg) 2937 2938 { 2938 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisRawToUnitData pMsg=%p\n", pMsg));2939 LogFunc((DEVICE_NAME ":vboxNetFltSolarisRawToUnitData pMsg=%p\n", pMsg)); 2939 2940 2940 2941 if (DB_TYPE(pMsg) != M_DATA) … … 2988 2989 static int vboxNetFltSolarisUnitDataToRaw(PVBOXNETFLTINS pThis, mblk_t *pMsg, mblk_t **ppRawMsg) 2989 2990 { 2990 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisUnitDataToRaw pMsg=%p\n", pMsg));2991 LogFunc((DEVICE_NAME ":vboxNetFltSolarisUnitDataToRaw pMsg=%p\n", pMsg)); 2991 2992 2992 2993 if ( !pMsg->b_cont … … 3107 3108 Assert(pPromiscStream); 3108 3109 3109 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback pThis=%p pPromiscStream=%p pMsg=%p\n", pThis, pPromiscStream, pMsg));3110 LogFunc((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback pThis=%p pPromiscStream=%p pMsg=%p\n", pThis, pPromiscStream, pMsg)); 3110 3111 3111 3112 if (RT_UNLIKELY(pMsg->b_cont)) … … 3148 3149 pPromiscStream->cLoopback++; 3149 3150 3150 Log Flow((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback initialized head. checksum=%u.\n",3151 Log((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback initialized head. checksum=%u.\n", 3151 3152 pPromiscStream->pHead->Checksum)); 3152 3153 break; … … 3158 3159 vboxNetFltSolarisInitPacketId(pCur, pMsg); 3159 3160 3160 Log Flow((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback re-used head checksum=%u cLoopback=%d.\n",3161 Log((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback re-used head checksum=%u cLoopback=%d.\n", 3161 3162 pCur->Checksum, pPromiscStream->cLoopback)); 3162 3163 break; … … 3177 3178 pPromiscStream->cLoopback++; 3178 3179 3179 Log Flow((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback added head checksum=%u cLoopback=%d.\n", pCur->Checksum,3180 Log((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback added head checksum=%u cLoopback=%d.\n", pCur->Checksum, 3180 3181 pPromiscStream->cLoopback)); 3181 3182 break; … … 3210 3211 3211 3212 vboxNetFltSolarisInitPacketId(pCur, pMsg); 3212 Log Flow((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback recycled tail!! checksum=%u cLoopback=%d\n", pCur->Checksum,3213 Log((DEVICE_NAME ":vboxNetFltSolarisQueueLoopback recycled tail!! checksum=%u cLoopback=%d\n", pCur->Checksum, 3213 3214 pPromiscStream->cLoopback)); 3214 3215 } … … 3235 3236 Assert(DB_TYPE(pMsg) == M_DATA); 3236 3237 3237 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisIsOurMBlk pThis=%p pMsg=%p\n", pThis, pMsg));3238 LogFunc((DEVICE_NAME ":vboxNetFltSolarisIsOurMBlk pThis=%p pMsg=%p\n", pThis, pMsg)); 3238 3239 3239 3240 if (pMsg->b_cont) … … 3298 3299 fIsOurPacket = true; 3299 3300 3300 Log Flow((DEVICE_NAME ":vboxNetFltSolarisIsOurMBlk found packet %p Checksum=%u cLoopback=%d\n", pMsg, Checksum,3301 Log((DEVICE_NAME ":vboxNetFltSolarisIsOurMBlk found packet %p Checksum=%u cLoopback=%d\n", pMsg, Checksum, 3301 3302 pPromiscStream->cLoopback)); 3302 3303 break; 3303 3304 } 3304 3305 3305 Log Flow((DEVICE_NAME ":vboxNetFltSolarisIsOurMBlk returns %d.\n", fIsOurPacket));3306 Log((DEVICE_NAME ":vboxNetFltSolarisIsOurMBlk returns %d.\n", fIsOurPacket)); 3306 3307 mutex_exit(&pThis->u.s.hMtx); 3307 3308 return fIsOurPacket; … … 3335 3336 static int vboxNetFltSolarisRecv(PVBOXNETFLTINS pThis, vboxnetflt_stream_t *pStream, queue_t *pQueue, mblk_t *pMsg) 3336 3337 { 3337 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisRecv pThis=%p pMsg=%p\n", pThis, pMsg));3338 LogFunc((DEVICE_NAME ":vboxNetFltSolarisRecv pThis=%p pMsg=%p\n", pThis, pMsg)); 3338 3339 3339 3340 AssertCompile(sizeof(struct ether_header) == sizeof(RTNETETHERHDR)); … … 3377 3378 if (vboxNetFltSolarisIsOurMBlk(pThis, pPromiscStream, pMsg)) 3378 3379 { 3379 Log Flow((DEVICE_NAME ":Avoiding packet loopback.\n"));3380 Log((DEVICE_NAME ":Avoiding packet loopback.\n")); 3380 3381 return VINF_SUCCESS; 3381 3382 } … … 3435 3436 3436 3437 PVLANHEADER pVlanHdr = (PVLANHEADER)(pMsg->b_rptr + sizeof(RTNETETHERHDR) - sizeof(pEthHdr->EtherType)); 3437 Log Flow((DEVICE_NAME ":Recv VLAN Pcp=%u Cfi=%u Id=%u\n", VLAN_PRI(RT_BE2H_U16(pVlanHdr->Data)),3438 Log((DEVICE_NAME ":Recv VLAN Pcp=%u Cfi=%u Id=%u\n", VLAN_PRI(RT_BE2H_U16(pVlanHdr->Data)), 3438 3439 VLAN_CFI(RT_BE2H_U16(pVlanHdr->Data)), VLAN_ID(RT_BE2H_U16(pVlanHdr->Data)))); 3439 3440 if ( VLAN_PRI(RT_BE2H_U16(pVlanHdr->Data)) > 0 … … 3461 3462 pStrippedMsg->b_cont = pMsg; 3462 3463 pMsg = pStrippedMsg; 3463 Log Flow((DEVICE_NAME ":Stripped VLAN tag.\n"));3464 Log((DEVICE_NAME ":Stripped VLAN tag.\n")); 3464 3465 } 3465 3466 else … … 3522 3523 static mblk_t *vboxNetFltSolarisFixChecksums(mblk_t *pMsg) 3523 3524 { 3524 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisFixChecksums pMsg=%p\n"));3525 LogFunc((DEVICE_NAME ":vboxNetFltSolarisFixChecksums pMsg=%p\n")); 3525 3526 3526 3527 Assert(DB_TYPE(pMsg) == M_DATA); … … 3542 3543 if (pMsg->b_cont) 3543 3544 { 3544 Log Flow((DEVICE_NAME ":Chained mblk_t.\n"));3545 Log((DEVICE_NAME ":Chained mblk_t.\n")); 3545 3546 3546 3547 /* … … 3551 3552 size_t cbFullMsg = msgdsize(pMsg); 3552 3553 mblk_t *pFullMsg = allocb(cbFullMsg, BPRI_MED); 3553 Log Flow((DEVICE_NAME ":msgdsize returns %d\n", cbFullMsg));3554 Log((DEVICE_NAME ":msgdsize returns %d\n", cbFullMsg)); 3554 3555 if (RT_UNLIKELY(!pFullMsg)) 3555 3556 { … … 3596 3597 pTcpHdr->th_sum = TcpChecksum; 3597 3598 fChecksumAdjusted = true; 3598 Log Flow((DEVICE_NAME ":fixed TCP checksum.\n"));3599 Log((DEVICE_NAME ":fixed TCP checksum.\n")); 3599 3600 } 3600 3601 } … … 3608 3609 pUdpHdr->uh_sum = UdpChecksum; 3609 3610 fChecksumAdjusted = true; 3610 Log Flow((DEVICE_NAME ":Fixed UDP checksum."));3611 Log((DEVICE_NAME ":Fixed UDP checksum.")); 3611 3612 } 3612 3613 } … … 3649 3650 static void vboxNetFltSolarisAnalyzeMBlk(mblk_t *pMsg) 3650 3651 { 3651 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisAnalyzeMBlk pMsg=%p\n", pMsg));3652 LogFunc((DEVICE_NAME ":vboxNetFltSolarisAnalyzeMBlk pMsg=%p\n", pMsg)); 3652 3653 3653 3654 PCRTNETETHERHDR pEthHdr = (PCRTNETETHERHDR)pMsg->b_rptr; … … 3676 3677 else 3677 3678 { 3678 Log Flow((DEVICE_NAME ":Chained IP packet. Skipping validity check.\n"));3679 Log((DEVICE_NAME ":Chained IP packet. Skipping validity check.\n")); 3679 3680 } 3680 3681 } … … 3704 3705 LogRel((DEVICE_NAME ":Unknown EtherType=%x D=%.6Rhxs S=%.6Rhxs\n", RT_H2BE_U16(pEthHdr->EtherType), &pEthHdr->DstMac, 3705 3706 &pEthHdr->SrcMac)); 3706 /* Log Flow((DEVICE_NAME ":%.*Rhxd\n", MBLKL(pMsg), pMsg->b_rptr)); */3707 /* Log((DEVICE_NAME ":%.*Rhxd\n", MBLKL(pMsg), pMsg->b_rptr)); */ 3707 3708 } 3708 3709 } … … 3716 3717 void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive) 3717 3718 { 3718 LogF lowFunc((DEVICE_NAME ":vboxNetFltPortOsSetActive pThis=%p fActive=%d\n", pThis, fActive));3719 LogFunc((DEVICE_NAME ":vboxNetFltPortOsSetActive pThis=%p fActive=%d\n", pThis, fActive)); 3719 3720 3720 3721 /* … … 3750 3751 int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis) 3751 3752 { 3752 LogF lowFunc((DEVICE_NAME ":vboxNetFltOsDisconnectIt pThis=%p\n", pThis));3753 LogFunc((DEVICE_NAME ":vboxNetFltOsDisconnectIt pThis=%p\n", pThis)); 3753 3754 3754 3755 vboxNetFltSolarisDetachFromInterface(pThis); … … 3767 3768 void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) 3768 3769 { 3769 LogF lowFunc((DEVICE_NAME ":vboxNetFltOsDeleteInstance pThis=%p\n", pThis));3770 LogFunc((DEVICE_NAME ":vboxNetFltOsDeleteInstance pThis=%p\n", pThis)); 3770 3771 3771 3772 mutex_destroy(&pThis->u.s.hMtx); … … 3784 3785 int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, void *pvContext) 3785 3786 { 3786 LogF lowFunc((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p\n"));3787 LogFunc((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p\n")); 3787 3788 3788 3789 /* … … 3872 3873 { 3873 3874 NOREF(pvIfData); 3874 LogF lowFunc((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p pSG=%p fDst=%d\n", pThis, pSG, fDst));3875 LogFunc((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p pSG=%p fDst=%d\n", pThis, pSG, fDst)); 3875 3876 3876 3877 int rc = VINF_SUCCESS; … … 3883 3884 if (RT_LIKELY(pMsg)) 3884 3885 { 3885 Log Flow((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_WIRE\n"));3886 Log((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_WIRE\n")); 3886 3887 3887 3888 vboxNetFltSolarisQueueLoopback(pThis, pPromiscStream, pMsg); … … 3919 3920 if (pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_ARP)) 3920 3921 { 3921 Log Flow((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_HOST ARP\n"));3922 Log((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_HOST ARP\n")); 3922 3923 3923 3924 vboxnetflt_stream_t *pArpStream = ASMAtomicUoReadPtrT(&pThis->u.s.pArpStream, vboxnetflt_stream_t *); … … 3955 3956 * Send messages up IPv6 stream. 3956 3957 */ 3957 Log Flow((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_HOST IPv6\n"));3958 Log((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_HOST IPv6\n")); 3958 3959 3959 3960 pMsg->b_rptr += sizeof(RTNETETHERHDR); … … 3966 3967 * Send messages up IPv4 stream. 3967 3968 */ 3968 Log Flow((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_HOST IPv4\n"));3969 Log((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_HOST IPv4\n")); 3969 3970 3970 3971 pMsg->b_rptr += sizeof(RTNETETHERHDR); -
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
r38736 r38895 21 21 #define LOG_GROUP LOG_GROUP_NET_FLT_DRV 22 22 #ifdef DEBUG_ramshankar 23 # define LOG_ENABLED 23 24 # define LOG_INSTANCE RTLogRelDefaultInstance() 24 25 #endif … … 260 261 LOCAL inline int vboxNetFltSolarisGetLinkId(const char *pszMacName, datalink_id_t *pLinkId); 261 262 262 263 263 /** 264 264 * Kernel entry points … … 266 266 int _init(void) 267 267 { 268 Log Flow((DEVICE_NAME ":_init\n"));268 Log((DEVICE_NAME ":_init\n")); 269 269 270 270 /* … … 326 326 { 327 327 int rc; 328 Log Flow((DEVICE_NAME ":_fini\n"));328 Log((DEVICE_NAME ":_fini\n")); 329 329 330 330 /* … … 356 356 int _info(struct modinfo *pModInfo) 357 357 { 358 Log Flow((DEVICE_NAME ":_info\n"));358 Log((DEVICE_NAME ":_info\n")); 359 359 360 360 int rc = mod_info(&g_VBoxNetFltSolarisModLinkage, pModInfo); 361 361 362 Log Flow((DEVICE_NAME ":_info returns %d\n", rc));362 Log((DEVICE_NAME ":_info returns %d\n", rc)); 363 363 return rc; 364 364 } … … 375 375 LOCAL int VBoxNetFltSolarisAttach(dev_info_t *pDip, ddi_attach_cmd_t enmCmd) 376 376 { 377 LogFlow((DEVICE_NAME ":VBoxNetFltSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd)); 377 Log((DEVICE_NAME ":VBoxNetFltSolarisAttach pDip=%p enmCmd=%d\n", pDip, enmCmd)); 378 LogRel((DEVICE_NAME ":blah\n")); 378 379 379 380 switch (enmCmd) … … 408 409 LOCAL int VBoxNetFltSolarisDetach(dev_info_t *pDip, ddi_detach_cmd_t enmCmd) 409 410 { 410 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisDetach pDip=%p enmCmd=%d\n", pDip, enmCmd));411 Log((DEVICE_NAME ":VBoxNetFltSolarisDetach pDip=%p enmCmd=%d\n", pDip, enmCmd)); 411 412 412 413 switch (enmCmd) … … 443 444 LOCAL int VBoxNetFltSolarisGetInfo(dev_info_t *pDip, ddi_info_cmd_t enmCmd, void *pvArg, void **ppResult) 444 445 { 445 Log Flow((DEVICE_NAME ":VBoxNetFltSolarisGetInfo pDip=%p enmCmd=%d pArg=%p instance=%d\n", pDip, enmCmd, getminor((dev_t)pvArg)));446 Log((DEVICE_NAME ":VBoxNetFltSolarisGetInfo pDip=%p enmCmd=%d pArg=%p instance=%d\n", pDip, enmCmd, getminor((dev_t)pvArg))); 446 447 447 448 switch (enmCmd) … … 475 476 LOCAL inline mblk_t *vboxNetFltSolarisMBlkFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst) 476 477 { 477 Log Flow((DEVICE_NAME ":vboxNetFltSolarisMBlkFromSG pThis=%p pSG=%p\n", pThis, pSG));478 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkFromSG pThis=%p pSG=%p\n", pThis, pSG)); 478 479 479 480 mblk_t *pMsg = allocb(pSG->cbTotal, BPRI_HI); … … 540 541 LOCAL int vboxNetFltSolarisMBlkToSG(PVBOXNETFLTINS pThis, mblk_t *pMsg, PINTNETSG pSG, unsigned cSegs, uint32_t fSrc) 541 542 { 542 Log Flow((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pThis=%p pMsg=%p pSG=%p cSegs=%d\n", pThis, pMsg, pSG, cSegs));543 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pThis=%p pMsg=%p pSG=%p cSegs=%d\n", pThis, pMsg, pSG, cSegs)); 543 544 544 545 /* … … 567 568 if (pSG->cbTotal < 60 && (fSrc & INTNETTRUNKDIR_HOST)) 568 569 { 569 Log Flow((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pulling up to length.\n"));570 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG pulling up to length.\n")); 570 571 571 572 static uint8_t const s_abZero[128] = {0}; … … 579 580 #endif 580 581 581 Log Flow((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG iSeg=%d pSG->cbTotal=%d msgdsize=%d\n", iSeg, pSG->cbTotal, msgdsize(pMsg)));582 Log((DEVICE_NAME ":vboxNetFltSolarisMBlkToSG iSeg=%d pSG->cbTotal=%d msgdsize=%d\n", iSeg, pSG->cbTotal, msgdsize(pMsg))); 582 583 return VINF_SUCCESS; 583 584 } … … 591 592 LOCAL void vboxNetFltSolarisAnalyzeMBlk(mblk_t *pMsg) 592 593 { 593 LogF lowFunc((DEVICE_NAME ":vboxNetFltSolarisAnalyzeMBlk pMsg=%p\n", pMsg));594 LogFunc((DEVICE_NAME ":vboxNetFltSolarisAnalyzeMBlk pMsg=%p\n", pMsg)); 594 595 595 596 PCRTNETETHERHDR pEthHdr = (PCRTNETETHERHDR)pMsg->b_rptr; … … 617 618 else 618 619 { 619 Log Flow((DEVICE_NAME ":Chained IP packet. Skipping validity check.\n"));620 Log((DEVICE_NAME ":Chained IP packet. Skipping validity check.\n")); 620 621 } 621 622 } … … 645 646 LogRel((DEVICE_NAME ":Unknown EtherType=%x D=%.6Rhxs S=%.6Rhxs\n", RT_H2BE_U16(pEthHdr->EtherType), &pEthHdr->DstMac, 646 647 &pEthHdr->SrcMac)); 647 /* Log Flow((DEVICE_NAME ":%.*Rhxd\n", MBLKL(pMsg), pMsg->b_rptr)); */648 /* Log((DEVICE_NAME ":%.*Rhxd\n", MBLKL(pMsg), pMsg->b_rptr)); */ 648 649 } 649 650 } … … 671 672 LOCAL void vboxNetFltSolarisRecv(void *pvData, mac_resource_handle_t hResource, mblk_t *pMsg, boolean_t fLoopback) 672 673 { 673 Log Flow((DEVICE_NAME ":vboxNetFltSolarisRecv pvData=%p pMsg=%p fLoopback=%d cbData=%d\n", pvData, pMsg, fLoopback, pMsg ? MBLKL(pMsg) : 0));674 Log((DEVICE_NAME ":vboxNetFltSolarisRecv pvData=%p pMsg=%p fLoopback=%d cbData=%d\n", pvData, pMsg, fLoopback, pMsg ? MBLKL(pMsg) : 0)); 674 675 675 676 PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvData; … … 803 804 { 804 805 Assert(pThis->pSwitchPort); 805 Log Flow((DEVICE_NAME ":vboxNetFltSolarisReportInfo phys mac %.6Rhxs\n", &pThis->u.s.MacAddr));806 Log((DEVICE_NAME ":vboxNetFltSolarisReportInfo phys mac %.6Rhxs\n", &pThis->u.s.MacAddr)); 806 807 pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr); 807 808 pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, false); /** @todo Promisc */ … … 851 852 if (RT_LIKELY(!rc)) 852 853 { 853 Log Flow((DEVICE_NAME ":vboxNetFltSolarisInitVNIC succesfully initialized VNIC.\n"));854 Log((DEVICE_NAME ":vboxNetFltSolarisInitVNIC succesfully initialized VNIC.\n")); 854 855 return VINF_SUCCESS; 855 856 } … … 881 882 LOCAL int vboxNetFltSolarisInitVNICTemplate(PVBOXNETFLTINS pThis, PVBOXNETFLTVNICTEMPLATE pVNICTemplate) 882 883 { 883 Log Flow((DEVICE_NAME ":vboxNetFltSolarisInitVNICTemplate pThis=%p pVNICTemplate=%p\n", pThis, pVNICTemplate));884 Log((DEVICE_NAME ":vboxNetFltSolarisInitVNICTemplate pThis=%p pVNICTemplate=%p\n", pThis, pVNICTemplate)); 884 885 885 886 AssertReturn(pVNICTemplate, VERR_INVALID_PARAMETER); … … 926 927 mac_close(hInterface); 927 928 928 Log Flow((DEVICE_NAME ":vboxNetFltSolarisInitVNICTemplate successfully init. VNIC template. szLinkName=%s\n",929 Log((DEVICE_NAME ":vboxNetFltSolarisInitVNICTemplate successfully init. VNIC template. szLinkName=%s\n", 929 930 pVNICTemplate->szLinkName)); 930 931 return VINF_SUCCESS; … … 1061 1062 LOCAL int vboxNetFltSolarisCreateVNIC(PVBOXNETFLTINS pThis, PVBOXNETFLTVNIC *ppVNIC) 1062 1063 { 1063 Log Flow((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC pThis=%p\n", pThis));1064 Log((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC pThis=%p\n", pThis)); 1064 1065 1065 1066 AssertReturn(pThis, VERR_INVALID_POINTER); … … 1120 1121 fFlags |= MAC_VLAN; 1121 1122 #endif 1122 Log Flow((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC pThis=%p VLAN Id=%u\n", pThis, uVLANId));1123 Log((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC pThis=%p VLAN Id=%u\n", pThis, uVLANId)); 1123 1124 } 1124 1125 … … 1149 1150 if (RT_SUCCESS(rc)) 1150 1151 { 1151 Log Flow((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC successfully created VNIC '%s' over '%s' with random mac %.6Rhxs\n",1152 Log((DEVICE_NAME ":vboxNetFltSolarisCreateVNIC successfully created VNIC '%s' over '%s' with random mac %.6Rhxs\n", 1152 1153 pVNIC->szName, pszLinkName, &GuestMac)); 1153 1154 *ppVNIC = pVNIC; … … 1254 1255 void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive) 1255 1256 { 1256 Log Flow((DEVICE_NAME ":vboxNetFltPortOsSetActive pThis=%p fActive=%d\n", pThis, fActive));1257 Log((DEVICE_NAME ":vboxNetFltPortOsSetActive pThis=%p fActive=%d\n", pThis, fActive)); 1257 1258 1258 1259 /* … … 1287 1288 int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis) 1288 1289 { 1289 Log Flow((DEVICE_NAME ":vboxNetFltOsDisconnectIt pThis=%p\n", pThis));1290 Log((DEVICE_NAME ":vboxNetFltOsDisconnectIt pThis=%p\n", pThis)); 1290 1291 return VINF_SUCCESS; 1291 1292 } … … 1294 1295 int vboxNetFltOsConnectIt(PVBOXNETFLTINS pThis) 1295 1296 { 1296 Log Flow((DEVICE_NAME ":vboxNetFltOsConnectIt pThis=%p\n", pThis));1297 Log((DEVICE_NAME ":vboxNetFltOsConnectIt pThis=%p\n", pThis)); 1297 1298 return VINF_SUCCESS; 1298 1299 } … … 1301 1302 void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) 1302 1303 { 1303 Log Flow((DEVICE_NAME ":vboxNetFltOsDeleteInstance pThis=%p\n", pThis));1304 Log((DEVICE_NAME ":vboxNetFltOsDeleteInstance pThis=%p\n", pThis)); 1304 1305 1305 1306 if (pThis->u.s.hNotify) … … 1325 1326 int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, void *pvContext) 1326 1327 { 1327 Log Flow((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p pvContext=%p\n", pThis, pvContext));1328 Log((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p pvContext=%p\n", pThis, pvContext)); 1328 1329 1329 1330 /* … … 1338 1339 if (!rc) 1339 1340 { 1340 Log Flow((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p physical interface '%s' detected.\n", pThis, pThis->szName));1341 Log((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p physical interface '%s' detected.\n", pThis, pThis->szName)); 1341 1342 pThis->u.s.fIsVNIC = false; 1342 1343 } … … 1346 1347 if (RTStrNCmp(pThis->szName, VBOXBOW_VNIC_TEMPLATE_NAME, sizeof(VBOXBOW_VNIC_TEMPLATE_NAME) - 1) == 0) 1347 1348 { 1348 Log Flow((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p VNIC template '%s' detected.\n", pThis, pThis->szName));1349 Log((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p VNIC template '%s' detected.\n", pThis, pThis->szName)); 1349 1350 pThis->u.s.fIsVNICTemplate = true; 1350 1351 } … … 1353 1354 if ( pThis->u.s.fIsVNIC 1354 1355 && !pThis->u.s.fIsVNICTemplate) 1355 Log Flow((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p VNIC '%s' detected.\n", pThis, pThis->szName));1356 Log((DEVICE_NAME ":vboxNetFltOsInitInstance pThis=%p VNIC '%s' detected.\n", pThis, pThis->szName)); 1356 1357 1357 1358 /* … … 1415 1416 if (RT_LIKELY(pMsg)) 1416 1417 { 1417 Log Flow((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p cbData=%d\n", pThis, MBLKL(pMsg)));1418 Log((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p cbData=%d\n", pThis, MBLKL(pMsg))); 1418 1419 1419 1420 mac_tx_cookie_t pXmitCookie = mac_tx(pVNIC->hClient, pMsg, 0 /* Hint */, MAC_DROP_ON_NO_DESC, NULL /* return message */); … … 1437 1438 void vboxNetFltPortOsNotifyMacAddress(PVBOXNETFLTINS pThis, void *pvIfData, PCRTMAC pMac) 1438 1439 { 1439 Log Flow((DEVICE_NAME ":vboxNetFltPortOSNotifyMacAddress pszIf=%s pszVNIC=%s MAC=%.6Rhxs\n", pThis->szName,1440 Log((DEVICE_NAME ":vboxNetFltPortOSNotifyMacAddress pszIf=%s pszVNIC=%s MAC=%.6Rhxs\n", pThis->szName, 1440 1441 ((PVBOXNETFLTVNIC)pvIfData)->szName, pMac)); 1441 1442 … … 1496 1497 */ 1497 1498 mac_rx_set(pVNIC->hClient, vboxNetFltSolarisRecv, pThis); 1498 Log Flow((DEVICE_NAME ":vboxNetFltPortOsNotifyMacAddress successfully added unicast address %.6Rhxs\n", pMac));1499 Log((DEVICE_NAME ":vboxNetFltPortOsNotifyMacAddress successfully added unicast address %.6Rhxs\n", pMac)); 1499 1500 } 1500 1501 else … … 1530 1531 int vboxNetFltPortOsConnectInterface(PVBOXNETFLTINS pThis, void *pvIf, void **ppvIfData) 1531 1532 { 1532 Log Flow((DEVICE_NAME ":vboxNetFltPortOsConnectInterface pThis=%p pvIf=%p\n", pThis, pvIf));1533 Log((DEVICE_NAME ":vboxNetFltPortOsConnectInterface pThis=%p pvIf=%p\n", pThis, pvIf)); 1533 1534 1534 1535 int rc = VINF_SUCCESS; … … 1618 1619 int vboxNetFltPortOsDisconnectInterface(PVBOXNETFLTINS pThis, void *pvIfData) 1619 1620 { 1620 Log Flow((DEVICE_NAME ":vboxNetFltPortOsDisconnectInterface pThis=%p\n", pThis));1621 Log((DEVICE_NAME ":vboxNetFltPortOsDisconnectInterface pThis=%p\n", pThis)); 1621 1622 1622 1623 PVBOXNETFLTVNIC pVNIC = pvIfData; … … 1634 1635 */ 1635 1636 list_remove(&pThis->u.s.hVNICs, pVNIC); 1636 Log Flow((DEVICE_NAME ":vboxNetFltPortOsDisconnectInterface destroying pVNIC=%p\n", pVNIC));1637 Log((DEVICE_NAME ":vboxNetFltPortOsDisconnectInterface destroying pVNIC=%p\n", pVNIC)); 1637 1638 vboxNetFltSolarisDestroyVNIC(pVNIC); 1638 1639 vboxNetFltSolarisFreeVNIC(pVNIC);
Note:
See TracChangeset
for help on using the changeset viewer.