diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-06-04 11:15:44 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2014-06-04 11:15:44 +0200 |
commit | b0e03239c7e3ecc08c51daedfff3a9be04113a62 (patch) | |
tree | 537d1c57bd9ae949ba0e783ced677b82cc33da59 /proto_nlmsg.c | |
parent | edca6174b09d14c75a7bbc25af122a37ff16ecea (diff) |
netsniff-ng: proto_nlmsg: Add notice about nlmsg pid field
The port id field of the netlink message header does not necessarily
indicate the PID of the receiving process [1] (e.g. in case of
multithreaded applications or using multiple sockets). Mention this in
a comment.
[1] http://www.carisma.slowglass.com/~tgr/libnl/doc/core.html#core_netlink_fundamentals
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'proto_nlmsg.c')
-rw-r--r-- | proto_nlmsg.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/proto_nlmsg.c b/proto_nlmsg.c index 0098d27..3f5ef64 100644 --- a/proto_nlmsg.c +++ b/proto_nlmsg.c @@ -22,7 +22,13 @@ static void nlmsg(struct pkt_buff *pkt) if (hdr == NULL) return; - /* Look up the process name if message is not coming from the kernel */ + /* Look up the process name if message is not coming from the kernel. + * + * Note that the port id is not necessarily equal to the PID of the + * receiving process (e.g. if the application is multithreaded or using + * multiple sockets). In these cases we're not able to find a matching + * PID and the information will not be printed. + */ if (hdr->nlmsg_pid != 0) { char path[1024]; int ret; |