VirtualBox

Changeset 19233 in vbox for trunk/src/VBox/Main/linux


Ignore:
Timestamp:
Apr 28, 2009 10:16:37 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46617
Message:

#2946 & #2954: Main API now supports dynamic adding/removing network adapters on all platforms. Linux backend.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/linux/NetIf-linux.cpp

    r18732 r19233  
    162162        close(sock);
    163163    }
     164    else
     165        rc = VERR_INTERNAL_ERROR;
    164166
    165167    return rc;
    166168}
     169
     170int NetIfGetConfigByName(IN_BSTR aName, NETIFINFO *pInfo)
     171{
     172    int rc = VINF_SUCCESS;
     173    int sock = socket(AF_INET, SOCK_DGRAM, 0);
     174    if (sock < 0)
     175        return VERR_NOT_IMPLEMENTED;
     176    rc = getInterfaceInfo(sock, Utf8Str(aName).c_str(), pInfo);
     177    close(sock);
     178    return rc;
     179}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette