RE: Transfer a sending packet to upper TCP/IP protocol layer in IM
- From: Seong Moon <SeongMoon@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 17 Mar 2007 20:06:00 -0700
Hi Anton!
I'm the one who posted the question about IPv6 over IPv4 UDP tunnel driver.
I'm now thinking the IM driver for my objective.
In the process of packet transmission, I have a following scenario.
1. IPv6 application sends a IPv6 packet.
2. The packet can be captured on my IM driver. The captured packet will be
as following
______________________________
| L2 header| IPv6 header | Payload |
------------------------------------------
3. My IM driver has a mapping table which consists of
o. destination IPv6 address
o. local IPv4 address
o. remote IPv4 address
o. local UDP Port number
o. remote UDP Port number
the above information should set correctly via the other control
application.
4. If the captured IPv6 packet on my IM driver has a destination IPv6
address which
has already configured on the above mapping table, the packet should be
proccessed as follows :
o. The IPv4 header and UDP header are prepended on the original IPv6
packet.
o. Of course, L2 header(e.g. MAC header) should be ignored.
o. So, the final packet will be the following format.
____________________________________________
| IPv4 header | UDP header | IPv6 header | Payload |
-------------------------------------------------------------
5. Now, I can indicate the encapsulated packet the the upper TCP/IP layer.
As result, I'd like to have the IP layer forward the IPv4 packet correctly.
6. As you mentioned, the MAC header should be processed correctly.
I'm not sure how I can process the MAC header. Any idea ?
Until here is my idea about the transmission of the tunneled packet.
I'll appreciate any comment.
regards seong
"Anton Bassov" wrote:
.Can the TCP/IP driver foward the packet correctly ?
Forward to whom???? MiniportSendPackets() deals only with outgoing packets,
which means that packet' s source IP and MAC addresses are local and
destination ones are remote, i.e. the packet is outgoing one and TCPIP
already made its routing decision to send a packet via either underlying
adapter (if you speak about filter), or via your virtual miniport (if you
speak about MUX). If you want to change the adapter the packet gets sent
through, you have to call NdisSend() and, specify NDIS_HANDLE that
corresponds to that adapter ( apparently, it is a good idea to replace MAC
addresses in a packet's ARP header as well), rather than indicating it
to TCPIP as incoming one. Apparently, TCPIP is going to silently discard
your packet if you indicate it, and that's it......
If you want TCPIP to treat you packet as incoming one, you have to modify
both physical and logical transport addresses in the packet's headers.
However, if TCPIP
takes it for incoming one, why should it send it to any remote
address(unless logical IP address in the packet's header is remote and the
system is configured as a router)????
In other words, no matter what you do, you have to modify packet's headers
in such way that it conforms to the logic of the bound protocol...
Another option (at least in MUX) could be taking the whole packet simply as
data, and resubmitting it to TCPIP via its TDI interface, i.e. to act simply
as TCPIP's client
If you tell us a bit more about your objectives, probably, we will be able
to give you the most appropriate advice....
Anton Bassov
"Seong Moon" wrote:
Hi ! There !
I'm now designing Intermediate Driver for my project.
I'd like to transfer sending packet to the upper TCP/IP protocol layer on my
MiniportSendPackets function as if the packet is received from the NIC.
And I'd like to have IP protocol layer forward the transferred packet to the
adaquate adaptor.
Is it possible ?
That is, Can I call NdisMIndicateReceivePacket() in my MiniportSendPacket() ?
If that possible, Can the TCP/IP driver foward the packet correctly ?
Thanks in advance.
regards seong
- Follow-Ups:
- RE: Transfer a sending packet to upper TCP/IP protocol layer in IM
- From: Anton Bassov
- RE: Transfer a sending packet to upper TCP/IP protocol layer in IM
- References:
- RE: Transfer a sending packet to upper TCP/IP protocol layer in IM
- From: Anton Bassov
- RE: Transfer a sending packet to upper TCP/IP protocol layer in IM
- Prev by Date: Re: bda ip sink and vista
- Next by Date: Re: EngAlphaBlend crashes with non primary surface
- Previous by thread: RE: Transfer a sending packet to upper TCP/IP protocol layer in IM
- Next by thread: RE: Transfer a sending packet to upper TCP/IP protocol layer in IM
- Index(es):
Relevant Pages
|
Loading