NdisQueryBufferSafe returns zero buffer length when NdisQueryPacket says there is more data

Discussion in 'Windows Vista Drivers' started by fat_boy, Sep 8, 2006.

  1. fat_boy

    fat_boy Guest


    NdisQueryPacket says the total length is 142 say and the packet has 3

    Buffer 1 is 14 length

    Buffer 2 is 20 length

    Buffer 3 is 0 length

    So the Ethernet and IP header are there, the payload is missing.

    The Packet type is ESP. A Nortel VPN client on the PC.

    If DNE is run on the PC, the third buffer has the correct length of

    Any ideas on this?
    fat_boy, Sep 8, 2006
    1. Advertisements

  2. fat_boy

    Pavel A. Guest

    Hmm... Ask Nortel, ask DN. These IM drivers get so messy and don't play
    well together...

    Pavel A., Sep 8, 2006
    1. Advertisements

  3. Sounds like a buggy driver (e.g. VPN intermediate).

    You can call NdisRecalculatePacketCounts() in order to afterwards get
    "correct" results from NdisQueryPacket() but that will not help the
    zero length buffer problem.

    Stephan Wolf [MVP], Sep 10, 2006
  4. fat_boy

    fat_boy Guest

    I found out that the packet is often received by my driver with four
    buffers, only the third one is zero length.

    Now I have handled that in my code it works OK.

    It would appear the DNE service rationalises the packet to save

    Oh well, one more to mark up to experience.
    fat_boy, Sep 11, 2006
  5. Yes, any NDIS_BUFFER in the chain of buffers can have zero length.

    Note that for the receive path, the minimum size of the first
    NDIS_BUFFER of an NDIS_PACKET must be at least
    OID_GEN_MAXIMUM_LOOKAHEAD or the complete packet, whichever is shorter.

    No such limitations apply for the transmit path.

    Stephan Wolf [MVP], Sep 11, 2006
  6. fat_boy

    fat_boy Guest

    OK, thanks.
    fat_boy, Sep 18, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.