Re: Re: Developping a forwarding application

Home Forums Discussions Support Portal Developing a forwarding application Re: Re: Developping a forwarding application

#6887

Eldred
Participant

I’ve been busy on another project this last month and haven’t post feedback. I finally managed to read packets and forward them to another interface.
But for what I want to do, I need to have more precise rules. For example, I want to forward packets according to their source IP.

If source IP == xx.xx.xx.xx, then forward, else let the packet go.

In order to use SendPacketToAdapter correctly, I need to set the mode to MSTCP_FLAG_SENT_TUNNEL| MSTCP_FLAG_RECV_TUNNEL. Am I right so far ?

But if I do so, every packet will be blocked. So I guess I need to setup filter rules. As I could read from the doc and the filter sample, everything I want to do is possible. I just have a question about how to use this : do I need to setup filter rules first, and then the ReadPackets function will only “see” packets whose filter action was “FILTER_PACKET_REDIRECT” ?

I don’t know if I was really clear, just tell me if I wasn’t.