Netnetlinkafnetlinkc

static int netlink_insert(struct sock *sk, struct net *net, u32 pid);

static _inline_ struct sock *netlink_lookup(struct net *net, int protocol, u32 pid);

Note that the hashing data structures are not designed to operate on a per-namespace basis since there is only one global structure for the whole system. Nevertheless, the code is networking-namespace-aware: When a sock is looked up, the code ensures that the result lives in the proper namespace. Connections with identical port IDs that originate from different namespaces can exist on the same hash chain simultaneously without problems.

Protocol-Specific Operations

Since userland applications use the standard socket interface to deal with netlink connections, the kernel must provide a set of protocol operations. They are defined as follows:

Continue reading here: Netnetlinkafnetlinkc

Was this article helpful?

0 0