Re: Moving modified packets between processes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 2010-10-24 14:34, Kfir Lavi wrote:

>On Sun, Oct 24, 2010 at 1:31 PM, Jan Engelhardt <jengelh@xxxxxxxxxx> wrote:
>> On Sunday 2010-10-24 10:54, Kfir Lavi wrote:
>>
>>>I will need to move Ethernet, ARP and IP packets.
>>>What are my options regarding moving the packet modified with new
>>>custom header from one process to another process?
>>
>> http://en.wikipedia.org/wiki/Inter-process_communication lists ways of
>> transferring data between programs.
>>
>
>Thanks,
>There is no mention in this page about Netlink.

Netlink belongs to the class of sockets.

>As I'm getting packets from the kernel via netlink, I would think it's
>a good choice to continue using netlink.
>I'm trying now to create a small example code using libnl.
>What is your take on using netlink?

For user-to-user communications, the code would be simple enough to 
not warrant the use of libnl. Neither is a nlmsghdr structure needed.

My take is that I would not normally use Netlink for user-to-user 
communications. For one, you would need to know the PID of the other 
process, which is not always feasible to determine. Compare with a named 
PF_LOCAL socket where both processes only need to know a rendezvous 
point. Even TCP socket numbers are more predictable - and controllable 
even - than a random PID. Also note that due to Netlink's use of PIDs, 
you cannot access other PID namespaces.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux