• Jiri Pirko's avatar
    genetlink: introduce per-sock family private storage · a7311324
    Jiri Pirko authored
    Introduce an xarray for Generic netlink family to store per-socket
    private. Initialize this xarray only if family uses per-socket privs.
    
    Introduce genl_sk_priv_get() to get the socket priv pointer for a family
    and initialize it in case it does not exist.
    Introduce __genl_sk_priv_get() to obtain socket priv pointer for a
    family under RCU read lock.
    
    Allow family to specify the priv size, init() and destroy() callbacks.
    Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    a7311324
genetlink.h 18.7 KB