<div dir="ltr">Hi,<br><div dir="ltr"><div><br></div><div>Skydive
tracks the creation of network namespaces by using inotify on the
"/var/run/netns" directory. When a new namespace has been created,
Skydive creates a Go routine (<a target="_blank" href="https://github.com/skydive-project/skydive/blob/master/topology/probes/netns.go#L182">https://github.com/skydive-<wbr>project/skydive/blob/master/<wbr>topology/probes/netns.go#L182</a>)<wbr>. This goroutine will "enter" the namespace (<a target="_blank" href="https://github.com/skydive-project/skydive/blob/master/topology/probes/netns.go#L98">https://github.com/skydive-<wbr>project/skydive/blob/master/<wbr>topology/probes/netns.go#L98</a>) and start listening for netlink messages (<a target="_blank" href="https://github.com/skydive-project/skydive/blob/master/topology/probes/netns.go#L98">https://github.com/skydive-<wbr>project/skydive/blob/master/<wbr>topology/probes/netns.go#L98</a>). Therefore, there is one netlink probe per network namespace. <br><br></div><div>Note
that a netlink probe is also started when the agent starts. This one
listens for netlink messages of the root network namespace (<a target="_blank" href="https://github.com/skydive-project/skydive/blob/master/topology/probes/probes.go#L55">https://github.com/skydive-<wbr>project/skydive/blob/master/<wbr>topology/probes/probes.go#L55</a>)<wbr>.<br><br></div><div>I hope this answers your question.<br><br></div><div>Sylvain<br></div></div><span style="white-space:pre-wrap"></span><span style="white-space:pre-wrap"></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 22, 2016 at 11:00 AM, 余明凯 <span dir="ltr"><<a href="mailto:umic@pku.edu.cn" target="_blank">umic@pku.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone:<div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>I'm a student from Peking University. I get trouble when i analyse skydive source code.</div><div> In topology/probes/netlink.go file the netlinkprobe function named start() has some syscall. Why the NetlinkSocket object s can received the msg belong to object s netns? I cannot find the operation that bind the obejct s or fd with netns. How the code determines which thread receive the msg ?</div><div><span style="white-space:pre-wrap"> </span>I'm sorry for my poor english and Linux Syscall Knowledge.</div><div><span style="white-space:pre-wrap"> </span><i>Thanks all of u.</i></div><div><span style="white-space:pre-wrap"> </span>Yours' Yu Mingkai</div><br>______________________________<wbr>_________________<br>
Skydive-dev mailing list<br>
<a href="mailto:Skydive-dev@redhat.com">Skydive-dev@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/skydive-dev" rel="noreferrer" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/skydive-dev</a><br>
<br></blockquote></div><br></div>