Home
last modified time | relevance | path

Searched refs:nlmsg_type (Results 1 – 25 of 63) sorted by relevance

123

/Linux-v6.6/security/selinux/
Dnlmsgtab.c24 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
160 if (nlmsg_type == tab[i].nlmsg_type) { in nlmsg_perm()
169 int selinux_nlmsg_lookup(u16 sclass, u16 nlmsg_type, u32 *perm) in selinux_nlmsg_lookup() argument
181 err = nlmsg_perm(nlmsg_type, perm, nlmsg_route_perms, in selinux_nlmsg_lookup()
186 err = nlmsg_perm(nlmsg_type, perm, nlmsg_tcpdiag_perms, in selinux_nlmsg_lookup()
196 err = nlmsg_perm(nlmsg_type, perm, nlmsg_xfrm_perms, in selinux_nlmsg_lookup()
201 if ((nlmsg_type >= AUDIT_FIRST_USER_MSG && in selinux_nlmsg_lookup()
202 nlmsg_type <= AUDIT_LAST_USER_MSG) || in selinux_nlmsg_lookup()
203 (nlmsg_type >= AUDIT_FIRST_USER_MSG2 && in selinux_nlmsg_lookup()
[all …]
/Linux-v6.6/net/xfrm/
Dxfrm_compat.c146 nlh_src->nlmsg_type, payload, nlh_src->nlmsg_flags); in xfrm_nlmsg_put_compat()
152 switch (nlh_src->nlmsg_type) { in xfrm_nlmsg_put_compat()
221 pr_warn_once("unsupported nlmsg_type %d\n", nlh_src->nlmsg_type); in xfrm_nlmsg_put_compat()
291 u16 type = nlh_src->nlmsg_type - XFRM_MSG_BASE; in xfrm_xlate64()
306 switch (nlh_src->nlmsg_type) { in xfrm_xlate64()
325 u16 type = nlh_src->nlmsg_type - XFRM_MSG_BASE; in xfrm_alloc_compat()
330 pr_warn_once("unsupported nlmsg_type %d\n", nlh_src->nlmsg_type); in xfrm_alloc_compat()
360 switch (src->nlmsg_type) { in xfrm_user_rcv_calculate_len64()
476 switch (src->nlmsg_type) { in xfrm_xlate32()
549 WARN_ON_ONCE(src->nlmsg_type != XFRM_MSG_NEWSPDINFO); in xfrm_xlate32()
[all …]
/Linux-v6.6/tools/testing/selftests/net/
Dipsec.c295 } 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-v6.6/tools/testing/selftests/netfilter/
Daudit_logread.c42 rep->nlh.nlmsg_type == NLMSG_ERROR) /* short-cut for now */ in audit_recv()
54 .nlmsg_type = type, in audit_send()
104 if (rep.nlh.nlmsg_type != AUDIT_NETFILTER_CFG) in readlog()
Dnf-queue.c130 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-v6.6/tools/accounting/
Dprocacct.c125 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()
359 if (msg.n.nlmsg_type == NLMSG_ERROR || in main()
Dgetdelays.c118 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()
476 if (msg.n.nlmsg_type == NLMSG_ERROR || in main()
/Linux-v6.6/samples/bpf/
Dxdp_router_ipv4_user.c75 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-v6.6/tools/testing/vsock/
Dvsock_diag_test.c175 .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-v6.6/net/phonet/
Dpn_netlink.c86 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-v6.6/tools/testing/selftests/nci/
Dnci_dev.c111 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-v6.6/tools/lib/bpf/
Dnetlink.c186 switch (nh->nlmsg_type) { in libbpf_netlink_recv()
271 .nh.nlmsg_type = GENL_ID_CTRL, in libbpf_netlink_resolve_genl_family_id()
296 req.nh.nlmsg_type = RTM_SETLINK; in __bpf_set_link_xdp_fd_replace()
435 .nh.nlmsg_type = RTM_GETLINK, in bpf_xdp_query()
486 req.nh.nlmsg_type = id; in bpf_xdp_query()
595 req.nh.nlmsg_type = cmd; in tc_qdisc_modify()
755 req.nh.nlmsg_type = RTM_NEWTFILTER; in bpf_tc_attach()
831 req.nh.nlmsg_type = RTM_DELTFILTER; in __bpf_tc_detach()
898 req.nh.nlmsg_type = RTM_GETTFILTER; in bpf_tc_query()
/Linux-v6.6/drivers/infiniband/core/
Dnetlink.c155 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()
Diwpm_msg.c634 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-v6.6/tools/testing/selftests/connector/
Dproc_filter.c51 hdr->nlmsg_type = NLMSG_DONE; in send_message()
140 if (hdr->nlmsg_type == NLMSG_ERROR) { in handle_packet()
143 } else if (hdr->nlmsg_type == NLMSG_DONE) { in handle_packet()
/Linux-v6.6/net/core/
Dsock_diag.c237 else if (nlh->nlmsg_type == SOCK_DIAG_BY_FAMILY) in __sock_diag_cmd()
239 else if (nlh->nlmsg_type == SOCK_DESTROY && hndl->destroy) in __sock_diag_cmd()
253 switch (nlh->nlmsg_type) { in sock_diag_rcv_msg()
/Linux-v6.6/samples/connector/
Ducon.c59 nlh->nlmsg_type = NLMSG_DONE; in netlink_send()
216 switch (reply->nlmsg_type) { in main()
/Linux-v6.6/tools/testing/selftests/net/af_unix/
Ddiag_uid.c86 .nlmsg_type = SOCK_DIAG_BY_FAMILY, in send_request()
160 ASSERT_EQ(nlh->nlmsg_type, SOCK_DIAG_BY_FAMILY); in receive_response()
/Linux-v6.6/tools/testing/selftests/net/mptcp/
Dpm_nl_ctl.c57 nh->nlmsg_type = family; in init_genl_req()
139 if (nh->nlmsg_type == NLMSG_ERROR) in capture_events()
234 if (nh->nlmsg_type == NLMSG_DONE) in do_nl_req()
237 if (nh->nlmsg_type == NLMSG_ERROR && nl_error(nh)) in do_nl_req()
258 if (nlh->nlmsg_type != GENL_ID_CTRL) in genl_parse_getfamily()
260 nlh->nlmsg_len, nlh->nlmsg_type); in genl_parse_getfamily()
1055 if (nh->nlmsg_type == NLMSG_DONE) in print_addrs()
1057 if (nh->nlmsg_type == NLMSG_ERROR) in print_addrs()
1059 if (nh->nlmsg_type != pm_family) in print_addrs()
1162 if (nh->nlmsg_type == NLMSG_DONE) in print_limits()
[all …]
/Linux-v6.6/net/netfilter/
Dnfnetlink.c228 type = nlh->nlmsg_type; in nfnetlink_rcv_msg()
256 u8 cb_id = NFNL_MSG_TYPE(nlh->nlmsg_type); in nfnetlink_rcv_msg()
458 type = nlh->nlmsg_type; in nfnetlink_rcv_batch()
496 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-v6.6/net/ipv4/
Dinet_diag.c253 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-v6.6/tools/bpf/bpftool/
Dnet.c179 switch (nh->nlmsg_type) { in netlink_recv()
228 .nlh.nlmsg_type = RTM_GETTCLASS, in netlink_get_class()
267 .nlh.nlmsg_type = RTM_GETQDISC, in netlink_get_qdisc()
306 .nlh.nlmsg_type = RTM_GETTFILTER, in netlink_get_filter()
345 .nlh.nlmsg_type = RTM_GETLINK, in netlink_get_link()
/Linux-v6.6/Documentation/userspace-api/netlink/
Dintro.rst62 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-v6.6/drivers/scsi/
Dscsi_netlink.c54 if (nlh->nlmsg_type != SCSI_TRANSPORT_MSG) { in scsi_nl_rcv_msg()
/Linux-v6.6/net/smc/
Dsmc_diag.c83 cb->nlh->nlmsg_type, sizeof(*r), NLM_F_MULTI); in __smc_diag_dump()
240 if (h->nlmsg_type == SOCK_DIAG_BY_FAMILY && in smc_diag_handler_dump()

123