Diego B wrote:
Hi;
We are implementing a module based on the early packet filtering hooks
API.
This module is ported from the netfilter Linux API.
Now my question;
We are trying to put packets on the net as soon as we got them and
change some parameters to the IP and UDP
headers.
So we catch them in the pre-routing hook (PHYSCAL_IN), change some fields
and we want to put it on the wire ASAP.
My question is: What is the bes way to do that ?
We tried doing net_inject(DIRECT) with the modified packet but the
system panic all the time.
Can I get any sample code on how to use net_inject ? It is full
implemented ?
Or doing net_inject(DIRECT) is not the best way ?
How do you want the system to treat the packet?
If you know the exact interface to send it out and you do not want
to see it again with PHYSICAL_OUT, then you can use DIRECT.
If you wanted to see it again or did not know how to route it out
of the system, then you would use QUEUE_OUT.
Also, how to tell the system to stop processing the packet after I
return from the hook ?
Return a value of 1 from the hook callout.
If you are seeing some panics, please post the output from doing
"::panicinfo"
and "::msgbuf" with "mdb -k #" for the crash dump number #.
Darren
_______________________________________________
networking-discuss mailing list
[email protected]