Commit 08ce4645 authored by Peter V. Saveliev's avatar Peter V. Saveliev

netlink: initial nsidmsg support

parent b8e71884
......@@ -95,11 +95,24 @@ RTM_GETANYCAST = 62
RTM_NEWNEIGHTBL = 64
RTM_GETNEIGHTBL = 66
RTM_SETNEIGHTBL = 67
# custom message types
RTM_GETBRIDGE = 88
RTM_SETBRIDGE = 89
RTM_GETBOND = 90
RTM_SETBOND = 91
RTM_NEWNDUSEROPT = 68
RTM_NEWADDRLABEL = 72
RTM_DELADDRLABEL = 73
RTM_GETADDRLABEL = 74
RTM_GETDCB = 78
RTM_SETDCB = 79
RTM_NEWNETCONF = 80
RTM_DELNETCONF = 81
RTM_GETNETCONF = 82
RTM_NEWMDB = 84
RTM_DELMDB = 85
RTM_GETMDB = 86
RTM_NEWNSID = 88
RTM_DELNSID = 89
RTM_GETNSID = 90
RTM_NEWSTATS = 92
RTM_GETSTATS = 94
RTM_NEWCACHEREPORT = 96
(RTM_NAMES, RTM_VALUES) = map_namespace('RTM', globals())
TC_H_INGRESS = 0xfffffff1
......
......@@ -4,6 +4,7 @@ from pyroute2.netlink.rtnl.tcmsg import tcmsg
from pyroute2.netlink.rtnl.rtmsg import rtmsg
from pyroute2.netlink.rtnl.ndmsg import ndmsg
from pyroute2.netlink.rtnl.ndtmsg import ndtmsg
from pyroute2.netlink.rtnl.nsidmsg import nsidmsg
from pyroute2.netlink.rtnl.fibmsg import fibmsg
from pyroute2.netlink.rtnl.ifinfmsg import ifinfmsg
from pyroute2.netlink.rtnl.ifaddrmsg import ifaddrmsg
......@@ -37,7 +38,10 @@ class MarshalRtnl(Marshal):
rtnl.RTM_GETTFILTER: tcmsg,
rtnl.RTM_NEWNEIGHTBL: ndtmsg,
rtnl.RTM_GETNEIGHTBL: ndtmsg,
rtnl.RTM_SETNEIGHTBL: ndtmsg}
rtnl.RTM_SETNEIGHTBL: ndtmsg,
rtnl.RTM_NEWNSID: nsidmsg,
rtnl.RTM_DELNSID: nsidmsg,
rtnl.RTM_GETNSID: nsidmsg}
def fix_message(self, msg):
# FIXME: pls do something with it
......
from pyroute2.netlink.rtnl.rtgenmsg import rtgenmsg
class nsidmsg(rtgenmsg):
nla_map = (('NETNSA_NONE', 'none'),
('NETNSA_NSID', 'uint32'),
('NETNSA_PID', 'uint32'),
('NETNSA_FD', 'uint32'))
from pyroute2.netlink import nlmsg
class rtgenmsg(nlmsg):
fields = (('rtgen_family', 'B'), )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment