Changeset 54838 in vbox for trunk/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp
- Timestamp:
- Mar 18, 2015 5:44:08 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp
r51092 r54838 52 52 53 53 #include "DynLoadLibSolaris.h" 54 55 /** @todo Unify this define with VBoxNetFltBow-solaris.c */ 56 #define VBOXBOW_VNIC_TEMPLATE_NAME "vboxvnic_template" 57 54 58 55 59 static uint32_t getInstance(const char *pszIfaceName, char *pszDevName) … … 172 176 SolarisNICMap.insert(NICPair("spwr", "SMC EtherPower II 10/100 (9432) Ethernet")); 173 177 SolarisNICMap.insert(NICPair("vboxnet", "VirtualBox Host Ethernet")); 174 SolarisNICMap.insert(NICPair( "vboxvnic_template", "VirtualBox Virtual Network Interface Template"));178 SolarisNICMap.insert(NICPair(VBOXBOW_VNIC_TEMPLATE_NAME, "VirtualBox Virtual Network Interface Template")); 175 179 SolarisNICMap.insert(NICPair("vlan", "Virtual LAN Ethernet")); 176 180 SolarisNICMap.insert(NICPair("vr", "VIA Rhine Fast Ethernet")); … … 191 195 if (Description != "") 192 196 RTStrPrintf(szNICDesc, sizeof(szNICDesc), "%s - %s", szNICInstance, Description.c_str()); 197 else if (!strncmp(szNICInstance, RT_STR_TUPLE(VBOXBOW_VNIC_TEMPLATE_NAME))) 198 { 199 /* 200 * We want prefix matching only for "vboxvnic_template" as it's possible to create "vboxvnic_template_abcd123", 201 * which our Solaris Crossbow NetFilter driver will interpret as a VNIC template. 202 */ 203 Description = SolarisNICMap[VBOXBOW_VNIC_TEMPLATE_NAME]; 204 RTStrPrintf(szNICDesc, sizeof(szNICDesc), "%s - %s", szNICInstance, Description.c_str()); 205 } 193 206 else 194 207 RTStrPrintf(szNICDesc, sizeof(szNICDesc), "%s - Ethernet", szNICInstance); … … 300 313 * Skip our own dynamic VNICs but don't skip VNIC templates. 301 314 * These names originate from VBoxNetFltBow-solaris.c, hardcoded here for now. 302 */ 303 if ( strncmp(pszIface, RT_STR_TUPLE("vboxvnic_template")) 315 * . 316 * ASSUMES template name is longer than 'vboxvnic'. 317 */ 318 if ( strncmp(pszIface, RT_STR_TUPLE(VBOXBOW_VNIC_TEMPLATE_NAME)) 304 319 && !strncmp(pszIface, RT_STR_TUPLE("vboxvnic"))) 305 320 return _B_FALSE;
Note:
See TracChangeset
for help on using the changeset viewer.