Skip to contentSkip to conversation

Accessing TC objects via netlink interface

LARTC [email protected] 4 participants 4 messages Dec 11, 2003

lore
Share & tools
lore
#1 lore raw

raj:

This is one of the most sparsely documented parts of linux. The only places I know of are:

man 3 netlink
man 7 netlink
man 3 rtnetlink
man 7 rtnetlink
the kernel source
in man netlink, you find a reference to ftp://ftp.inr.ac.ru/ip‐routing/iproute2* for libnetlink

The code is clearly designed to be as efficient as possible, and much of the protocol involves context, which makes it quite difficult to figure out. OTOH, you can do things with linux/netlink which would require kernel mods with any other operating system, so I'm just glad it's there.

Quoted 9 lines · On Thu, 2003-12-11 at 07:23, [email protected] wrote:

Hi,

While going through the README of Michal's SNMP extension, he collects stats using netlink interface. Is their any howto or other docs to learn how it works?

raj

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

Signature · 3 lines
    Lawrence MacIntyre     865.574.8696     [email protected]
               Oak Ridge National Laboratory
High Performance Information Infrastructure Technology Group
#2 lore raw
In reply to [email protected]
Quoted 9 lines · [email protected] wrote:

Hi,

While going through the README of Michal's SNMP extension, he collects stats using netlink interface. Is their any howto or other docs to learn how it works?

raj

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

The most useful places I can think of are:

- kernel: include/linux/rtnetlink.h, include/linux/pkt_sched.h
- kernel: net/core/sched_api.c, net/core/rtnetlink.c
- iproute2 source, look especially at rtnl_wilddump_request, rtnl_dump_filter and rtnl_talk
- netlink man pages
- Jamal Hadi's netlink over IP RFC draft

Best regards,
Patrick

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#3 lore raw
In reply to [email protected]

When I started programming, I had same question. Where is the documentation...

man pages are poor - incomplete

try:

http://qos.ittc.ku.edu/netlink/html/

That paper talks about rtnetlink messages in order to modify routing table, but creating of qdiscs, filters and classes is similar. Ale my knowledge is from reading tc utility source :-(

Michal Charvat
Prokon R.B.S. Louny v.o.s.

Quoted 26 lines · Lawrence MacIntyre

raj:

This is one of the most sparsely documented parts of linux. The only places I know of are:

man 3 netlink
man 7 netlink
man 3 rtnetlink
man 7 rtnetlink
the kernel source
in man netlink, you find a reference to ftp://ftp.inr.ac.ru/ip�routing/iproute2* for libnetlink

The code is clearly designed to be as efficient as possible, and much of the protocol involves context, which makes it quite difficult to figure out. OTOH, you can do things with linux/netlink which would require kernel mods with any other operating system, so I'm just glad it's there.

Quoted 6 lines · On Thu, 2003-12-11 at 07:23, [email protected] wrote:

Hi,

While going through the README of Michal's SNMP extension, he collects stats using netlink interface. Is their any howto or other docs to learn how it works?

raj

Quoted 9 lines
Quoted 3 lines

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

--
Lawrence MacIntyre 865.574.8696 [email protected]
Oak Ridge National Laboratory
High Performance Information Infrastructure Technology Group

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/