Home
last modified time | relevance | path

Searched refs:nlh (Results 26 – 50 of 205) sorted by relevance

123456789

/openbmc/linux/net/core/
H A Dsock_diag.c20 static int (*inet_rcv_compat)(struct sk_buff *skb, struct nlmsghdr *nlh);
217 static int __sock_diag_cmd(struct sk_buff *skb, struct nlmsghdr *nlh) in __sock_diag_cmd() argument
220 struct sock_diag_req *req = nlmsg_data(nlh); in __sock_diag_cmd()
223 if (nlmsg_len(nlh) < sizeof(*req)) in __sock_diag_cmd()
237 else if (nlh->nlmsg_type == SOCK_DIAG_BY_FAMILY) in __sock_diag_cmd()
238 err = hndl->dump(skb, nlh); in __sock_diag_cmd()
239 else if (nlh->nlmsg_type == SOCK_DESTROY && hndl->destroy) in __sock_diag_cmd()
240 err = hndl->destroy(skb, nlh); in __sock_diag_cmd()
253 switch (nlh->nlmsg_type) { in sock_diag_rcv_msg()
261 ret = inet_rcv_compat(skb, nlh); in sock_diag_rcv_msg()
[all …]
H A Drtnetlink.c1785 struct nlmsghdr *nlh; in rtnl_fill_ifinfo() local
1790 if (nlh == NULL) in rtnl_fill_ifinfo()
1919 nlmsg_end(skb, nlh); in rtnl_fill_ifinfo()
2171 const struct nlmsghdr *nlh = cb->nlh; in rtnl_dump_ifinfo() local
4104 if (!nlh) in nlmsg_populate_fdb_fill()
4122 nlmsg_end(skb, nlh); in nlmsg_populate_fdb_fill()
4881 if (nlh == NULL) in ndo_dflt_bridge_getlink()
4959 nlmsg_end(skb, nlh); in ndo_dflt_bridge_getlink()
5023 const struct nlmsghdr *nlh = cb->nlh; in rtnl_bridge_getlink() local
5578 if (!nlh) in rtnl_fill_statsinfo()
[all …]
H A Dfib_rules.c524 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl2rule()
808 if ((nlh->nlmsg_flags & NLM_F_EXCL) && in fib_nl_newrule()
1012 struct nlmsghdr *nlh; in fib_nl_fill_rule() local
1016 if (nlh == NULL) in fib_nl_fill_rule()
1019 frh = nlmsg_data(nlh); in fib_nl_fill_rule()
1081 nlmsg_end(skb, nlh); in fib_nl_fill_rule()
1085 nlmsg_cancel(skb, nlh); in fib_nl_fill_rule()
1126 frh = nlmsg_data(nlh); in fib_valid_dumprule_req()
1134 if (nlmsg_attrlen(nlh, sizeof(*frh))) { in fib_valid_dumprule_req()
1144 const struct nlmsghdr *nlh = cb->nlh; in fib_nl_dumprule() local
[all …]
/openbmc/linux/samples/connector/
H A Ducon.c48 struct nlmsghdr *nlh; in netlink_send() local
56 nlh = (struct nlmsghdr *)buf; in netlink_send()
57 nlh->nlmsg_seq = seq++; in netlink_send()
58 nlh->nlmsg_pid = getpid(); in netlink_send()
59 nlh->nlmsg_type = NLMSG_DONE; in netlink_send()
60 nlh->nlmsg_len = size; in netlink_send()
61 nlh->nlmsg_flags = 0; in netlink_send()
63 m = NLMSG_DATA(nlh); in netlink_send()
70 err = send(s, nlh, size, 0); in netlink_send()
/openbmc/linux/tools/lib/bpf/
H A Dnlattr.c81 static inline int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len() argument
83 return nlh->nlmsg_len - NLMSG_HDRLEN; in nlmsg_len()
158 int libbpf_nla_dump_errormsg(struct nlmsghdr *nlh) in libbpf_nla_dump_errormsg() argument
170 if (!(nlh->nlmsg_flags & NLM_F_ACK_TLVS)) in libbpf_nla_dump_errormsg()
173 err = (struct nlmsgerr *)NLMSG_DATA(nlh); in libbpf_nla_dump_errormsg()
177 if (!(nlh->nlmsg_flags & NLM_F_CAPPED)) in libbpf_nla_dump_errormsg()
181 alen = (void *)nlh + nlh->nlmsg_len - (void *)attr; in libbpf_nla_dump_errormsg()
/openbmc/linux/drivers/connector/
H A Dconnector.c69 struct nlmsghdr *nlh; in cn_netlink_send_mult() local
102 nlh = nlmsg_put(skb, 0, msg->seq, NLMSG_DONE, size, 0); in cn_netlink_send_mult()
103 if (!nlh) { in cn_netlink_send_mult()
108 data = nlmsg_data(nlh); in cn_netlink_send_mult()
137 struct nlmsghdr *nlh; in cn_call_callback() local
145 nlh = nlmsg_hdr(skb); in cn_call_callback()
146 if (nlh->nlmsg_len < NLMSG_HDRLEN + sizeof(struct cn_msg) + msg->len) in cn_call_callback()
201 struct nlmsghdr *nlh; in cn_rx_skb() local
205 nlh = nlmsg_hdr(skb); in cn_rx_skb()
206 len = nlmsg_len(nlh); in cn_rx_skb()
[all …]
/openbmc/linux/net/mctp/
H A Dneigh.c128 rc = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, nd_mctp_policy, in mctp_rtm_newneigh()
154 ndm = nlmsg_data(nlh); in mctp_rtm_newneigh()
197 ndm = nlmsg_data(nlh); in mctp_rtm_delneigh()
213 struct nlmsghdr *nlh; in mctp_fill_neigh() local
216 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*hdr), flags); in mctp_fill_neigh()
217 if (!nlh) in mctp_fill_neigh()
220 hdr = nlmsg_data(nlh); in mctp_fill_neigh()
235 nlmsg_end(skb, nlh); in mctp_fill_neigh()
239 nlmsg_cancel(skb, nlh); in mctp_fill_neigh()
253 ndmsg = nlmsg_data(cb->nlh); in mctp_rtm_getneigh()
[all …]
H A Ddevice.c66 struct nlmsghdr *nlh; in mctp_fill_addrinfo() local
68 nlh = nlmsg_put(skb, portid, seq, in mctp_fill_addrinfo()
70 if (!nlh) in mctp_fill_addrinfo()
73 hdr = nlmsg_data(nlh); in mctp_fill_addrinfo()
86 nlmsg_end(skb, nlh); in mctp_fill_addrinfo()
91 nlmsg_cancel(skb, nlh); in mctp_fill_addrinfo()
103 seq = cb->nlh->nlmsg_seq; in mctp_dump_dev_addrinfo()
125 hdr = nlmsg_data(cb->nlh); in mctp_dump_addrinfo()
208 ifm = nlmsg_data(nlh); in mctp_rtm_newaddr()
247 mctp_addr_notify(mdev, addr->s_addr, RTM_NEWADDR, skb, nlh); in mctp_rtm_newaddr()
[all …]
/openbmc/linux/tools/net/ynl/generated/
H A Dhandshake-user.c156 int handshake_accept_rsp_parse(const struct nlmsghdr *nlh, void *data) in handshake_accept_rsp_parse() argument
174 mnl_attr_for_each(attr, nlh, sizeof(struct genlmsghdr)) { in handshake_accept_rsp_parse()
220 mnl_attr_for_each(attr, nlh, sizeof(struct genlmsghdr)) { in handshake_accept_rsp_parse()
233 mnl_attr_for_each(attr, nlh, sizeof(struct genlmsghdr)) { in handshake_accept_rsp_parse()
249 struct nlmsghdr *nlh; in handshake_accept() local
264 err = ynl_exec(ys, nlh, &yrs); in handshake_accept()
298 struct nlmsghdr *nlh; in handshake_done() local
301 nlh = ynl_gemsg_start_req(ys, ys->family_id, HANDSHAKE_CMD_DONE, 1); in handshake_done()
305 mnl_attr_put_u32(nlh, HANDSHAKE_A_DONE_STATUS, req->status); in handshake_done()
307 mnl_attr_put_u32(nlh, HANDSHAKE_A_DONE_SOCKFD, req->sockfd); in handshake_done()
[all …]
H A Dnetdev-user.c74 int netdev_dev_get_rsp_parse(const struct nlmsghdr *nlh, void *data) in netdev_dev_get_rsp_parse() argument
82 mnl_attr_for_each(attr, nlh, sizeof(struct genlmsghdr)) { in netdev_dev_get_rsp_parse()
111 struct nlmsghdr *nlh; in netdev_dev_get() local
114 nlh = ynl_gemsg_start_req(ys, ys->family_id, NETDEV_CMD_DEV_GET, 1); in netdev_dev_get()
119 mnl_attr_put_u32(nlh, NETDEV_A_DEV_IFINDEX, req->ifindex); in netdev_dev_get()
126 err = ynl_exec(ys, nlh, &yrs); in netdev_dev_get()
153 struct nlmsghdr *nlh; in netdev_dev_get_dump() local
162 nlh = ynl_gemsg_start_dump(ys, ys->family_id, NETDEV_CMD_DEV_GET, 1); in netdev_dev_get_dump()
164 err = ynl_exec_dump(ys, nlh, &yds); in netdev_dev_get_dump()
/openbmc/linux/net/netlink/
H A Ddiag.c48 struct nlmsghdr *nlh; in sk_diag_fill() local
52 nlh = nlmsg_put(skb, portid, seq, SOCK_DIAG_BY_FAMILY, sizeof(*rep), in sk_diag_fill()
54 if (!nlh) in sk_diag_fill()
57 rep = nlmsg_data(nlh); in sk_diag_fill()
81 nlmsg_end(skb, nlh); in sk_diag_fill()
85 nlmsg_cancel(skb, nlh); in sk_diag_fill()
102 req = nlmsg_data(cb->nlh); in __netlink_diag_dump()
139 cb->nlh->nlmsg_seq, in __netlink_diag_dump()
169 cb->nlh->nlmsg_seq, in __netlink_diag_dump()
191 req = nlmsg_data(cb->nlh); in netlink_diag_dump()
/openbmc/linux/net/tipc/
H A Ddiag.c53 struct tipc_sock_diag_req *req = nlmsg_data(cb->nlh); in __tipc_add_sock_diag()
54 struct nlmsghdr *nlh; in __tipc_add_sock_diag() local
57 nlh = nlmsg_put_answer(skb, cb, SOCK_DIAG_BY_FAMILY, 0, in __tipc_add_sock_diag()
59 if (!nlh) in __tipc_add_sock_diag()
67 nlmsg_end(skb, nlh); in __tipc_add_sock_diag()
/openbmc/linux/net/netfilter/
H A Dnfnetlink_cttimeout.c187 struct nlmsghdr *nlh; in ctnl_timeout_fill_info() local
196 if (!nlh) in ctnl_timeout_fill_info()
217 nlmsg_end(skb, nlh); in ctnl_timeout_fill_info()
222 nlmsg_cancel(skb, nlh); in ctnl_timeout_fill_info()
250 cb->nlh->nlmsg_seq, in ctnl_timeout_dump()
296 info->nlh->nlmsg_seq, in cttimeout_get_timeout()
399 struct nlmsghdr *nlh; in cttimeout_default_fill_info() local
407 if (!nlh) in cttimeout_default_fill_info()
424 nlmsg_end(skb, nlh); in cttimeout_default_fill_info()
429 nlmsg_cancel(skb, nlh); in cttimeout_default_fill_info()
[all …]
H A Dnfnetlink_hook.c39 const struct nlmsghdr *nlh, in nf_netlink_dump_start_rcu() argument
48 err = netlink_dump_start(nlsk, skb, nlh, c); in nf_netlink_dump_start_rcu()
163 struct nlmsghdr *nlh; in nfnl_hook_dump_one() local
170 nlh = nfnl_msg_put(nlskb, portid, seq, event, in nfnl_hook_dump_one()
172 if (!nlh) in nfnl_hook_dump_one()
233 nlmsg_end(nlskb, nlh); in nfnl_hook_dump_one()
236 nlmsg_trim(nlskb, nlh); in nfnl_hook_dump_one()
305 struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh); in nfnl_hook_dump()
331 cb->nlh->nlmsg_seq); in nfnl_hook_dump()
345 const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh); in nfnl_hook_dump_start()
[all …]
H A Dnf_conntrack_netlink.c577 struct nlmsghdr *nlh; in ctnetlink_fill_info() local
586 if (!nlh) in ctnetlink_fill_info()
620 nlmsg_end(skb, nlh); in ctnetlink_fill_info()
730 struct nlmsghdr *nlh; in ctnetlink_conntrack_event() local
762 if (!nlh) in ctnetlink_conntrack_event()
843 nlmsg_end(skb, nlh); in ctnetlink_conntrack_event()
2496 if (!nlh) in ctnetlink_ct_stat_cpu_fill_info()
2576 if (!nlh) in ctnetlink_stat_ct_fill_info()
3079 if (!nlh) in ctnetlink_exp_fill_info()
3125 if (!nlh) in ctnetlink_expect_event()
[all …]
H A Dnfnetlink_acct.c79 if (info->nlh->nlmsg_flags & NLM_F_EXCL) in nfnl_acct_new()
87 if (info->nlh->nlmsg_flags & NLM_F_REPLACE) { in nfnl_acct_new()
145 struct nlmsghdr *nlh; in nfnl_acct_fill_info() local
153 if (!nlh) in nfnl_acct_fill_info()
184 nlmsg_end(skb, nlh); in nfnl_acct_fill_info()
189 nlmsg_cancel(skb, nlh); in nfnl_acct_fill_info()
221 cb->nlh->nlmsg_seq, in nfnl_acct_dump()
222 NFNL_MSG_TYPE(cb->nlh->nlmsg_type), in nfnl_acct_dump()
282 if (info->nlh->nlmsg_flags & NLM_F_DUMP) { in nfnl_acct_get()
310 info->nlh->nlmsg_seq, in nfnl_acct_get()
[all …]
/openbmc/linux/net/sctp/
H A Ddiag.c130 struct nlmsghdr *nlh; in inet_sctp_diag_fill() local
137 if (!nlh) in inet_sctp_diag_fill()
140 r = nlmsg_data(nlh); in inet_sctp_diag_fill()
209 nlmsg_end(skb, nlh); in inet_sctp_diag_fill()
213 nlmsg_cancel(skb, nlh); in inet_sctp_diag_fill()
222 const struct nlmsghdr *nlh; member
314 cb->nlh->nlmsg_seq, in sctp_sock_dump()
315 NLM_F_MULTI, cb->nlh, in sctp_sock_dump()
325 cb->nlh->nlmsg_seq, 0, cb->nlh, in sctp_sock_dump()
425 const struct nlmsghdr *nlh = cb->nlh; in sctp_diag_dump_one() local
[all …]
/openbmc/linux/net/vmw_vsock/
H A Ddiag.c19 struct nlmsghdr *nlh; in sk_diag_fill() local
21 nlh = nlmsg_put(skb, portid, seq, SOCK_DIAG_BY_FAMILY, sizeof(*rep), in sk_diag_fill()
23 if (!nlh) in sk_diag_fill()
26 rep = nlmsg_data(nlh); in sk_diag_fill()
58 req = nlmsg_data(cb->nlh); in vsock_diag_dump()
87 cb->nlh->nlmsg_seq, in vsock_diag_dump()
121 cb->nlh->nlmsg_seq, in vsock_diag_dump()
/openbmc/linux/tools/testing/selftests/netfilter/
H A Daudit_logread.c21 struct nlmsghdr nlh; member
42 rep->nlh.nlmsg_type == NLMSG_ERROR) /* short-cut for now */ in audit_recv()
52 .nlh = { in audit_send()
70 ret = sendto(fd, &msg, msg.nlh.nlmsg_len, 0, in audit_send()
74 if (ret != (int)msg.nlh.nlmsg_len) in audit_send()
104 if (rep.nlh.nlmsg_type != AUDIT_NETFILTER_CFG) in readlog()
/openbmc/linux/net/mpls/
H A Daf_mpls.c543 struct nlmsghdr *nlh = info ? info->nlh : NULL; in mpls_notify_route() local
1143 if (!nlh) in mpls_netconf_fill_devconf()
1160 nlmsg_end(skb, nlh); in mpls_netconf_fill_devconf()
1304 const struct nlmsghdr *nlh = cb->nlh; in mpls_netconf_dump_devconf() local
1873 cfg->rc_nlinfo.nlh = nlh; in rtm_to_route_config()
1997 if (nlh == NULL) in mpls_dump_route()
2091 nlmsg_end(skb, nlh); in mpls_dump_route()
2179 const struct nlmsghdr *nlh = cb->nlh; in mpls_dump_routes() local
2278 u32 seq = nlh ? nlh->nlmsg_seq : 0; in rtmsg_lfib()
2476 if (!nlh) { in mpls_getroute()
[all …]
/openbmc/linux/net/xdp/
H A Dxsk_diag.c99 struct nlmsghdr *nlh; in xsk_diag_fill() local
101 nlh = nlmsg_put(nlskb, portid, seq, SOCK_DIAG_BY_FAMILY, sizeof(*msg), in xsk_diag_fill()
103 if (!nlh) in xsk_diag_fill()
106 msg = nlmsg_data(nlh); in xsk_diag_fill()
142 nlmsg_end(nlskb, nlh); in xsk_diag_fill()
147 nlmsg_cancel(nlskb, nlh); in xsk_diag_fill()
153 struct xdp_diag_req *req = nlmsg_data(cb->nlh); in xsk_diag_dump()
169 cb->nlh->nlmsg_seq, NLM_F_MULTI, in xsk_diag_dump()
/openbmc/linux/net/ipv4/
H A Ddevinet.c665 ifm = nlmsg_data(nlh); in inet_rtm_deladdr()
843 ifm = nlmsg_data(nlh); in rtm_to_ifaddr()
1678 struct nlmsghdr *nlh; in inet_fill_ifaddr() local
1683 if (!nlh) in inet_fill_ifaddr()
1686 ifm = nlmsg_data(nlh); in inet_fill_ifaddr()
1735 nlmsg_end(skb, nlh); in inet_fill_ifaddr()
1845 const struct nlmsghdr *nlh = cb->nlh; in inet_dump_ifaddr() local
1931 .seq = nlh ? nlh->nlmsg_seq : 0, in rtmsg_ifa()
2081 if (!nlh) in inet_netconf_fill_devconf()
2122 nlmsg_end(skb, nlh); in inet_netconf_fill_devconf()
[all …]
/openbmc/linux/net/smc/
H A Dsmc_stats.c267 void *nlh; in smc_nl_get_stats() local
273 nlh = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in smc_nl_get_stats()
276 if (!nlh) in smc_nl_get_stats()
306 genlmsg_end(skb, nlh); in smc_nl_get_stats()
316 genlmsg_cancel(skb, nlh); in smc_nl_get_stats()
331 void *nlh; in smc_nl_get_fback_details() local
339 nlh = genlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in smc_nl_get_fback_details()
342 if (!nlh) in smc_nl_get_fback_details()
370 genlmsg_end(skb, nlh); in smc_nl_get_fback_details()
376 genlmsg_cancel(skb, nlh); in smc_nl_get_fback_details()
/openbmc/linux/crypto/
H A Dcrypto_user_stat.c111 struct nlmsghdr *nlh; in crypto_reportstat_alg() local
115 nlh = nlmsg_put(skb, NETLINK_CB(in_skb).portid, info->nlmsg_seq, in crypto_reportstat_alg()
117 if (!nlh) { in crypto_reportstat_alg()
122 ualg = nlmsg_data(nlh); in crypto_reportstat_alg()
126 nlmsg_cancel(skb, nlh); in crypto_reportstat_alg()
130 nlmsg_end(skb, nlh); in crypto_reportstat_alg()
/openbmc/linux/net/unix/
H A Ddiag.c128 struct nlmsghdr *nlh; in sk_diag_fill() local
131 nlh = nlmsg_put(skb, portid, seq, SOCK_DIAG_BY_FAMILY, sizeof(*rep), in sk_diag_fill()
133 if (!nlh) in sk_diag_fill()
136 rep = nlmsg_data(nlh); in sk_diag_fill()
175 nlmsg_end(skb, nlh); in sk_diag_fill()
179 nlmsg_cancel(skb, nlh); in sk_diag_fill()
205 req = nlmsg_data(cb->nlh); in unix_diag_dump()
222 cb->nlh->nlmsg_seq, in unix_diag_dump()
259 const struct nlmsghdr *nlh, in unix_diag_get_exact() argument
290 nlh->nlmsg_seq, 0, req->udiag_ino); in unix_diag_get_exact()

123456789