I'm trying to do a IPRoute().nlm_request(req, RTM_GETNSID)
. I'm lost as to how to correctly build the request message and send it, even after reading several source code files (and documentation) of pyroute2
for some hours. What I think I understood is this:
req=nsidmsg() req['family']=socket.AF_UNSPEC req['attrs'] = [('NETNSA_FD', netnsf.fileno())]
res=IPRoute().nlm_request(req, RTM_GETNSID)
...but is this correct at all? The problem is that I always get a dump of all NETNSA_NSID in form of RTM_NEWNSID events. I would expect a reply of exactly one NETNSA_NSID, the one corresponding with the NETNSA_FD, where the fd is the one from /proc/12345/ns/net.
What am I doing wrong here?
--
You received this message because you are subscribed to the Google Groups "pyroute2-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyroute2-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--