~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/HostDrivers/VBoxNetFlt/win/VBoxNetFltMp-win.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: VBoxNetFltMp-win.c $ */
 
1
/* $Id: VBoxNetFltMp-win.c 33540 2010-10-28 09:27:05Z vboxsync $ */
2
2
/** @file
3
3
 * VBoxNetFlt - Network Filter Driver (Host), Windows Specific Code. Miniport edge of ndis filter driver
4
4
 */
209
209
        {
210
210
#ifdef VBOXNETFLT_WITH_IOCTL_SECURITY
211
211
            /* NdisMRegisterDevice does not offers us the ability to set security attributes */
212
 
            /* need to do this "manualy" for the device to be accessible by the non-privileged users */
 
212
            /* need to do this "manually" for the device to be accessible by the non-privileged users */
213
213
            Status = vboxNetFltWinSetSecurity(&DeviceLinkUnicodeString);
214
214
            Assert(Status == STATUS_SUCCESS);
215
215
            if(Status != STATUS_SUCCESS)
346
346
        pAdapt->hMiniportHandle = MiniportAdapterHandle;
347
347
 
348
348
        Assert(vboxNetFltWinGetOpState(&pAdapt->MPState) == kVBoxNetDevOpState_Initializing);
349
 
        /* the MP state should be already set to kVBoxNetDevOpState_Initializing, just a paranoya
350
 
         * in case NDIS for some reason calls us in some unregular way */
 
349
        /* the MP state should be already set to kVBoxNetDevOpState_Initializing, just a paranoia
 
350
         * in case NDIS for some reason calls us in some irregular way */
351
351
        vboxNetFltWinSetOpState(&pAdapt->MPState, kVBoxNetDevOpState_Initializing);
352
352
 
353
353
        LogFlow(("==> Miniport Initialize: Adapt %p\n", pAdapt));
495
495
    Assert(vboxNetFltWinGetOpState(&pAdapt->MPState) == kVBoxNetDevOpState_Initialized);
496
496
    /*
497
497
     * Set the flag that the miniport below is unbinding, so the request handlers will
498
 
     * fail any request comming later
 
498
     * fail any request coming later
499
499
     */
500
500
    RTSpinlockAcquireNoInts(pNetFlt->hSpinlock, &Tmp);
501
501
 
1150
1150
#endif /* ifndef VBOXNETADP*/
1151
1151
 
1152
1152
/**
1153
 
 * This routine does all the procssing for a request with a SetPower Oid
 
1153
 * This routine does all the processing for a request with a SetPower Oid
1154
1154
 * The miniport shoud accept  the Set Power and transition to the new state
1155
1155
 *
1156
1156
 * The Set Power should not be passed to the miniport below
1615
1615
            // fallthrough:
1616
1616
        case OID_GEN_MEDIA_IN_USE:
1617
1617
            //
1618
 
            // Specifiy a complete list of the media types that the NIC
 
1618
            // Specify a complete list of the media types that the NIC
1619
1619
            // currently uses.
1620
1620
            //
1621
1621
            pInfo = (PVOID) &Medium;
1649
1649
 
1650
1650
        case OID_GEN_MAXIMUM_FRAME_SIZE:
1651
1651
            //
1652
 
            // Specifiy the maximum network packet size, in bytes, that the
 
1652
            // Specify the maximum network packet size, in bytes, that the
1653
1653
            // NIC supports excluding the header. A NIC driver that emulates
1654
1654
            // another medium type for binding to a transport must ensure that
1655
1655
            // the maximum frame size for a protocol-supplied net packet does
1836
1836
 
1837
1837
        case OID_GEN_CURRENT_PACKET_FILTER:
1838
1838
            //
1839
 
            // Specifiy the types of net packets such as directed, broadcast
 
1839
            // Specify the types of net packets such as directed, broadcast
1840
1840
            // multicast, for which a protocol receives indications from a
1841
1841
            // NIC driver. After NIC is initialized, a protocol driver
1842
1842
            // can send a set OID_GEN_CURRENT_PACKET_FILTER to a non-zero value,
1894
1894
            //
1895
1895
            // Return the MAC address the NIC is currently programmed to
1896
1896
            // use. Note that this address could be different from the
1897
 
            // permananent address as the user can override using
 
1897
            // permanent address as the user can override using
1898
1898
            // registry. Read NdisReadNetworkAddress doc for more info.
1899
1899
            //
1900
1900
            {
2128
2128
    while (FALSE);
2129
2129
 
2130
2130
    //
2131
 
    // Program the hardware to add suport for these muticast addresses
 
2131
    // Program the hardware to add support for these multicast addresses
2132
2132
    //
2133
2133
 
2134
2134
    LogFlow(("<== vboxNetFltWinMpSetMulticastList\n"));