Home
last modified time | relevance | path

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

/drivers/staging/gdm724x/
Dnetlink_k.c30 #define ND_NLMSG_DATA(nlh) ((void *)((char *)NLMSG_DATA(nlh) + \ argument
33 #define ND_NLMSG_R_LEN(nlh) (nlh->nlmsg_len - ND_IFINDEX_LEN) argument
34 #define ND_NLMSG_IFIDX(nlh) NLMSG_DATA(nlh) argument
41 struct nlmsghdr *nlh; in netlink_rcv_cb() local
57 nlh = (struct nlmsghdr *)skb->data; in netlink_rcv_cb()
59 if (skb->len < nlh->nlmsg_len || nlh->nlmsg_len > ND_MAX_MSG_LEN) { in netlink_rcv_cb()
61 skb->len, nlh->nlmsg_len); in netlink_rcv_cb()
65 memcpy(&ifindex, ND_NLMSG_IFIDX(nlh), ND_IFINDEX_LEN); in netlink_rcv_cb()
66 msg = ND_NLMSG_DATA(nlh); in netlink_rcv_cb()
67 mlen = ND_NLMSG_R_LEN(nlh); in netlink_rcv_cb()
[all …]
/drivers/infiniband/core/
Dnetlink.c140 void *ibnl_put_msg(struct sk_buff *skb, struct nlmsghdr **nlh, int seq, in ibnl_put_msg() argument
143 *nlh = nlmsg_put(skb, 0, seq, RDMA_NL_GET_TYPE(client, op), len, flags); in ibnl_put_msg()
144 if (!*nlh) in ibnl_put_msg()
146 return nlmsg_data(*nlh); in ibnl_put_msg()
150 int ibnl_put_attr(struct sk_buff *skb, struct nlmsghdr *nlh, in ibnl_put_attr() argument
154 nlmsg_cancel(skb, nlh); in ibnl_put_attr()
161 static int rdma_nl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, in rdma_nl_rcv_msg() argument
164 int type = nlh->nlmsg_type; in rdma_nl_rcv_msg()
184 return cb_table[op].doit(skb, nlh, extack); in rdma_nl_rcv_msg()
188 if ((nlh->nlmsg_flags & NLM_F_DUMP) || index == RDMA_NL_RDMA_CM || in rdma_nl_rcv_msg()
[all …]
Diwpm_msg.c60 struct nlmsghdr *nlh; in iwpm_register_pid() local
72 skb = iwpm_create_nlmsg(RDMA_NL_IWPM_REG_PID, &nlh, nl_client); in iwpm_register_pid()
77 nlh->nlmsg_seq = iwpm_get_nlmsg_seq(); in iwpm_register_pid()
78 nlmsg_request = iwpm_get_nlmsg_request(nlh->nlmsg_seq, nl_client, GFP_KERNEL); in iwpm_register_pid()
87 ret = ibnl_put_attr(skb, nlh, sizeof(u32), &msg_seq, IWPM_NLA_REG_PID_SEQ); in iwpm_register_pid()
90 ret = ibnl_put_attr(skb, nlh, IFNAMSIZ, in iwpm_register_pid()
94 ret = ibnl_put_attr(skb, nlh, IWPM_DEVNAME_SIZE, in iwpm_register_pid()
98 ret = ibnl_put_attr(skb, nlh, IWPM_ULIBNAME_SIZE, in iwpm_register_pid()
103 nlmsg_end(skb, nlh); in iwpm_register_pid()
138 struct nlmsghdr *nlh; in iwpm_add_mapping() local
[all …]
Dnldev.c129 static int nldev_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, in nldev_get_doit() argument
138 err = nlmsg_parse(nlh, 0, tb, RDMA_NLDEV_ATTR_MAX - 1, in nldev_get_doit()
155 nlh = nlmsg_put(msg, NETLINK_CB(skb).portid, nlh->nlmsg_seq, in nldev_get_doit()
163 nlmsg_end(msg, nlh); in nldev_get_doit()
181 struct nlmsghdr *nlh; in _nldev_get_dumpit() local
186 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in _nldev_get_dumpit()
191 nlmsg_cancel(skb, nlh); in _nldev_get_dumpit()
195 nlmsg_end(skb, nlh); in _nldev_get_dumpit()
212 static int nldev_port_get_doit(struct sk_buff *skb, struct nlmsghdr *nlh, in nldev_port_get_doit() argument
222 err = nlmsg_parse(nlh, 0, tb, RDMA_NLDEV_ATTR_MAX - 1, in nldev_port_get_doit()
[all …]
Diwpm_util.c439 struct sk_buff *iwpm_create_nlmsg(u32 nl_op, struct nlmsghdr **nlh, in iwpm_create_nlmsg() argument
449 if (!(ibnl_put_msg(skb, nlh, 0, 0, nl_client, nl_op, in iwpm_create_nlmsg()
467 ret = nlmsg_validate(cb->nlh, nlh_len, policy_max - 1, nlmsg_policy, in iwpm_parse_nlmsg()
473 ret = nlmsg_parse(cb->nlh, nlh_len, nltb, policy_max - 1, in iwpm_parse_nlmsg()
583 struct nlmsghdr *nlh; in send_mapinfo_num() local
588 skb = iwpm_create_nlmsg(RDMA_NL_IWPM_MAPINFO_NUM, &nlh, nl_client); in send_mapinfo_num()
593 nlh->nlmsg_seq = iwpm_get_nlmsg_seq(); in send_mapinfo_num()
596 ret = ibnl_put_attr(skb, nlh, sizeof(u32), &msg_seq, IWPM_NLA_MAPINFO_SEQ); in send_mapinfo_num()
599 ret = ibnl_put_attr(skb, nlh, sizeof(u32), in send_mapinfo_num()
604 nlmsg_end(skb, nlh); in send_mapinfo_num()
[all …]
Daddr.c83 static inline bool ib_nl_is_good_ip_resp(const struct nlmsghdr *nlh) in ib_nl_is_good_ip_resp() argument
88 if (nlh->nlmsg_flags & RDMA_NL_LS_F_ERR) in ib_nl_is_good_ip_resp()
91 ret = nla_parse(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh), in ib_nl_is_good_ip_resp()
92 nlmsg_len(nlh), ib_nl_addr_policy, NULL); in ib_nl_is_good_ip_resp()
99 static void ib_nl_process_good_ip_rsep(const struct nlmsghdr *nlh) in ib_nl_process_good_ip_rsep() argument
107 head = (const struct nlattr *)nlmsg_data(nlh); in ib_nl_process_good_ip_rsep()
108 len = nlmsg_len(nlh); in ib_nl_process_good_ip_rsep()
117 if (nlh->nlmsg_seq != req->seq) in ib_nl_process_good_ip_rsep()
133 struct nlmsghdr *nlh, in ib_nl_handle_ip_res_resp() argument
136 if ((nlh->nlmsg_flags & NLM_F_REQUEST) || in ib_nl_handle_ip_res_resp()
[all …]
Dsa_query.c836 struct nlmsghdr *nlh; in ib_nl_send_msg() local
852 data = ibnl_put_msg(skb, &nlh, query->seq, 0, RDMA_NL_LS, in ib_nl_send_msg()
863 nlmsg_end(skb, nlh); in ib_nl_send_msg()
934 const struct nlmsghdr *nlh) in ib_nl_process_good_resolve_rsp() argument
945 head = (const struct nlattr *) nlmsg_data(nlh); in ib_nl_process_good_resolve_rsp()
946 len = nlmsg_len(nlh); in ib_nl_process_good_resolve_rsp()
1025 struct nlmsghdr *nlh, in ib_nl_handle_set_timeout() argument
1036 if (!(nlh->nlmsg_flags & NLM_F_REQUEST) || in ib_nl_handle_set_timeout()
1040 ret = nla_parse(tb, LS_NLA_TYPE_MAX - 1, nlmsg_data(nlh), in ib_nl_handle_set_timeout()
1041 nlmsg_len(nlh), ib_nl_policy, NULL); in ib_nl_handle_set_timeout()
[all …]
Dcore_priv.h202 struct nlmsghdr *nlh,
205 struct nlmsghdr *nlh,
208 struct nlmsghdr *nlh,
Diwpm_util.h246 struct sk_buff *iwpm_create_nlmsg(u32 nl_op, struct nlmsghdr **nlh,
Dcma.c4436 struct nlmsghdr *nlh; in cma_get_id_stats() local
4462 id_stats = ibnl_put_msg(skb, &nlh, cb->nlh->nlmsg_seq, in cma_get_id_stats()
4476 if (ibnl_put_attr(skb, nlh, in cma_get_id_stats()
4481 if (ibnl_put_attr(skb, nlh, in cma_get_id_stats()
4494 nlmsg_end(skb, nlh); in cma_get_id_stats()
/drivers/scsi/
Dscsi_netlink.c48 struct nlmsghdr *nlh; in scsi_nl_rcv_msg() local
56 nlh = nlmsg_hdr(skb); in scsi_nl_rcv_msg()
57 if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) || in scsi_nl_rcv_msg()
58 (skb->len < nlh->nlmsg_len)) { in scsi_nl_rcv_msg()
64 rlen = NLMSG_ALIGN(nlh->nlmsg_len); in scsi_nl_rcv_msg()
68 if (nlh->nlmsg_type != SCSI_TRANSPORT_MSG) { in scsi_nl_rcv_msg()
73 hdr = nlmsg_data(nlh); in scsi_nl_rcv_msg()
85 if (nlh->nlmsg_len < (sizeof(*nlh) + hdr->msglen)) { in scsi_nl_rcv_msg()
113 if ((err) || (nlh->nlmsg_flags & NLM_F_ACK)) in scsi_nl_rcv_msg()
114 netlink_ack(skb, nlh, err, NULL); in scsi_nl_rcv_msg()
Dscsi_transport_iscsi.c2338 struct nlmsghdr *nlh; in iscsi_recv_pdu() local
2358 nlh = __nlmsg_put(skb, 0, 0, 0, (len - sizeof(*nlh)), 0); in iscsi_recv_pdu()
2359 ev = nlmsg_data(nlh); in iscsi_recv_pdu()
2377 struct nlmsghdr *nlh; in iscsi_offload_mesg() local
2388 nlh = __nlmsg_put(skb, 0, 0, 0, (len - sizeof(*nlh)), 0); in iscsi_offload_mesg()
2389 ev = nlmsg_data(nlh); in iscsi_offload_mesg()
2410 struct nlmsghdr *nlh; in iscsi_conn_error_event() local
2427 nlh = __nlmsg_put(skb, 0, 0, 0, (len - sizeof(*nlh)), 0); in iscsi_conn_error_event()
2428 ev = nlmsg_data(nlh); in iscsi_conn_error_event()
2445 struct nlmsghdr *nlh; in iscsi_conn_login_event() local
[all …]
Dscsi_transport_fc.c540 struct nlmsghdr *nlh; in fc_host_post_event() local
559 nlh = nlmsg_put(skb, 0, 0, SCSI_TRANSPORT_MSG, len, 0); in fc_host_post_event()
560 if (!nlh) { in fc_host_post_event()
564 event = nlmsg_data(nlh); in fc_host_post_event()
609 struct nlmsghdr *nlh; in fc_host_post_vendor_event() local
627 nlh = nlmsg_put(skb, 0, 0, SCSI_TRANSPORT_MSG, len, 0); in fc_host_post_vendor_event()
628 if (!nlh) { in fc_host_post_vendor_event()
632 event = nlmsg_data(nlh); in fc_host_post_vendor_event()
/drivers/connector/
Dconnector.c79 struct nlmsghdr *nlh; in cn_netlink_send_mult() local
112 nlh = nlmsg_put(skb, 0, msg->seq, NLMSG_DONE, size, 0); in cn_netlink_send_mult()
113 if (!nlh) { in cn_netlink_send_mult()
118 data = nlmsg_data(nlh); in cn_netlink_send_mult()
145 struct nlmsghdr *nlh; in cn_call_callback() local
153 nlh = nlmsg_hdr(skb); in cn_call_callback()
154 if (nlh->nlmsg_len < NLMSG_HDRLEN + sizeof(struct cn_msg) + msg->len) in cn_call_callback()
184 struct nlmsghdr *nlh; in cn_rx_skb() local
188 nlh = nlmsg_hdr(skb); in cn_rx_skb()
189 len = nlmsg_len(nlh); in cn_rx_skb()
[all …]
/drivers/net/
Dvrf.c1159 struct nlmsghdr *nlh; in vrf_fib_rule() local
1170 nlh = nlmsg_put(skb, 0, 0, 0, sizeof(*frh), 0); in vrf_fib_rule()
1171 if (!nlh) in vrf_fib_rule()
1175 nlh->nlmsg_flags |= NLM_F_EXCL; in vrf_fib_rule()
1177 frh = nlmsg_data(nlh); in vrf_fib_rule()
1188 nlmsg_end(skb, nlh); in vrf_fib_rule()
1193 err = fib_nl_newrule(skb, nlh, NULL); in vrf_fib_rule()
1197 err = fib_nl_delrule(skb, nlh, NULL); in vrf_fib_rule()
Dvxlan.c279 struct nlmsghdr *nlh; in vxlan_fdb_info() local
283 nlh = nlmsg_put(skb, portid, seq, type, sizeof(*ndm), flags); in vxlan_fdb_info()
284 if (nlh == NULL) in vxlan_fdb_info()
287 ndm = nlmsg_data(nlh); in vxlan_fdb_info()
336 nlmsg_end(skb, nlh); in vxlan_fdb_info()
340 nlmsg_cancel(skb, nlh); in vxlan_fdb_info()
986 cb->nlh->nlmsg_seq, in vxlan_fdb_dump()
Dgtp.c1281 cb->nlh->nlmsg_seq, in gtp_genl_dump_pdp()
1282 cb->nlh->nlmsg_type, pctx)) { in gtp_genl_dump_pdp()
Dmacsec.c2410 hdr = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in dump_secy()
/drivers/block/drbd/
Ddrbd_nl.c3258 static struct nlattr *find_cfg_context_attr(const struct nlmsghdr *nlh, int attr) in find_cfg_context_attr() argument
3264 nla = nla_find(nlmsg_attrdata(nlh, hdrlen), nlmsg_attrlen(nlh, hdrlen), in find_cfg_context_attr()
3301 cb->nlh->nlmsg_seq, &drbd_genl_family, in drbd_adm_dump_resources()
3403 resource_filter = find_cfg_context_attr(cb->nlh, T_ctx_resource_name); in drbd_adm_dump_devices()
3430 cb->nlh->nlmsg_seq, &drbd_genl_family, in drbd_adm_dump_devices()
3492 resource_filter = find_cfg_context_attr(cb->nlh, T_ctx_resource_name); in drbd_adm_dump_connections()
3556 cb->nlh->nlmsg_seq, &drbd_genl_family, in drbd_adm_dump_connections()
3653 resource_filter = find_cfg_context_attr(cb->nlh, T_ctx_resource_name); in drbd_adm_dump_peer_devices()
3698 cb->nlh->nlmsg_seq, &drbd_genl_family, in drbd_adm_dump_peer_devices()
3960 cb->nlh->nlmsg_seq, &drbd_genl_family, in get_one_status()
[all …]
/drivers/net/team/
Dteam.c2385 struct nlmsghdr *nlh; in team_nl_send_options_get() local
2436 nlh = nlmsg_put(skb, portid, seq, NLMSG_DONE, 0, flags | NLM_F_MULTI); in team_nl_send_options_get()
2437 if (!nlh) { in team_nl_send_options_get()
2663 struct nlmsghdr *nlh; in team_nl_send_port_list_get() local
2724 nlh = nlmsg_put(skb, portid, seq, NLMSG_DONE, 0, flags | NLM_F_MULTI); in team_nl_send_port_list_get()
2725 if (!nlh) { in team_nl_send_port_list_get()
/drivers/net/wireless/
Dmac80211_hwsim.c3433 cb->nlh->nlmsg_seq, cb, in hwsim_dump_radio_nl()
3628 struct nlmsghdr *nlh; in hwsim_virtio_handle_cmd() local
3634 nlh = nlmsg_hdr(skb); in hwsim_virtio_handle_cmd()
3635 gnlh = nlmsg_data(nlh); in hwsim_virtio_handle_cmd()
3636 err = genlmsg_parse(nlh, &hwsim_genl_family, tb, HWSIM_ATTR_MAX, in hwsim_virtio_handle_cmd()
/drivers/net/ethernet/emulex/benet/
Dbe_main.c4857 static int be_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, in be_ndo_bridge_setlink() argument
4869 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC); in be_ndo_bridge_setlink()
/drivers/net/ethernet/broadcom/bnxt/
Dbnxt.c7669 static int bnxt_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh, in bnxt_bridge_setlink() argument
7679 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC); in bnxt_bridge_setlink()
/drivers/net/ethernet/intel/ixgbe/
Dixgbe_main.c9655 struct nlmsghdr *nlh, u16 flags) in ixgbe_ndo_bridge_setlink() argument
9664 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC); in ixgbe_ndo_bridge_setlink()
/drivers/net/ethernet/intel/i40e/
Di40e_main.c9399 struct nlmsghdr *nlh, in i40e_ndo_bridge_setlink() argument
9419 br_spec = nlmsg_find_attr(nlh, sizeof(struct ifinfomsg), IFLA_AF_SPEC); in i40e_ndo_bridge_setlink()