reg. addition of 1 byte data in NDIS passthru driver

Hello,
I am developing an IM passthru driver on Windows XP.
In my driver code, I add a 1 byte sequence number for each packet that is transmitted. This works fine when the data to be sent is less than 1480 bytes. But when the data to be sent is equal to 1480 bytes i.e. for all IP fragmented packets, last byte in each fragment gets truncated. This is because; addition of sequence number increases the Ethernet frame length to 1519 bytes (14 bytes Ethernet header, 20 bytes IP header, 1480 bytes data + 1 byte sequence number) which is greater than its MTU.

Could anyone please guide me on how to limit the IP fragmented packets to 1479 bytes so that when sequence number is added in the driver code, it does not exceed the MTU? I am new to Windows driver development. Any help would be highly appreciated. Thanks!

With Regards,
Subashini V

DISCLAIMER:

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.


You could filter the completion of NDIS requests for OD_GEN_MAXIMUM_FRAME_SIZE and OID_GEN_MAXIMUM_TOTAL_SIZE and modify the size reported to higher layers by deducting the size of the private data that you add.

Alternatively, you could implement fragmentation yourself. It’s not too hard.

Good luck,

Thomas F. Divine
http://www.ndis.com

From: Subashini Venkatapathy - ERS, HCL Tech
Sent: Tuesday, January 05, 2010 5:37 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] reg. addition of 1 byte data in NDIS passthru driver

Hello,

I am developing an IM passthru driver on Windows XP.

In my driver code, I add a 1 byte sequence number for each packet that is transmitted. This works fine when the data to be sent is less than 1480 bytes. But when the data to be sent is equal to 1480 bytes i.e. for all IP fragmented packets, last byte in each fragment gets truncated. This is because; addition of sequence number increases the Ethernet frame length to 1519 bytes (14 bytes Ethernet header, 20 bytes IP header, 1480 bytes data + 1 byte sequence number) which is greater than its MTU.

Could anyone please guide me on how to limit the IP fragmented packets to 1479 bytes so that when sequence number is added in the driver code, it does not exceed the MTU? I am new to Windows driver development. Any help would be highly appreciated. Thanks!

With Regards,

Subashini V


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer DISCLAIMER:

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.


Is this just for diagnostic ?tagging? of packets passing through your IM
driver on the send path or are you trying to actually carry some information
in this octet to a remote station?

Is this scheme supposed to operate ?transparent? to the host and other
stations or is it acceptable to reduce the effective MTU?

Is this only for IP packets or for all Ethertypes?

It is quite possible for receivers to be confused by this octet and reject
the packet as malformed since it will have arrived with an extra octet. A
corresponding filtering element would be required on the receive path where
this packet is processed to strip the extra octet. Some IP implementations
may be perfectly happy to ignore the octet, others may not.

Just what are you trying to accomplish at a ?high level? by tagging outgoing
packets this way?

Good Luck,

Dave Cattley

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Subashini
Venkatapathy - ERS, HCL Tech
Sent: Tuesday, January 05, 2010 5:38 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] reg. addition of 1 byte data in NDIS passthru driver

Hello,

I am developing an IM passthru driver on Windows XP.

In my driver code, I add a 1 byte sequence number for each packet that is
transmitted. This works fine when the data to be sent is less than 1480
bytes. But when the data to be sent is equal to 1480 bytes i.e. for all IP
fragmented packets, last byte in each fragment gets truncated. This is
because; addition of sequence number increases the Ethernet frame length to
1519 bytes (14 bytes Ethernet header, 20 bytes IP header, 1480 bytes data +
1 byte sequence number) which is greater than its MTU.

Could anyone please guide me on how to limit the IP fragmented packets to
1479 bytes so that when sequence number is added in the driver code, it does
not exceed the MTU? I am new to Windows driver development. Any help would
be highly appreciated. Thanks!

With Regards,

Subashini V


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

DISCLAIMER:


The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect
the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail
is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.