Subject: Re: Question regarding linux networking

From: Jarek Poplawski <[email-masked]>
Date: Wed, 10 Jun 2009 11:09:01 +0000

On Wed, Jun 10, 2009 at 06:37:49AM +0000, Jarek Poplawski wrote:
> On Tue, Jun 09, 2009 at 05:50:09PM +0530, sampath kumar wrote:
...
> > I'm trying to use/understand linux networking code. Say for example decnet,
> > phonet etc, in order to register a device we need to send an RTM_NEWADDR msg
> > to the kernel.
> > 
> > do I've to send it from kernel space or user space ? If I check the code of
> > decnet or phonet, each have registered using rtnl_register an addr_doit func
> > after reception of RTM_NEWADDR msg. how do i send this msg and from where ??

You can send it both from kernel and user space. For user space
usage have a look at iproute2 sources. And here is a general
description: http://people.redhat.com/nhorman/papers/netlink.pdf

Jarek P.