[mpls-linux-devel] MPLS Linux Netlink Support
Status: Beta
Brought to you by:
jleu
From: Ramon C. <cas...@in...> - 2004-02-04 19:48:13
|
James, all, I have just added basic support for netlink in p4. The 'link' is up :) and more or less working (Thanks to DaveM for suggesting the use of AF_MPLS and not a whole family. Although conceptually, mpls tables *are not* routing tables, I was duplicating functionnality and code from rtlink) There are basically three things to do: * Multiplexing: do we just have one .doit and one .dumpit and we multiplex using the packet header or we set up several virtual links using a full table? * Define the protocol between kernel/userspace, paquet format, etc. (which could be the existing mpls_foo_bar_req) * Implement the .doit and .dumpit functions (which could just call the existing ones). In preference, we should work the "doit" functions. The dumpit have less priority, since we already have ro sysfs/procfs. Some tests. MPLSNETLINK mplsnl.h:272:open: Socket descriptor 3 MPLSNETLINK mplsnl.h:273:open: Local Addr 0 (len 12) MPLSNETLINK mplsnl.h:308:tx_msg: Size nlmsg_len 144 MPLSNETLINK mplsnl.h:373:tx_msg:Reponse Type 16 (Error is 2) dmesg: MPLS DEBUG net/core/rtnetlink.c:352:rtnetlink_rcv_msg: Type: 16 MPLS DEBUG net/core/rtnetlink.c:368:rtnetlink_rcv_msg: Message Len: 144 MPLS DEBUG net/core/rtnetlink.c:370:rtnetlink_rcv_msg: Family: 30/32 MPLS DEBUG net/core/rtnetlink.c:381:rtnetlink_rcv_msg: Link: c0422280 MPLS DEBUG net/core/rtnetlink.c:385:rtnetlink_rcv_msg: Kind: 0 MPLS DEBUG net/core/rtnetlink.c:423:rtnetlink_rcv_msg: min_len: 32 MPLS DEBUG net/core/rtnetlink.c:431:rtnetlink_rcv_msg: attrlen: 112 MPLS DEBUG net/mpls/mpls_netlink.c:92:mpls_nl_doit: enter MPLS DEBUG net/mpls/mpls_netlink.c:68:mpls_say_hello: enter MPLS DEBUG net/mpls/mpls_netlink.c:81:mpls_say_hello: 20<7>MPLS DEBUG net/mpls/mpls_netlink.c:83:mpls_say_hello: exit MPLS DEBUG net/mpls/mpls_netlink.c:94:mpls_nl_doit: Done MPLS DEBUG net/mpls/mpls_netlink.c:95:mpls_nl_doit: exit I wont be able to hack for some days, so this is why I prefer to submit as is.... Regards, Ramon // ------------------------------------------------------------------- // Ramon Casellas - GET/ENST/INFRES/RHD/A508 - cas...@in... |