How to manage two NICs in one driver???

ETW at boot time???I want to develop a driver like winpcap driver, the function is to catch two NICs’ packets, sort them by time, then send them to the upper application.

To obtain the high performance, I choose to develop a driver, not an upper application.

It seems that it is conflict with the structure of the driver, because the callback functions to do with IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ, IRP_MJ_WRITE, and IRP_MJ_DEVICE_CONTROL requests only do with one special device’s request.

I do not know how to do. Can anyone help me?

ETW at boot time??? You need an NDIS IM driver. Take PASSTHRU sample and adapt to your needs.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com

----- Original Message -----
From: karl
To: Windows System Software Devs Interest List
Cc: karl
Sent: Friday, September 17, 2004 5:43 AM
Subject: [ntdev] How to manage two NICs in one driver???

I want to develop a driver like winpcap driver, the function is to catch two NICs' packets, sort them by time, then send them to the upper application.

To obtain the high performance, I choose to develop a driver, not an upper application.

It seems that it is conflict with the structure of the driver, because the callback functions to do with IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ, IRP_MJ_WRITE, and IRP_MJ_DEVICE_CONTROL requests only do with one special device's request.

I do not know how to do. Can anyone help me?

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to $subst('List.Name') as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to $subst('Email.UnSub')

ETW at boot time??? Thanks for your answer.
What is IM?
----- Original Message -----
From: Maxim S. Shatskih
To: Windows System Software Devs Interest List
Cc: karl
Sent: Friday, September 17, 2004 10:09 AM
Subject: Re: [ntdev] How to manage two NICs in one driver???

You need an NDIS IM driver. Take PASSTHRU sample and adapt to your needs.

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

----- Original Message -----
From: karl
To: Windows System Software Devs Interest List
Cc: karl
Sent: Friday, September 17, 2004 5:43 AM
Subject: [ntdev] How to manage two NICs in one driver???

I want to develop a driver like winpcap driver, the function is to catch two NICs' packets, sort them by time, then send them to the upper application.

To obtain the high performance, I choose to develop a driver, not an upper application.

It seems that it is conflict with the structure of the driver, because the callback functions to do with IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ, IRP_MJ_WRITE, and IRP_MJ_DEVICE_CONTROL requests only do with one special device's request.

I do not know how to do. Can anyone help me?

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@21cn.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ''
To unsubscribe send a blank email to xxxxx@lists.osr.com

Intermediate (filter) driver. Maybe you need NDIS protocol driver instead. What you really need is to examine DDK; read basic info about NDIS in docs and then NDIS samples. PASSTHRU IM driver sample and NDISUIO (XP DDK) or NDISPROT (Server 2003 DDK) protocol driver sample.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of karl[SMTP:xxxxx@21cn.com]
Reply To: Windows System Software Devs Interest List
Sent: Friday, September 17, 2004 4:21 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to manage two NICs in one driver???

Thanks for your answer.
What is IM?
----- Original Message -----
From: Maxim S. Shatskih mailto:xxxxx
> To: Windows System Software Devs Interest List mailto:xxxxx
> Cc: karl mailto:xxxxx
> Sent: Friday, September 17, 2004 10:09 AM
> Subject: Re: [ntdev] How to manage two NICs in one driver???
>
> You need an NDIS IM driver. Take PASSTHRU sample and adapt to your needs.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com mailto:xxxxx
> http:
>
> ----- Original Message -----
> From: karl mailto:xxxxx
> To: Windows System Software Devs Interest List mailto:xxxxx
> Cc: karl mailto:xxxxx
> Sent: Friday, September 17, 2004 5:43 AM
> Subject: [ntdev] How to manage two NICs in one driver???
>
> I want to develop a driver like winpcap driver, the function is to catch two NICs’ packets, sort them by time, then send them to the upper application.
>
> To obtain the high performance, I choose to develop a driver, not an upper application.
>
> It seems that it is conflict with the structure of the driver, because the callback functions to do with IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ, IRP_MJ_WRITE, and IRP_MJ_DEVICE_CONTROL requests only do with one special device’s request.
>
> I do not know how to do. Can anyone help me?
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@21cn.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to $subst(‘List.Name’) as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to $subst(‘Email.UnSub’)
></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></http:></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

ETW at boot time??? I found. means InterMedia.
thanks.
----- Original Message -----
From: karl
To: Windows System Software Devs Interest List
Sent: Friday, September 17, 2004 10:21 AM
Subject: Re: [ntdev] How to manage two NICs in one driver???

