Send new Packet in NDIS intermediate driver.

I want to send some my packet to other host in NDIS intermediate driver.
But there has not a good way to get destination host’s MAC address.

by make a arp request ?

who has idea about it ?

thanks a lot

b???.???????&?v?'?ׯj?.n?Qyȩf??]?:.?˛???m??֛???zf???%y?ޞ?^?˛??^r*Lzfެ?…???l??ܢ

You can use NdisRequest like following:

PPACKET_OID_DATA OidData=Irp->AssociatedIrp.SystemBuffer;
pRequest = ExAllocatePool(NonPagedPool, sizeof(INTERNAL_REQUEST));

pRequest->Request.RequestType=NdisRequestQueryInformation;
pRequest->Request.DATA.QUERY_INFORMATION.Oid= OidData->Oid;

pRequest->Request.DATA.QUERY_INFORMATION.InformationBuffer=OidData->Data;

pRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength=OidData->Length;

NdisRequest(
&status,
open->AdapterHandle,
&pRequest->Request
);

OR you can refer to packet sample in NTDDK.

Best Regards

Kevin Liang
Accton Technology Corporation
Shanghai R&D Division

“sunx”
To: “NT Developers Interest List”
Sent by:
xxxxx@lis cc:
ts.osr.com Subject: [ntdev] Send new Packet in NDIS
intermediate driver.

2001/04/03 04:19 PM
Please respond to “NT
Developers Interest
List”

I want to send some my packet to other host in NDIS intermediate driver.
But there has not a good way to get destination host’s MAC address.

by make a arp request ?

who has idea about it ?

thanks a lot


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I wonder how you want to get destination MAC address this way.

There are several possibilities:

  • ARP
  • monitor traffic in IM driver and store all received MAC addresses
  • send a broadcast and your driver on destination node (if there is one) can
    send a reply and you can start communication

Best regards,

Michal Vodicka
Veridicom
(RKK - Skytale)
[WWW: http://www.veridicom.com , http://www.skytale.com]


From: xxxxx@accton-sh.com[SMTP:xxxxx@accton-sh.com]
Reply To: NT Developers Interest List
Sent: Tuesday, April 03, 2001 12:03 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Send new Packet in NDIS intermediate driver.

You can use NdisRequest like following:

PPACKET_OID_DATA OidData=Irp->AssociatedIrp.SystemBuffer;
pRequest = ExAllocatePool(NonPagedPool, sizeof(INTERNAL_REQUEST));

pRequest->Request.RequestType=NdisRequestQueryInformation;
pRequest->Request.DATA.QUERY_INFORMATION.Oid=
OidData->Oid;

pRequest->Request.DATA.QUERY_INFORMATION.InformationBuffer=OidData->Data;

pRequest->Request.DATA.QUERY_INFORMATION.InformationBufferLength=OidData->
Length;

NdisRequest(
&status,
open->AdapterHandle,
&pRequest->Request
);

OR you can refer to packet sample in NTDDK.

Best Regards

Kevin Liang
Accton Technology Corporation
Shanghai R&D Division

“sunx”

To: “NT Developers
> Interest List”
> Sent by:
>
> xxxxx@lis cc:
>
> ts.osr.com Subject: [ntdev] Send
> new Packet in NDIS
> intermediate driver.
>
>
>
> 2001/04/03 04:19 PM
>
> Please respond to “NT
>
> Developers Interest
>
> List”
>
>
>
>
>
>
>
>
>
> I want to send some my packet to other host in NDIS intermediate
> driver.
> But there has not a good way to get destination host’s MAC address.
>
> by make a arp request ?
>
> who has idea about it ?
>
> thanks a lot
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rkk.cz
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com