you can socket calls in the kernel level also. I had seen it in an iSCSI implementation. I am not aware of the modules. Sorry, for that On 5/10/05, rajat swarup <rajats@xxxxxxxxx> wrote: > On 5/10/05, kalkov <kalkotiv@xxxxxxxxx> wrote: > > hi, > > did u get what u wanted, please update. > > > > On 5/7/05, rajat swarup <rajats@xxxxxxxxx> wrote: > > > On 5/7/05, kalkov <kalkotiv@xxxxxxxxx> wrote: > > > > i think you should, as per my knowledge. GROUP, any inputs !!!! > > > > > > > I am operating in the netfilter hook in the NF_IP_FORWARD stage. > > > > > > > > > > > > > > > > > So would I need to fill in the MAC layer entries also into the buffer > > > > > that I allocate if I need to send ICMP messages? > > > > > I want to use icmp_send() method. > > > > > > > > I am not sure what "grouping" means but does it mean that I should > > > take those entries from the arriving packets? > > > > > Hi Kalkov, > There were a couple of things. I was working in a Kernel module that > was implementing Netfilter hooks, so the raw sockets scheme would not > be helpful as creating (raw) sockets using socket() system call is > done in userland. But since we are in kernel we cannot have socket() > system calls. > I figured that there were certain flaws in trying to construct an ICMP > packet in the Netfilter hooks as the mac header needs to be populated > for which you may need to send ARP requests. > So we tried to make modifications in net/ipv4/ip_forward.c so that > ICMP traceback could be done by calling icmp_send() method and > populating the fields of the new packets (created by alloc_skb() ) by > accessing fields using existing sk_buff structure > (include/linux/skbuff.h) which the ip_forward function receives as > parameter as it surely has all routing information and MAC header > info. > Please let me know if I am making any sense. > > Thanks and regards, > Rajat. > http://rajatswarup.blogspot.com/ > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/