NDIS packet delay - best way?

Hi there, all!

I do an NDIS IM driver that should delay some packets, that
are been sent. Actually this is not real IM driver - I use
NdisOpenAdapter and NdisRegisterProtocol hooking technique.
I’m not a good NDIS expert, so I’m thinking about the best way to delay
the packet. My variants of doing this:

  1. In Send function allocate a new packet identical to original, then
    start timer with NdisSetTimer. In timer function call NdisSend for new
    packet and complete the original packet.

  2. In Send function save the original packet pointer, start timer and
    in timer function call miniport’s original Send function with this
    packet.

I doubt about the IRQL in the second variant, as timer function runs
at DISPATCH_LEVEL.

How do you think, what is the best way? Maybe other variants?

p.s. I don’t want to drop packet, as I think this may cause lager
delays than I need.

Tnanks!

Best regards,
Yura mailto:xxxxx@mail.zp.ua

Put it to the queue and return NDIS_STATUS_PENDING. After the delay will
expire, send it down.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Yura”
To: “Windows System Software Devs Interest List”
Sent: Sunday, September 26, 2004 7:54 PM
Subject: [ntdev] NDIS packet delay - best way?

>
> Hi there, all!
>
> I do an NDIS IM driver that should delay some packets, that
> are been sent. Actually this is not real IM driver - I use
> NdisOpenAdapter and NdisRegisterProtocol hooking technique.
> I’m not a good NDIS expert, so I’m thinking about the best way to delay
> the packet. My variants of doing this:
>
> 1. In Send function allocate a new packet identical to original, then
> start timer with NdisSetTimer. In timer function call NdisSend for new
> packet and complete the original packet.
>
> 2. In Send function save the original packet pointer, start timer and
> in timer function call miniport’s original Send function with this
> packet.
>
> I doubt about the IRQL in the second variant, as timer function runs
> at DISPATCH_LEVEL.
>
> How do you think, what is the best way? Maybe other variants?
>
> p.s. I don’t want to drop packet, as I think this may cause lager
> delays than I need.
>
> Tnanks!
> –
> Best regards,
> Yura mailto:xxxxx@mail.zp.ua
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com