|
From: Ilia B. <ib...@pi...> - 2001-06-29 20:10:15
|
A module should be able to do the same thing as whatever I put directly in the kernel. I remember a while ago Alan Cox turned the whole TCP/IP into a module (I guess he had some free time on his hands :-) ) and it worked, so its really not an issue. Raw sockets' main disadvantage - can't do injection up the protocol stack - only on the wire. -ilia Feiyi Wang wrote: > if you just want to inject a brand new packet, can raw socket do? Of > course, the interface is not unified in this case. For netfilter, a moudule > maybe sufficient for this purpose (haven't looked closely at libq to see if > a user space program can also do that). > > Ilia, I am not sure if a module can give you the exact interface as orginal > divert socket, in other words, I suspect that more involvment is needed, I > guess it is up to you to find out :-) > > -Feiyi > > Jan Møller wrote: > > > > I would say that netfiter can do almost the same as divert sockets. But > > there is a major difference. > > When using netfilter you can modify and remove packets in the packet > > stream. > > When using divert sockets you can modify, remove and inject packets in the > > packet stream. > > The packet injection is a very important feature for some uses. > > > > Unfortunately you cannot do that with netfilter in the Linux 2.4 kernel. > > When a packet pops from the kernel to userspace using netfilter, the user > > space application may either ignore it (remove it from the packet stream) > > or modify it. You cannot inject a packet without receiving one first. > > > > It would infact be nice if divert would be ported to Linux 2.4 or if > > netfilter would allow packet injection. > > > > -- J. Miller > > > > -- > Feiyi Wang, Ph.D. > Advanced Networking Research, MCNC > (919) 248-1421 (ph) (919) 248-1455 (fax) > ------------------------------------------------------------------------- > Divert Sockets for Linux List > mailto:di...@li... > http://www.anr.mcnc.org/~divert > ------------------------------------------------------------------------- -- -------------------------------------+---------------------- Ilia Baldine, PhD | ib...@an... Network Research Engineer, | ph#:(919)248-1847 Advanced Networking Research, MCNC | FAX:(919)248-1455 http://people.anr.mcnc.org/~ibaldin | -------------------------------------+---------------------- "I used to think the brain was the most important part of the body, but then I realized who was telling me that." -Emo Philips ------------------------------------------------------------ ------------------------------------------------------------------------- Divert Sockets for Linux List mailto:di...@li... http://www.anr.mcnc.org/~divert ------------------------------------------------------------------------- |