Hello!

> What about the dilemma of when there are no netlink sockets
> involved? ;-> 
> i.e what is the semantics when there is no netlink socket to map them
> to, such as in the case of ioctl?

0, which is legal address of kernel socket.

In this case it means that "kernel" did the operation.
Moreover, it is legal (not good, but legal) to use 0 even when it was
an explicit responce to a netlink request. Kernel did the work, eventually.


> a) if user-app using netlink modifies something, the event will report
> the nl_pid mapped to its pid or other non-zero value depending on
> the number of netlink sockets mapped to that process/user-app

It is pid of netlink socket requesting the operation.
If this pid is negative, it will be negative number.

The idea was that someone who heard the message, could ask the author
for an additional information via netlink. It is not used, of course,
but however only real netlink addresses should be used, otherwise
you could decide that the change was made by an innocent party,
which bound to this number by some reason.


> b) if the same user-app used ioctl instead the reported nl_pid is 0
> in the event

Exactly.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to