/linux-6.1.9/security/selinux/ |
D | nlmsgtab.c | 24 u16 nlmsg_type; member 154 static int nlmsg_perm(u16 nlmsg_type, u32 *perm, const struct nlmsg_perm *tab, size_t tabsize) in nlmsg_perm() argument 159 if (nlmsg_type == tab[i].nlmsg_type) { in nlmsg_perm() 168 int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm) in selinux_nlmsg_lookup() argument 180 err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms, in selinux_nlmsg_lookup() 185 err = nlmsg_perm(nlmsg_type, perm, nlmsg_tcpdiag_perms, in selinux_nlmsg_lookup() 195 err = nlmsg_perm(nlmsg_type, perm, nlmsg_xfrm_perms, in selinux_nlmsg_lookup() 200 if ((nlmsg_type >= AUDIT_FIRST_USER_MSG && in selinux_nlmsg_lookup() 201 nlmsg_type <= AUDIT_LAST_USER_MSG) || in selinux_nlmsg_lookup() 202 (nlmsg_type >= AUDIT_FIRST_USER_MSG2 && in selinux_nlmsg_lookup() [all …]
|
/linux-6.1.9/net/xfrm/ |
D | xfrm_compat.c | 145 nlh_src->nlmsg_type, payload, nlh_src->nlmsg_flags); in xfrm_nlmsg_put_compat() 151 switch (nlh_src->nlmsg_type) { in xfrm_nlmsg_put_compat() 220 pr_warn_once("unsupported nlmsg_type %d\n", nlh_src->nlmsg_type); in xfrm_nlmsg_put_compat() 290 u16 type = nlh_src->nlmsg_type - XFRM_MSG_BASE; in xfrm_xlate64() 324 u16 type = nlh_src->nlmsg_type - XFRM_MSG_BASE; in xfrm_alloc_compat() 329 pr_warn_once("unsupported nlmsg_type %d\n", nlh_src->nlmsg_type); in xfrm_alloc_compat() 359 switch (src->nlmsg_type) { in xfrm_user_rcv_calculate_len64() 474 switch (src->nlmsg_type) { in xfrm_xlate32() 547 WARN_ON_ONCE(src->nlmsg_type != XFRM_MSG_NEWSPDINFO); in xfrm_xlate32() 586 u16 type = h32->nlmsg_type - XFRM_MSG_BASE; in xfrm_user_rcv_msg_compat() [all …]
|
/linux-6.1.9/tools/testing/selftests/net/ |
D | ipsec.c | 295 } else if (answer.hdr.nlmsg_type != NLMSG_ERROR) { in netlink_check_answer() 296 printk("expected NLMSG_ERROR, got %d", (int)answer.hdr.nlmsg_type); in netlink_check_answer() 321 req.nh.nlmsg_type = RTM_NEWLINK; in veth_add() 369 req.nh.nlmsg_type = RTM_NEWADDR; in ip4_addr_set() 409 req.nh.nlmsg_type = RTM_NEWLINK; in link_set_up() 437 req.nh.nlmsg_type = RTM_NEWROUTE; in ip4_route_set() 926 req.nh.nlmsg_type = XFRM_MSG_NEWSA; in xfrm_state_add() 1025 req.nh.nlmsg_type = XFRM_MSG_GETSA; in xfrm_state_check() 1050 if (answer.nh.nlmsg_type == NLMSG_ERROR) { in xfrm_state_check() 1054 } else if (answer.nh.nlmsg_type == NLMSG_DONE) { in xfrm_state_check() [all …]
|
/linux-6.1.9/tools/accounting/ |
D | procacct.c | 125 static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid, in send_cmd() argument 137 msg.n.nlmsg_type = nlmsg_type; in send_cmd() 189 if (ans.n.nlmsg_type == NLMSG_ERROR || in get_family_id() 364 if (msg.n.nlmsg_type == NLMSG_ERROR || in main()
|
D | getdelays.c | 118 static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid, in send_cmd() argument 130 msg.n.nlmsg_type = nlmsg_type; in send_cmd() 182 if (ans.n.nlmsg_type == NLMSG_ERROR || in get_family_id() 470 if (msg.n.nlmsg_type == NLMSG_ERROR || in main()
|
/linux-6.1.9/samples/bpf/ |
D | xdp_router_ipv4_user.c | 75 if (nh->nlmsg_type == NLMSG_DONE) in recv_msg() 175 if (nh->nlmsg_type == RTM_DELROUTE) { in read_route() 205 if (nh->nlmsg_type == RTM_DELROUTE) { in read_route() 282 req.nl.nlmsg_type = RTM_GETROUTE; in get_route_table() 359 if (nh->nlmsg_type == RTM_DELNEIGH) { in read_arp() 362 } else if (nh->nlmsg_type == RTM_NEWNEIGH) { in read_arp() 372 if (nh->nlmsg_type == RTM_DELNEIGH) { in read_arp() 375 } else if (nh->nlmsg_type == RTM_NEWNEIGH) { in read_arp() 418 req.nl.nlmsg_type = RTM_GETNEIGH; in get_arp_table()
|
/linux-6.1.9/tools/testing/vsock/ |
D | vsock_diag_test.c | 175 .nlmsg_type = SOCK_DIAG_BY_FAMILY, in send_req() 282 if (h->nlmsg_type == NLMSG_DONE) in read_vsock_stat() 285 if (h->nlmsg_type == NLMSG_ERROR) { in read_vsock_stat() 298 if (h->nlmsg_type != SOCK_DIAG_BY_FAMILY) { in read_vsock_stat() 300 h->nlmsg_type); in read_vsock_stat()
|
/linux-6.1.9/net/phonet/ |
D | pn_netlink.c | 86 if (nlh->nlmsg_type == RTM_NEWADDR) in addr_doit() 91 phonet_address_notify(nlh->nlmsg_type, dev, pnaddr); in addr_doit() 254 if (nlh->nlmsg_type == RTM_NEWROUTE) in route_doit() 259 rtm_phonet_notify(nlh->nlmsg_type, dev, dst); in route_doit()
|
/linux-6.1.9/tools/testing/selftests/nci/ |
D | nci_dev.c | 111 static int send_cmd_mt_nla(int sd, __u16 nlmsg_type, __u32 nlmsg_pid, in send_cmd_mt_nla() argument 123 msg.n.nlmsg_type = nlmsg_type; in send_cmd_mt_nla() 196 if (ans.n.nlmsg_type == NLMSG_ERROR || resp_len < 0 || in get_family_id() 240 static int send_cmd_with_idx(int sd, __u16 nlmsg_type, __u32 nlmsg_pid, in send_cmd_with_idx() argument 247 return send_cmd_mt_nla(sd, nlmsg_type, nlmsg_pid, genl_cmd, 1, in send_cmd_with_idx() 267 if (msg->n.nlmsg_type == NLMSG_ERROR || in get_nci_devid() 664 if (ans.n.nlmsg_type == NLMSG_ERROR || resp_len < 0 || in get_taginfo()
|
/linux-6.1.9/drivers/infiniband/core/ |
D | netlink.c | 155 int type = nlh->nlmsg_type; in rdma_nl_rcv_msg() 232 (RDMA_NL_GET_CLIENT(nlh->nlmsg_type) != RDMA_NL_LS)) in rdma_nl_rcv_skb() 236 if (nlh->nlmsg_type < NLMSG_MIN_TYPE) in rdma_nl_rcv_skb()
|
D | iwpm_msg.c | 634 nl_client = RDMA_NL_GET_CLIENT(cb->nlh->nlmsg_type); in iwpm_remote_info_cb() 716 nl_client = RDMA_NL_GET_CLIENT(cb->nlh->nlmsg_type); in iwpm_mapping_info_cb() 779 int nl_client = RDMA_NL_GET_CLIENT(cb->nlh->nlmsg_type); in iwpm_mapping_error_cb() 838 nl_client = RDMA_NL_GET_CLIENT(cb->nlh->nlmsg_type); in iwpm_hello_cb()
|
/linux-6.1.9/tools/lib/bpf/ |
D | netlink.c | 178 switch (nh->nlmsg_type) { in libbpf_netlink_recv() 251 req.nh.nlmsg_type = RTM_SETLINK; in __bpf_set_link_xdp_fd_replace() 364 .nh.nlmsg_type = RTM_GETLINK, in bpf_xdp_query() 488 req.nh.nlmsg_type = cmd; in tc_qdisc_modify() 648 req.nh.nlmsg_type = RTM_NEWTFILTER; in bpf_tc_attach() 723 req.nh.nlmsg_type = RTM_DELTFILTER; in __bpf_tc_detach() 790 req.nh.nlmsg_type = RTM_GETTFILTER; in bpf_tc_query()
|
/linux-6.1.9/net/core/ |
D | sock_diag.c | 234 else if (nlh->nlmsg_type == SOCK_DIAG_BY_FAMILY) in __sock_diag_cmd() 236 else if (nlh->nlmsg_type == SOCK_DESTROY && hndl->destroy) in __sock_diag_cmd() 250 switch (nlh->nlmsg_type) { in sock_diag_rcv_msg()
|
/linux-6.1.9/tools/testing/selftests/net/af_unix/ |
D | diag_uid.c | 86 .nlmsg_type = SOCK_DIAG_BY_FAMILY, in send_request() 160 ASSERT_EQ(nlh->nlmsg_type, SOCK_DIAG_BY_FAMILY); in receive_response()
|
/linux-6.1.9/samples/connector/ |
D | ucon.c | 59 nlh->nlmsg_type = NLMSG_DONE; in netlink_send() 216 switch (reply->nlmsg_type) { in main()
|
/linux-6.1.9/tools/testing/selftests/netfilter/ |
D | nf-queue.c | 130 nlh->nlmsg_type = (NFNL_SUBSYS_QUEUE << 8) | NFQNL_MSG_CONFIG; in nfq_build_cfg_request() 154 nlh->nlmsg_type = (NFNL_SUBSYS_QUEUE << 8) | NFQNL_MSG_CONFIG; in nfq_build_cfg_params() 178 nlh->nlmsg_type = (NFNL_SUBSYS_QUEUE << 8) | NFQNL_MSG_VERDICT; in nfq_build_verdict()
|
/linux-6.1.9/tools/bpf/bpftool/ |
D | net.c | 172 switch (nh->nlmsg_type) { in netlink_recv() 221 .nlh.nlmsg_type = RTM_GETTCLASS, in netlink_get_class() 260 .nlh.nlmsg_type = RTM_GETQDISC, in netlink_get_qdisc() 299 .nlh.nlmsg_type = RTM_GETTFILTER, in netlink_get_filter() 338 .nlh.nlmsg_type = RTM_GETLINK, in netlink_get_link()
|
/linux-6.1.9/tools/testing/selftests/net/mptcp/ |
D | pm_nl_ctl.c | 57 nh->nlmsg_type = family; in init_genl_req() 133 if (nh->nlmsg_type == NLMSG_ERROR) in capture_events() 224 if (nh->nlmsg_type == NLMSG_ERROR) { in do_nl_req() 247 if (nlh->nlmsg_type != GENL_ID_CTRL) in genl_parse_getfamily() 249 nlh->nlmsg_len, nlh->nlmsg_type); in genl_parse_getfamily() 1044 if (nh->nlmsg_type == NLMSG_DONE) in print_addrs() 1046 if (nh->nlmsg_type == NLMSG_ERROR) in print_addrs() 1048 if (nh->nlmsg_type != pm_family) in print_addrs() 1151 if (nh->nlmsg_type == NLMSG_DONE) in print_limits() 1153 if (nh->nlmsg_type == NLMSG_ERROR) in print_limits() [all …]
|
/linux-6.1.9/net/netfilter/ |
D | nfnetlink.c | 227 type = nlh->nlmsg_type; in nfnetlink_rcv_msg() 255 u8 cb_id = NFNL_MSG_TYPE(nlh->nlmsg_type); in nfnetlink_rcv_msg() 457 type = nlh->nlmsg_type; in nfnetlink_rcv_batch() 495 u8 cb_id = NFNL_MSG_TYPE(nlh->nlmsg_type); in nfnetlink_rcv_batch() 656 if (nlh->nlmsg_type == NFNL_MSG_BATCH_BEGIN) in nfnetlink_rcv()
|
/linux-6.1.9/net/ipv4/ |
D | inet_diag.c | 253 cb->nlh->nlmsg_type, sizeof(*r), nlmsg_flags); in inet_sk_diag_fill() 425 cb->nlh->nlmsg_seq, cb->nlh->nlmsg_type, in inet_twsk_diag_fill() 465 cb->nlh->nlmsg_type, sizeof(*r), nlmsg_flags); in inet_req_diag_fill() 1282 req.sdiag_protocol = inet_diag_type2proto(cb->nlh->nlmsg_type); in inet_diag_dump_compat() 1297 req.sdiag_protocol = inet_diag_type2proto(nlh->nlmsg_type); in inet_diag_get_exact_compat() 1311 if (nlh->nlmsg_type >= INET_DIAG_GETSOCK_MAX || in inet_diag_rcv_msg_compat() 1335 if (h->nlmsg_type == SOCK_DIAG_BY_FAMILY && in inet_diag_handler_cmd() 1345 return inet_diag_cmd_exact(h->nlmsg_type, skb, h, hdrlen, in inet_diag_handler_cmd()
|
/linux-6.1.9/drivers/scsi/ |
D | scsi_netlink.c | 54 if (nlh->nlmsg_type != SCSI_TRANSPORT_MSG) { in scsi_nl_rcv_msg()
|
/linux-6.1.9/Documentation/userspace-api/netlink/ |
D | intro.rst | 62 if (nl_msg.nlmsg_type == NLMSG_DONE) 114 __u16 nlmsg_type; /* Generic Netlink Family (subsystem) ID */ 126 In Classic Netlink :c:member:`nlmsghdr.nlmsg_type` used to identify 176 As previously mentioned :c:member:`nlmsghdr.nlmsg_type` carries 261 __u16 nlmsg_type: GENL_ID_CTRL // (1) 291 __u16 nlmsg_type: GENL_ID_CTRL 329 __u16 nlmsg_type: NLMSG_ERROR 338 __u16 nlmsg_type: GENL_ID_CTRL 349 the :c:member:`nlmsghdr.nlmsg_type` field. 448 __u16 nlmsg_type: GENL_ID_CTRL
|
/linux-6.1.9/net/smc/ |
D | smc_diag.c | 83 cb->nlh->nlmsg_type, sizeof(*r), NLM_F_MULTI); in __smc_diag_dump() 239 if (h->nlmsg_type == SOCK_DIAG_BY_FAMILY && in smc_diag_handler_dump()
|
/linux-6.1.9/drivers/staging/gdm724x/ |
D | netlink_k.c | 61 rcv_cb(dev, nlh->nlmsg_type, msg, mlen); in netlink_rcv_cb()
|
/linux-6.1.9/tools/include/uapi/linux/ |
D | netlink.h | 46 __u16 nlmsg_type; /* Message content */ member
|