Re: Send packets from userspace program to kernel interface

2016-08-16 Thread Bhaskar Upadhyayula
between two ports and send packets from one port and receive > on another. > > On Tue, Aug 16, 2016 at 2:41 PM, Alan Liddell > wrote: >> Would sending the packet back out through the loopback address accomplish >> what you're looking to do? >> >> >

Re: Send packets from userspace program to kernel interface

2016-08-16 Thread Bhaskar Upadhyayula
Aug 16, 2016 7:51 AM, "Bhaskar Upadhyayula" wrote: >> >> Hello All, >> >> Summary: >> === >> If a userspace program has a well crafted packet (ethernet or IPv4 or >> other protocol packet), is there a way for it to send the packet to >> kernel

Send packets from userspace program to kernel interface

2016-08-15 Thread Bhaskar Upadhyayula
Hello All, Summary: === If a userspace program has a well crafted packet (ethernet or IPv4 or other protocol packet), is there a way for it to send the packet to kernel's network interface, simulating the behavior that the packet ingress'ed on that interface? Is this possible? Detailed Problem D

Re: Questions on Netlink sockets

2015-08-25 Thread Bhaskar Upadhyayula
Hi Rami, Sorry for the delay in response. In the buggy code, the missing lines were the following: 115 data->rta_len = (void *)NLMSG_TAIL(&req.n) - (void *)data; 116 linkinfo->rta_len = (void *)NLMSG_TAIL(&req.n) - (void *)linkinfo; Above code is to adjust the length for nested attribut

Re: Questions on Netlink sockets

2015-08-19 Thread Bhaskar Upadhyayula
this. > > Do you get any error as a result of sending this netlink message ? > (I mean error in userspace or in kernel; if there is an error message > in the kernel it can be viewed by looking at the end of dmesg output) > > Further more, I suggest that you will post the code here.

Questions on Netlink sockets

2015-08-17 Thread Bhaskar Upadhyayula
Hello, I want to check with the group if this is right mailing list to post my question. Here is what I am doing. + From a user-space program, mimicking the behavior of creating a VLAN interface when we execute the following ip command: $ ip link add name link type vlan id Example: $ ip