Thanks for your answer.
What is IM?
----- Original Message -----
From: Maxim S. Shatskih
To: Windows System Software Devs Interest List
Cc: karl
Sent: Friday, September 17, 2004 10:09 AM
Subject: Re: [ntdev] How to manage two NICs in one driver???

You need an NDIS IM driver. Take PASSTHRU sample and adapt to your needs.

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

----- Original Message -----
From: karl
To: Windows System Software Devs Interest List
Cc: karl
Sent: Friday, September 17, 2004 5:43 AM
Subject: [ntdev] How to manage two NICs in one driver???

I want to develop a driver like winpcap driver, the function is to catch two NICs' packets, sort them by time, then send them to the upper application.

To obtain the high performance, I choose to develop a driver, not an upper application.

It seems that it is conflict with the structure of the driver, because the callback functions to do with IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ, IRP_MJ_WRITE, and IRP_MJ_DEVICE_CONTROL requests only do with one special device's request.

I do not know how to do. Can anyone help me?

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@21cn.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ''
To unsubscribe send a blank email to xxxxx@lists.osr.com

Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to $subst('List.Name') as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to $subst('Email.UnSub')

I’ll read them, and thank you very much.

----- Original Message -----
From: “Michal Vodicka”
To: “Windows System Software Devs Interest List”
Sent: Friday, September 17, 2004 10:45 AM
Subject: RE: [ntdev] How to manage two NICs in one driver???

Intermediate (filter) driver. Maybe you need NDIS protocol driver instead. What you really need is to examine DDK; read basic info about NDIS in docs and then NDIS samples. PASSTHRU IM driver sample and NDISUIO (XP DDK) or NDISPROT (Server 2003 DDK) protocol driver sample.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]

> ----------
> From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of karl[SMTP:xxxxx@21cn.com]
> Reply To: Windows System Software Devs Interest List
> Sent: Friday, September 17, 2004 4:21 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] How to manage two NICs in one driver???
>
> Thanks for your answer.
> What is IM?
> ----- Original Message -----
> From: Maxim S. Shatskih mailto:xxxxx
> To: Windows System Software Devs Interest List mailto:xxxxx
> Cc: karl mailto:xxxxx
> Sent: Friday, September 17, 2004 10:09 AM
> Subject: Re: [ntdev] How to manage two NICs in one driver???
>
> You need an NDIS IM driver. Take PASSTHRU sample and adapt to your needs.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com mailto:xxxxx
> http:
>
> ----- Original Message -----
> From: karl mailto:xxxxx
> To: Windows System Software Devs Interest List mailto:xxxxx
> Cc: karl mailto:xxxxx
> Sent: Friday, September 17, 2004 5:43 AM
> Subject: [ntdev] How to manage two NICs in one driver???
>
> I want to develop a driver like winpcap driver, the function is to catch two NICs’ packets, sort them by time, then send them to the upper application.
>
> To obtain the high performance, I choose to develop a driver, not an upper application.
>
> It seems that it is conflict with the structure of the driver, because the callback functions to do with IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ, IRP_MJ_WRITE, and IRP_MJ_DEVICE_CONTROL requests only do with one special device’s request.
>
> I do not know how to do. Can anyone help me?
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@21cn.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com</mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></http:></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx></mailto:xxxxx>

ETW at boot time???The WinPCap model is a good one to follow. It uses a NDIS protocol driver to fetch the packets. It then passes them to an upper-level application.

Although I haven’t used WinPCap, it should be able to concurrently fetch packets on more than one NIC at a time.

You can also look at the “Rawether Tour” at http://www.rawether.net. The tour describes the basics of packet collection using NDIS protocol drivers.

You could also use a NDIS Intermediate (IM) driver instead of a NDIS protocol driver. A NDIS protocol driver is certainly simpler than a NDIS IM driver for a new developer.

Good luck,

Thomas F. Divine, Windows DDK MVP
http://www.pcausa.com
“karl” wrote in message news:xxxxx@ntdev…
I want to develop a driver like winpcap driver, the function is to catch two NICs’ packets, sort them by time, then send them to the upper application.

To obtain the high performance, I choose to develop a driver, not an upper application.

It seems that it is conflict with the structure of the driver, because the callback functions to do with IRP_MJ_CREATE, IRP_MJ_CLOSE, IRP_MJ_READ, IRP_MJ_WRITE, and IRP_MJ_DEVICE_CONTROL requests only do with one special device’s request.

I do not know how to do. Can anyone help me?