Lines Matching refs:nladdr
472 struct sockaddr_nl *nladdr=(struct sockaddr_nl *)addr; in netlink_bind() local
474 if (nladdr->nl_family != AF_NETLINK) in netlink_bind()
478 if (nladdr->nl_groups && !netlink_capable(sock, NL_NONROOT_RECV)) in netlink_bind()
482 if (nladdr->nl_pid != sk->protinfo.af_netlink->pid) in netlink_bind()
485 err = nladdr->nl_pid ? in netlink_bind()
486 netlink_insert(sk, nladdr->nl_pid) : in netlink_bind()
492 if (!nladdr->nl_groups && !nlk->groups) in netlink_bind()
497 if (nlk->groups && !nladdr->nl_groups) { in netlink_bind()
504 } else if (!nlk->groups && nladdr->nl_groups) { in netlink_bind()
508 nlk->groups = nladdr->nl_groups; in netlink_bind()
519 struct sockaddr_nl *nladdr=(struct sockaddr_nl*)addr; in netlink_connect() local
530 if (nladdr->nl_groups && !netlink_capable(sock, NL_NONROOT_SEND)) in netlink_connect()
537 sk->protinfo.af_netlink->dst_pid = nladdr->nl_pid; in netlink_connect()
538 sk->protinfo.af_netlink->dst_groups = nladdr->nl_groups; in netlink_connect()
547 struct sockaddr_nl *nladdr=(struct sockaddr_nl *)addr; in netlink_getname() local
549 nladdr->nl_family = AF_NETLINK; in netlink_getname()
550 nladdr->nl_pad = 0; in netlink_getname()
551 *addr_len = sizeof(*nladdr); in netlink_getname()
554 nladdr->nl_pid = sk->protinfo.af_netlink->dst_pid; in netlink_getname()
555 nladdr->nl_groups = sk->protinfo.af_netlink->dst_groups; in netlink_getname()
557 nladdr->nl_pid = sk->protinfo.af_netlink->pid; in netlink_getname()
558 nladdr->nl_groups = sk->protinfo.af_netlink->groups; in netlink_getname()