Skip to contentSkip to conversation

NETLINK_ROUTE sockets in kernel

DISCUSSION Anil Gunturu 5 participants 5 messages Nov 2, 2004 – Nov 3, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,
I am trying to undestand the NETLINK_ROUTE protocol sockets on 2.4.18 kernel. Specifically, I am interested in knowing how the kernel processes the netlink messages that it recieves from user space. I was browsing the rtnetlink_rcv_msg (net/core/rtnetlink.c) function in the kernel. But its not clear on how the rtnetlink_links array is populated for PF_NETLINK family. rtnetlink_init seem to populate for PF_PACKET and PF_UNSPEC.
Thanks,
-Anil

maintainer
#1 lore raw
Quoted 3 lines · On Tue, 2 Nov 2004 11:46:46 -0800 Anil Gunturu <[email protected]> wrote:

But its not clear on how the rtnetlink_links array is populated for PF_NETLINK family. rtnetlink_init seem to populate for PF_PACKET and PF_UNSPEC.

This is done via net/ipv4/devinet.c:devinet_init() which sets rtnetlink_links[] for PF_INET. Please run grep on the kernel tree for references to rtnetlink_links[] to see how other protocol family array entries are initialized.

#3 lore raw
Quoted 9 lines · John W. Linville
Quoted 5 lines · Anil Gunturu

Hi,
I am trying to undestand the NETLINK_ROUTE protocol sockets on 2.4.18 kernel. Specifically, I am interested in knowing how the kernel

Quoted 6 lines

Neil Horman <[email protected]> has been working on a paper that may be of use to you...

John

you can fetch the latest version of that paper from my people page:
http://people.redhat.com/nhorman

I've been working on it a little more and may have an update for it soon.

Thanks for the reference john!
Neil

Signature · 8 lines
/***************************************************
*Neil Horman
*Software Engineer
*Red Hat, Inc.
*[email protected]
*gpg keyid: 1024D / 0x92A74FA1
*http://pgp.mit.edu
***************************************************/
#4 lore raw
In reply to Anil Gunturu
Quoted 3 lines · Anil Gunturu

kernel. But its not clear on how the rtnetlink_links array is populated for PF_NETLINK family. rtnetlink_init seem to populate for

rtnetlink_links[PF_NETLINK] doesn't make sense. We don't have a routing system for NETLINK itself, yet.

Cheers,

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt