Home
last modified time | relevance | path

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

12345

/net/netfilter/
Dnfnetlink.c216 static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, in nfnetlink_rcv_msg() argument
225 if (nlmsg_len(nlh) < sizeof(struct nfgenmsg)) in nfnetlink_rcv_msg()
228 type = nlh->nlmsg_type; in nfnetlink_rcv_msg()
256 u8 cb_id = NFNL_MSG_TYPE(nlh->nlmsg_type); in nfnetlink_rcv_msg()
258 struct nlattr *attr = (void *)nlh + min_len; in nfnetlink_rcv_msg()
259 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_msg()
264 .nlh = nlh, in nfnetlink_rcv_msg()
265 .nfmsg = nlmsg_data(nlh), in nfnetlink_rcv_msg()
318 struct nlmsghdr *nlh; member
323 static int nfnl_err_add(struct list_head *list, struct nlmsghdr *nlh, int err, in nfnl_err_add() argument
[all …]
Dnfnetlink_cttimeout.c124 if (info->nlh->nlmsg_flags & NLM_F_EXCL) in cttimeout_new_timeout()
132 if (info->nlh->nlmsg_flags & NLM_F_REPLACE) { in cttimeout_new_timeout()
187 struct nlmsghdr *nlh; in ctnl_timeout_fill_info() local
194 nlh = nfnl_msg_put(skb, portid, seq, event, flags, AF_UNSPEC, in ctnl_timeout_fill_info()
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()
251 NFNL_MSG_TYPE(cb->nlh->nlmsg_type), in ctnl_timeout_dump()
272 if (info->nlh->nlmsg_flags & NLM_F_DUMP) { in cttimeout_get_timeout()
[all …]
Dnf_conntrack_netlink.c577 struct nlmsghdr *nlh; in ctnetlink_fill_info() local
584 nlh = nfnl_msg_put(skb, portid, seq, event, flags, nf_ct_l3num(ct), in ctnetlink_fill_info()
586 if (!nlh) in ctnetlink_fill_info()
620 nlmsg_end(skb, nlh); in ctnetlink_fill_info()
625 nlmsg_cancel(skb, nlh); in ctnetlink_fill_info()
730 struct nlmsghdr *nlh; in ctnetlink_conntrack_event() local
760 nlh = nfnl_msg_put(skb, item->portid, 0, type, flags, nf_ct_l3num(ct), in ctnetlink_conntrack_event()
762 if (!nlh) in ctnetlink_conntrack_event()
843 nlmsg_end(skb, nlh); in ctnetlink_conntrack_event()
852 nlmsg_cancel(skb, nlh); in ctnetlink_conntrack_event()
[all …]
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 …]
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
151 nlh = nfnl_msg_put(skb, portid, seq, event, flags, AF_UNSPEC, in nfnl_acct_fill_info()
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()
[all …]
/net/phonet/
Dpn_netlink.c51 static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh, in addr_doit() argument
69 err = nlmsg_parse_deprecated(nlh, sizeof(*ifm), tb, IFA_MAX, in addr_doit()
74 ifm = nlmsg_data(nlh); in addr_doit()
86 if (nlh->nlmsg_type == RTM_NEWADDR) in addr_doit()
91 phonet_address_notify(nlh->nlmsg_type, dev, pnaddr); in addr_doit()
99 struct nlmsghdr *nlh; in fill_addr() local
101 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*ifm), 0); in fill_addr()
102 if (nlh == NULL) in fill_addr()
105 ifm = nlmsg_data(nlh); in fill_addr()
113 nlmsg_end(skb, nlh); in fill_addr()
[all …]
/net/xfrm/
Dxfrm_user.c782 static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_sa() argument
786 struct xfrm_usersa_info *p = nlmsg_data(nlh); in xfrm_add_sa()
800 if (nlh->nlmsg_type == XFRM_MSG_NEWSA) in xfrm_add_sa()
817 c.seq = nlh->nlmsg_seq; in xfrm_add_sa()
818 c.portid = nlh->nlmsg_pid; in xfrm_add_sa()
819 c.event = nlh->nlmsg_type; in xfrm_add_sa()
861 static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_del_sa() argument
868 struct xfrm_usersa_id *p = nlmsg_data(nlh); in xfrm_del_sa()
887 c.seq = nlh->nlmsg_seq; in xfrm_del_sa()
888 c.portid = nlh->nlmsg_pid; in xfrm_del_sa()
[all …]
/net/ipv6/
Daddrlabel.c384 static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh, in ip6addrlbl_newdel() argument
394 err = nlmsg_parse_deprecated(nlh, sizeof(*ifal), tb, IFAL_MAX, in ip6addrlbl_newdel()
399 ifal = nlmsg_data(nlh); in ip6addrlbl_newdel()
415 switch (nlh->nlmsg_type) { in ip6addrlbl_newdel()
423 nlh->nlmsg_flags & NLM_F_REPLACE); in ip6addrlbl_newdel()
435 static void ip6addrlbl_putmsg(struct nlmsghdr *nlh, in ip6addrlbl_putmsg() argument
438 struct ifaddrlblmsg *ifal = nlmsg_data(nlh); in ip6addrlbl_putmsg()
453 struct nlmsghdr *nlh = nlmsg_put(skb, portid, seq, event, in ip6addrlbl_fill() local
455 if (!nlh) in ip6addrlbl_fill()
458 ip6addrlbl_putmsg(nlh, p->prefixlen, p->ifindex, lseq); in ip6addrlbl_fill()
[all …]
/net/ipv4/
Dinet_diag.c206 static int inet_diag_parse_attrs(const struct nlmsghdr *nlh, int hdrlen, in inet_diag_parse_attrs() argument
212 nlmsg_for_each_attr(nla, nlh, hdrlen, remaining) { in inet_diag_parse_attrs()
244 struct nlmsghdr *nlh; in inet_sk_diag_fill() local
252 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in inet_sk_diag_fill()
253 cb->nlh->nlmsg_type, sizeof(*r), nlmsg_flags); in inet_sk_diag_fill()
254 if (!nlh) in inet_sk_diag_fill()
257 r = nlmsg_data(nlh); in inet_sk_diag_fill()
367 bool first_nlmsg = ((unsigned char *)nlh == skb->data); in inet_sk_diag_fill()
373 msg_len = skb_tail_pointer(skb) - (unsigned char *)nlh; in inet_sk_diag_fill()
405 nlmsg_end(skb, nlh); in inet_sk_diag_fill()
[all …]
Ddevinet.c354 int destroy, struct nlmsghdr *nlh, u32 portid) in __inet_del_ifa() argument
393 rtmsg_ifa(RTM_DELADDR, ifa, nlh, portid); in __inet_del_ifa()
431 rtmsg_ifa(RTM_DELADDR, ifa1, nlh, portid); in __inet_del_ifa()
449 rtmsg_ifa(RTM_NEWADDR, promote, nlh, portid); in __inet_del_ifa()
476 static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh, in __inet_insert_ifa() argument
555 rtmsg_ifa(RTM_NEWADDR, ifa, nlh, portid); in __inet_insert_ifa()
647 static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, in inet_rtm_deladdr() argument
660 err = nlmsg_parse_deprecated(nlh, sizeof(*ifm), tb, IFA_MAX, in inet_rtm_deladdr()
665 ifm = nlmsg_data(nlh); in inet_rtm_deladdr()
689 __inet_del_ifa(in_dev, ifap, 1, nlh, NETLINK_CB(skb).portid); in inet_rtm_deladdr()
[all …]
/net/core/
Drtnetlink.c767 const struct nlmsghdr *nlh, gfp_t flags) in rtnl_notify() argument
771 nlmsg_notify(rtnl, skb, pid, group, nlmsg_report(nlh), flags); in rtnl_notify()
1785 struct nlmsghdr *nlh; in rtnl_fill_ifinfo() local
1789 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ifm), flags); in rtnl_fill_ifinfo()
1790 if (nlh == NULL) in rtnl_fill_ifinfo()
1793 ifm = nlmsg_data(nlh); in rtnl_fill_ifinfo()
1919 nlmsg_end(skb, nlh); in rtnl_fill_ifinfo()
1925 nlmsg_cancel(skb, nlh); in rtnl_fill_ifinfo()
2124 static int rtnl_valid_dump_ifinfo_req(const struct nlmsghdr *nlh, in rtnl_valid_dump_ifinfo_req() argument
2133 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ifm))) { in rtnl_valid_dump_ifinfo_req()
[all …]
Dsock_diag.c20 static int (*inet_rcv_compat)(struct sk_buff *skb, struct nlmsghdr *nlh);
169 void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)) in sock_diag_register_inet_compat() argument
177 void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)) in sock_diag_unregister_inet_compat() argument
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()
[all …]
Dfib_rules.c101 struct fib_rules_ops *ops, struct nlmsghdr *nlh,
516 static int fib_nl2rule(struct sk_buff *skb, struct nlmsghdr *nlh, in fib_nl2rule() argument
524 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl2rule()
774 int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, in fib_nl_newrule() argument
778 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl_newrule()
785 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*frh))) { in fib_nl_newrule()
797 err = nlmsg_parse_deprecated(nlh, sizeof(*frh), tb, FRA_MAX, in fib_nl_newrule()
804 err = fib_nl2rule(skb, nlh, extack, ops, tb, &rule, &user_priority); in fib_nl_newrule()
808 if ((nlh->nlmsg_flags & NLM_F_EXCL) && in fib_nl_newrule()
869 notify_rule_change(RTM_NEWRULE, rule, ops, nlh, NETLINK_CB(skb).portid); in fib_nl_newrule()
[all …]
/net/mctp/
Dneigh.c115 static int mctp_rtm_newneigh(struct sk_buff *skb, struct nlmsghdr *nlh, in mctp_rtm_newneigh() argument
128 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()
173 static int mctp_rtm_delneigh(struct sk_buff *skb, struct nlmsghdr *nlh, in mctp_rtm_delneigh() argument
184 rc = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, nd_mctp_policy, in mctp_rtm_delneigh()
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()
[all …]
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()
190 static int mctp_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, in mctp_rtm_newaddr() argument
203 rc = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_mctp_policy, in mctp_rtm_newaddr()
[all …]
/net/mpls/
Daf_mpls.c75 struct nlmsghdr *nlh, struct net *net, u32 portid,
543 struct nlmsghdr *nlh = info ? info->nlh : NULL; in mpls_notify_route() local
550 rtmsg_lfib(event, index, rt, nlh, net, portid, nlm_flags); in mpls_notify_route()
1137 struct nlmsghdr *nlh; in mpls_netconf_fill_devconf() local
1141 nlh = nlmsg_put(skb, portid, seq, event, sizeof(struct netconfmsg), in mpls_netconf_fill_devconf()
1143 if (!nlh) in mpls_netconf_fill_devconf()
1149 ncm = nlmsg_data(nlh); in mpls_netconf_fill_devconf()
1160 nlmsg_end(skb, nlh); in mpls_netconf_fill_devconf()
1164 nlmsg_cancel(skb, nlh); in mpls_netconf_fill_devconf()
1213 const struct nlmsghdr *nlh, in mpls_netconf_valid_get_req() argument
[all …]
/net/sctp/
Ddiag.c130 struct nlmsghdr *nlh; in inet_sctp_diag_fill() local
135 nlh = nlmsg_put(skb, portid, seq, unlh->nlmsg_type, sizeof(*r), in inet_sctp_diag_fill()
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
270 NETLINK_CB(skb).portid, commp->nlh->nlmsg_seq, 0, in sctp_sock_dump_one()
271 commp->nlh, commp->net_admin); in sctp_sock_dump_one()
314 cb->nlh->nlmsg_seq, in sctp_sock_dump()
[all …]
/net/netlink/
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()
Dgenetlink.c752 struct nlmsghdr *nlh; in genlmsg_put() local
755 nlh = nlmsg_put(skb, portid, seq, family->id, GENL_HDRLEN + in genlmsg_put()
757 if (nlh == NULL) in genlmsg_put()
760 hdr = nlmsg_data(nlh); in genlmsg_put()
781 struct nlmsghdr *nlh, in genl_family_rcv_msg_attrs_parse() argument
801 err = __nlmsg_parse(nlh, hdrlen, attrbuf, ops->maxattr, ops->policy, in genl_family_rcv_msg_attrs_parse()
817 struct nlmsghdr *nlh; member
833 ctx->nlh->nlmsg_len < nlmsg_msg_size(ctx->hdrlen)) in genl_start()
836 attrs = genl_family_rcv_msg_attrs_parse(ctx->family, ctx->nlh, ctx->extack, in genl_start()
849 info->info.snd_seq = cb->nlh->nlmsg_seq; in genl_start()
[all …]
/net/vmw_vsock/
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()
/net/smc/
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()
/net/tipc/
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()
/net/dcb/
Ddcbnl.c221 struct nlmsghdr *nlh; in dcbnl_newmsg() local
227 nlh = nlmsg_put(skb, port, seq, type, sizeof(*dcb), flags); in dcbnl_newmsg()
228 BUG_ON(!nlh); in dcbnl_newmsg()
230 dcb = nlmsg_data(nlh); in dcbnl_newmsg()
236 *nlhp = nlh; in dcbnl_newmsg()
241 static int dcbnl_getstate(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getstate() argument
252 static int dcbnl_getpfccfg(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getpfccfg() argument
297 static int dcbnl_getperm_hwaddr(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getperm_hwaddr() argument
311 static int dcbnl_getcap(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getcap() argument
356 static int dcbnl_getnumtcs(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getnumtcs() argument
[all …]
/net/xdp/
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()
/net/unix/
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()

12345