How to change INF values and RAW IP frames on existing ethernet driver to get mobile broadband support ? RRS feed

  • Question

  • I am developing a application which has a Interface list to see all active adapters . The application is like a VPN . So it connect with active adapter and I can browse internet . So I am creating  a virtual adapter and using this adapter I am connecting . It works Fine on Ethernet , Wi-Fi .

    Now i want to get connect my application on Mobile broadband . I installed HUAWEI Mobile broadband . It has 2 type of connection

    1. RAS type (3g modem)
    2. NDIS type (3g adapter card)

    I can see 3g modem active on Interface list when i connect with RAS type . But I can't see 3g adapter card on Interface list when i connect with NDIS type .

    So after that I got document from Microsoft for

    1. MB Miniport driver INF Requirements
    2. MB Raw IP Packet Processing Support

    I think these are the main changes to get support for mobile broadband .

    Previously my code contain 2  INF File  . One is for virtual miniport adapter INF and other is  Multiplexer INF file .

    Multiplexer INF File :


    HKR, Ndi, FilterClass, , custom

    HKR, Ndi, FilterType, 0x00010001, 0x00000002

    HKR, Ndi\Interfaces, UpperRange, , "noupper"

    HKR, Ndi\Interfaces, LowerRange, , "nolower"

    HKR, Ndi\Interfaces, FilterMediaTypes, , "nolower, ethernet, wan"

    HKR, Ndi, FilterRunType, 0x00010001, 1

    Virtual adapter INF 


    Characteristics = 0x81 ; NCF_HAS_UI | NCF_VIRTUAL

    *IfType = 0x06 ; IF_TYPE_ETHERNET_CSMACD

    *MediaType = 0x00 ; NdisMedium802_3

    *PhysicalMediaType = 0x0E ; NdisPhysicalMedium802_3

    CopyFiles = MYVNET.CopyFiles

    AddReg = MYVNET.Reg


    HKR, Ndi\Interfaces, UpperRange, 0, "ndis5"

    HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"

    So my Doubts are :

    Q1 : Where I should put INF changes in my application . Is it on Virtual INF or Multiplexer INF File ?

    Q2 : I should Add both Ethernet Support and Broadband Support values in INF File ?
    like :

    HKR, Ndi\Interfaces, UpperRange, 0, "ndis5,flpp4, flpp6"

    HKR, Ndi\Interfaces, LowerRange, 0, "Ethernet,ppip

    Is it correct ?

    Q3: For adding IfType , MediaType and PhysicalMediaType Should i add both Ethernet and mobile broadband change ?

    like this :

    *MediaType = 0x00 ,0x07 ; NdisMedium802_3 and NdisWirelssWan 

    is this Correct ?

    After that I should add RAW IP packet . So where should I add these lines ?

    NdisSetNblFlag(pNbl, NDIS_NBL_FLAGS_IS_IPV4);

    value = ConvertToNetworkByteOrder(0x0800);

    NET_BUFFER_LIST_INFO(pNbl, NetBufferListFrameType) = value

    Is it in Miniport File or Filter file ? 

    miniport Filr contain functions like : 

    void CMiniport::SendPackets ( ) , void CMiniport::ReturnPacket( ) , CMiniport::WanSend ( )  Functions

    and Filter File contain Function like :

    CFilter::SendNetBufferLists ( ) , CFilter::SendNetBufferListsComplete ( ) , CFilter::ReceiveNetBufferLists ( ) and CFilter::ReturnNetBufferLists ( ) .

    Inside which one i should add RAW IP Frame code ?

    please help me . Thanks & regards 

    • Edited by vinay kp123 Monday, November 30, 2015 7:08 AM
    Monday, November 30, 2015 7:05 AM