/net/netfilter/ |
D | nfnetlink.c | 211 static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, in nfnetlink_rcv_msg() argument 220 if (nlmsg_len(nlh) < sizeof(struct nfgenmsg)) in nfnetlink_rcv_msg() 223 type = nlh->nlmsg_type; in nfnetlink_rcv_msg() 251 u8 cb_id = NFNL_MSG_TYPE(nlh->nlmsg_type); in nfnetlink_rcv_msg() 253 struct nlattr *attr = (void *)nlh + min_len; in nfnetlink_rcv_msg() 254 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_msg() 259 .nlh = nlh, in nfnetlink_rcv_msg() 260 .nfmsg = nlmsg_data(nlh), in nfnetlink_rcv_msg() 313 struct nlmsghdr *nlh; member 318 static int nfnl_err_add(struct list_head *list, struct nlmsghdr *nlh, int err, in nfnl_err_add() argument [all …]
|
D | nfnetlink_cttimeout.c | 112 if (info->nlh->nlmsg_flags & NLM_F_EXCL) in cttimeout_new_timeout() 120 if (info->nlh->nlmsg_flags & NLM_F_REPLACE) { in cttimeout_new_timeout() 174 struct nlmsghdr *nlh; in ctnl_timeout_fill_info() local 181 nlh = nfnl_msg_put(skb, portid, seq, event, flags, AF_UNSPEC, in ctnl_timeout_fill_info() 183 if (!nlh) in ctnl_timeout_fill_info() 204 nlmsg_end(skb, nlh); in ctnl_timeout_fill_info() 209 nlmsg_cancel(skb, nlh); in ctnl_timeout_fill_info() 237 cb->nlh->nlmsg_seq, in ctnl_timeout_dump() 238 NFNL_MSG_TYPE(cb->nlh->nlmsg_type), in ctnl_timeout_dump() 259 if (info->nlh->nlmsg_flags & NLM_F_DUMP) { in cttimeout_get_timeout() [all …]
|
D | nfnetlink_hook.c | 37 const struct nlmsghdr *nlh, in nf_netlink_dump_start_rcu() argument 46 err = netlink_dump_start(nlsk, skb, nlh, c); in nf_netlink_dump_start_rcu() 120 struct nlmsghdr *nlh; in nfnl_hook_dump_one() local 127 nlh = nfnl_msg_put(nlskb, portid, seq, event, in nfnl_hook_dump_one() 129 if (!nlh) in nfnl_hook_dump_one() 177 nlmsg_end(nlskb, nlh); in nfnl_hook_dump_one() 180 nlmsg_trim(nlskb, nlh); in nfnl_hook_dump_one() 241 struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh); in nfnl_hook_dump() 267 cb->nlh->nlmsg_seq); in nfnl_hook_dump() 281 const struct nfgenmsg *nfmsg = nlmsg_data(cb->nlh); in nfnl_hook_dump_start() [all …]
|
D | nf_conntrack_netlink.c | 566 struct nlmsghdr *nlh; in ctnetlink_fill_info() local 573 nlh = nfnl_msg_put(skb, portid, seq, event, flags, nf_ct_l3num(ct), in ctnetlink_fill_info() 575 if (!nlh) in ctnetlink_fill_info() 609 nlmsg_end(skb, nlh); in ctnetlink_fill_info() 614 nlmsg_cancel(skb, nlh); in ctnetlink_fill_info() 719 struct nlmsghdr *nlh; in ctnetlink_conntrack_event() local 749 nlh = nfnl_msg_put(skb, item->portid, 0, type, flags, nf_ct_l3num(ct), in ctnetlink_conntrack_event() 751 if (!nlh) in ctnetlink_conntrack_event() 832 nlmsg_end(skb, nlh); in ctnetlink_conntrack_event() 841 nlmsg_cancel(skb, nlh); in ctnetlink_conntrack_event() [all …]
|
D | nfnetlink_acct.c | 79 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/ |
D | pn_netlink.c | 51 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/ |
D | xfrm_user.c | 679 static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_sa() argument 683 struct xfrm_usersa_info *p = nlmsg_data(nlh); in xfrm_add_sa() 697 if (nlh->nlmsg_type == XFRM_MSG_NEWSA) in xfrm_add_sa() 714 c.seq = nlh->nlmsg_seq; in xfrm_add_sa() 715 c.portid = nlh->nlmsg_pid; in xfrm_add_sa() 716 c.event = nlh->nlmsg_type; in xfrm_add_sa() 758 static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_del_sa() argument 765 struct xfrm_usersa_id *p = nlmsg_data(nlh); in xfrm_del_sa() 784 c.seq = nlh->nlmsg_seq; in xfrm_del_sa() 785 c.portid = nlh->nlmsg_pid; in xfrm_del_sa() [all …]
|
/net/ipv6/ |
D | addrlabel.c | 384 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/ |
D | inet_diag.c | 206 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 …]
|
D | devinet.c | 350 int destroy, struct nlmsghdr *nlh, u32 portid) in __inet_del_ifa() argument 389 rtmsg_ifa(RTM_DELADDR, ifa, nlh, portid); in __inet_del_ifa() 427 rtmsg_ifa(RTM_DELADDR, ifa1, nlh, portid); in __inet_del_ifa() 445 rtmsg_ifa(RTM_NEWADDR, promote, nlh, portid); in __inet_del_ifa() 472 static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh, in __inet_insert_ifa() argument 552 rtmsg_ifa(RTM_NEWADDR, ifa, nlh, portid); in __inet_insert_ifa() 644 static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh, in inet_rtm_deladdr() argument 657 err = nlmsg_parse_deprecated(nlh, sizeof(*ifm), tb, IFA_MAX, in inet_rtm_deladdr() 662 ifm = nlmsg_data(nlh); in inet_rtm_deladdr() 685 __inet_del_ifa(in_dev, ifap, 1, nlh, NETLINK_CB(skb).portid); in inet_rtm_deladdr() [all …]
|
/net/core/ |
D | sock_diag.c | 19 static int (*inet_rcv_compat)(struct sk_buff *skb, struct nlmsghdr *nlh); 165 void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)) in sock_diag_register_inet_compat() argument 173 void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)) in sock_diag_unregister_inet_compat() argument 213 static int __sock_diag_cmd(struct sk_buff *skb, struct nlmsghdr *nlh) in __sock_diag_cmd() argument 216 struct sock_diag_req *req = nlmsg_data(nlh); in __sock_diag_cmd() 219 if (nlmsg_len(nlh) < sizeof(*req)) in __sock_diag_cmd() 233 else if (nlh->nlmsg_type == SOCK_DIAG_BY_FAMILY) in __sock_diag_cmd() 234 err = hndl->dump(skb, nlh); in __sock_diag_cmd() 235 else if (nlh->nlmsg_type == SOCK_DESTROY && hndl->destroy) in __sock_diag_cmd() 236 err = hndl->destroy(skb, nlh); in __sock_diag_cmd() [all …]
|
D | rtnetlink.c | 726 struct nlmsghdr *nlh, gfp_t flags) in rtnl_notify() argument 730 nlmsg_notify(rtnl, skb, pid, group, nlmsg_report(nlh), flags); in rtnl_notify() 1706 struct nlmsghdr *nlh; in rtnl_fill_ifinfo() local 1710 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ifm), flags); in rtnl_fill_ifinfo() 1711 if (nlh == NULL) in rtnl_fill_ifinfo() 1714 ifm = nlmsg_data(nlh); in rtnl_fill_ifinfo() 1831 nlmsg_end(skb, nlh); in rtnl_fill_ifinfo() 1837 nlmsg_cancel(skb, nlh); in rtnl_fill_ifinfo() 2030 static int rtnl_valid_dump_ifinfo_req(const struct nlmsghdr *nlh, in rtnl_valid_dump_ifinfo_req() argument 2039 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ifm))) { in rtnl_valid_dump_ifinfo_req() [all …]
|
D | fib_rules.c | 101 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() 753 int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, in fib_nl_newrule() argument 757 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl_newrule() 764 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*frh))) { in fib_nl_newrule() 776 err = nlmsg_parse_deprecated(nlh, sizeof(*frh), tb, FRA_MAX, in fib_nl_newrule() 783 err = fib_nl2rule(skb, nlh, extack, ops, tb, &rule, &user_priority); in fib_nl_newrule() 787 if ((nlh->nlmsg_flags & NLM_F_EXCL) && in fib_nl_newrule() 848 notify_rule_change(RTM_NEWRULE, rule, ops, nlh, NETLINK_CB(skb).portid); in fib_nl_newrule() [all …]
|
/net/mctp/ |
D | neigh.c | 114 static int mctp_rtm_newneigh(struct sk_buff *skb, struct nlmsghdr *nlh, in mctp_rtm_newneigh() argument 127 rc = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, nd_mctp_policy, in mctp_rtm_newneigh() 153 ndm = nlmsg_data(nlh); in mctp_rtm_newneigh() 172 static int mctp_rtm_delneigh(struct sk_buff *skb, struct nlmsghdr *nlh, in mctp_rtm_delneigh() argument 183 rc = nlmsg_parse(nlh, sizeof(*ndm), tb, NDA_MAX, nd_mctp_policy, in mctp_rtm_delneigh() 196 ndm = nlmsg_data(nlh); in mctp_rtm_delneigh() 212 struct nlmsghdr *nlh; in mctp_fill_neigh() local 215 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*hdr), flags); in mctp_fill_neigh() 216 if (!nlh) in mctp_fill_neigh() 219 hdr = nlmsg_data(nlh); in mctp_fill_neigh() [all …]
|
D | device.c | 50 struct nlmsghdr *nlh; in mctp_fill_addrinfo() local 52 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, in mctp_fill_addrinfo() 54 if (!nlh) in mctp_fill_addrinfo() 57 hdr = nlmsg_data(nlh); in mctp_fill_addrinfo() 70 nlmsg_end(skb, nlh); in mctp_fill_addrinfo() 75 nlmsg_cancel(skb, nlh); in mctp_fill_addrinfo() 105 hdr = nlmsg_data(cb->nlh); in mctp_dump_addrinfo() 143 static int mctp_rtm_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, in mctp_rtm_newaddr() argument 156 rc = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_mctp_policy, in mctp_rtm_newaddr() 161 ifm = nlmsg_data(nlh); in mctp_rtm_newaddr() [all …]
|
/net/mpls/ |
D | af_mpls.c | 74 struct nlmsghdr *nlh, struct net *net, u32 portid, 542 struct nlmsghdr *nlh = info ? info->nlh : NULL; in mpls_notify_route() local 549 rtmsg_lfib(event, index, rt, nlh, net, portid, nlm_flags); in mpls_notify_route() 1136 struct nlmsghdr *nlh; in mpls_netconf_fill_devconf() local 1140 nlh = nlmsg_put(skb, portid, seq, event, sizeof(struct netconfmsg), in mpls_netconf_fill_devconf() 1142 if (!nlh) in mpls_netconf_fill_devconf() 1148 ncm = nlmsg_data(nlh); in mpls_netconf_fill_devconf() 1159 nlmsg_end(skb, nlh); in mpls_netconf_fill_devconf() 1163 nlmsg_cancel(skb, nlh); in mpls_netconf_fill_devconf() 1212 const struct nlmsghdr *nlh, in mpls_netconf_valid_get_req() argument [all …]
|
/net/sctp/ |
D | diag.c | 130 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/ |
D | diag.c | 48 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()
|
D | genetlink.c | 491 struct nlmsghdr *nlh; in genlmsg_put() local 494 nlh = nlmsg_put(skb, portid, seq, family->id, GENL_HDRLEN + in genlmsg_put() 496 if (nlh == NULL) in genlmsg_put() 499 hdr = nlmsg_data(nlh); in genlmsg_put() 520 struct nlmsghdr *nlh, in genl_family_rcv_msg_attrs_parse() argument 540 err = __nlmsg_parse(nlh, hdrlen, attrbuf, ops->maxattr, ops->policy, in genl_family_rcv_msg_attrs_parse() 556 struct nlmsghdr *nlh; member 573 if (ctx->nlh->nlmsg_len < nlmsg_msg_size(ctx->hdrlen)) in genl_start() 576 attrs = genl_family_rcv_msg_attrs_parse(ctx->family, ctx->nlh, ctx->extack, in genl_start() 651 struct nlmsghdr *nlh, in genl_family_rcv_msg_dumpit() argument [all …]
|
/net/dcb/ |
D | dcbnl.c | 187 struct nlmsghdr *nlh; in dcbnl_newmsg() local 193 nlh = nlmsg_put(skb, port, seq, type, sizeof(*dcb), flags); in dcbnl_newmsg() 194 BUG_ON(!nlh); in dcbnl_newmsg() 196 dcb = nlmsg_data(nlh); in dcbnl_newmsg() 202 *nlhp = nlh; in dcbnl_newmsg() 207 static int dcbnl_getstate(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getstate() argument 218 static int dcbnl_getpfccfg(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getpfccfg() argument 263 static int dcbnl_getperm_hwaddr(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getperm_hwaddr() argument 277 static int dcbnl_getcap(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getcap() argument 322 static int dcbnl_getnumtcs(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getnumtcs() argument [all …]
|
/net/bridge/ |
D | br_mdb.c | 381 static int br_mdb_valid_dump_req(const struct nlmsghdr *nlh, in br_mdb_valid_dump_req() argument 386 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*bpm))) { in br_mdb_valid_dump_req() 391 bpm = nlmsg_data(nlh); in br_mdb_valid_dump_req() 396 if (nlmsg_attrlen(nlh, sizeof(*bpm))) { in br_mdb_valid_dump_req() 408 struct nlmsghdr *nlh = NULL; in br_mdb_dump() local 412 int err = br_mdb_valid_dump_req(cb->nlh, cb->extack); in br_mdb_dump() 432 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, in br_mdb_dump() 433 cb->nlh->nlmsg_seq, RTM_GETMDB, in br_mdb_dump() 435 if (nlh == NULL) in br_mdb_dump() 438 bpm = nlmsg_data(nlh); in br_mdb_dump() [all …]
|
/net/vmw_vsock/ |
D | diag.c | 19 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/ |
D | smc_stats.c | 267 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/ |
D | diag.c | 53 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/xdp/ |
D | xsk_diag.c | 99 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()
|