RE: Transfer a sending packet to upper TCP/IP protocol layer in IM



Can I call NdisMIndicateReceivePacket() in my MiniportSendPacket()

Sure you can - this is out of question. The only question is what are you
going to achieve this way......

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

.



Relevant Pages

  • RE: Transfer a sending packet to upper TCP/IP protocol layer in IM
    ... you should NOT indicate outgoing packet to TCPIP. ... you should just prepend UDP and IPv4 IP headers to IPv6 packet ... without removing MAC header, then prepend MAC header to it (if we assume that ... TCPIP has chosen the appropriate adapter, ...
    (microsoft.public.development.device.drivers)
  • Re: Problem calling NdisMSendComplete within MiniportSendPackets on IM Drivers
    ... Stephan, without going into too much detail, the IM driver acts as a filter ... packet sent down to the IM driver via MinportSendPackets. ... the first packet serially through a call to NdisMSendComplete within the ... call of MiniportSendPackets. ...
    (microsoft.public.development.device.drivers)
  • NDIS problem indicating from MiniportSendPackets
    ... I have written an NDIS IM driver that do some filtering of packets. ... The original packet is discarded. ... connection which sends a SYN/ACK that I catch in MiniportSendPackets. ... (atleast not that the upper layer knows of). ...
    (microsoft.public.development.device.drivers)
  • MiniportSendPackets in NDIS 5.1 deserialized driver
    ... Could you please tell me what is the best practise of implementing a MiniportSendPackets() in a deserialized NDIS intermediate driver. ... // Allocate a new packet descriptor to encapsulate data from the original packet. ... &MediaSpecificInfo, ...
    (microsoft.public.development.device.drivers)
  • Re: NDIS problem indicating from MiniportSendPackets
    ... I have written an NDIS IM driver that do some filtering of packets. ... The original packet is discarded. ... connection which sends a SYN/ACK that I catch in MiniportSendPackets. ... (atleast not that the upper layer knows of). ...
    (microsoft.public.development.device.drivers)

Loading