Re: Notifier chains

2013-07-23 Thread Adel Qodmani
On Tue, Jul 23, 2013 at 7:21 AM, PV Juliet pvjul...@gmail.com wrote: Hi, Thanks for the reply . Can you tell me how i can subscribe to notifier chains when IP address changes in a system ? What are all the steps to make it work?? Thanks and Regards Juliet Hey Juliet, Well, let me

Sending an ICMP packet with ip_local_out

2013-06-16 Thread Adel Qodmani
Hello everyone, I am trying to send an ICMP message in a kernel module; typically I'd build the skb, set up the net_device, the ethernet header and then use dev_queue_xmit. But right now I want my packet to follow the IP routing rules set in the system, so I thought I'll use ip_local_out

Source based routing

2013-06-02 Thread Adel Qodmani
Hello everyone, I'm trying to force the kernel into using a source-based routing in my kernel module. What I mean by this is that I want packets with IP: X to go through the interface that has the IP: X. So far, I found out how to do that using IPTABLES, but I want to force this policy

Sending an IP packet

2013-02-22 Thread Adel Qodmani
Hey, My question is quite simple, I have an sk_buff that I want to transmit, the sk_buff is an ICMP message and so far, I've built the headers and set up everything. The problem is, when I want to do such a thing, I typically use a function called: dev_queue_xmit which takes the skb and

Re: Sending an IP packet

2013-02-22 Thread Adel Qodmani
luck! Rami Rosen http://ramirose.wix.com/ramirosen On Fri, Feb 22, 2013 at 2:36 PM, Adel Qodmani mpca...@gmail.com wrote: Hey, My question is quite simple, I have an sk_buff that I want to transmit, the sk_buff is an ICMP message and so far, I've built the headers and set up

Re: Sending an IP packet

2013-02-22 Thread Adel Qodmani
On Fri, Feb 22, 2013 at 5:40 PM, valdis.kletni...@vt.edu wrote: In that case, you *really* want to go look at how TCP and SCTP and other protocols handle ICMP integration. You want an API that integrates your ICMP handling with the rest of the protocol stack, because otherwise you'll end up

Re: use of EXPORT_SYMBOL()

2013-01-29 Thread Adel Qodmani
On Tue, Jan 29, 2013 at 9:52 AM, Mulyadi Santosa mulyadi.sant...@gmail.comwrote: On Tue, Jan 29, 2013 at 3:13 AM, horseriver horseriv...@gmail.com wrote: hi:) In kernel code ,what is the use of EXPORT_SYMBOL()? Does it export a function to user application , so this function

Re: Why do { // do something ; } while (0); ?

2012-12-13 Thread Adel Qodmani
On Thu, Dec 13, 2012 at 10:55 AM, Shraddha Kamat sh200...@gmail.com wrote: I notice do { // do something 1 ; // do something 2 ; ... } while (0); being used everywhere in the kernel code I just can't guess of any use of this other than executing couple of C statements together