/net/phonet/ |
D | pn_netlink.c | 64 static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh) in addr_doit() argument 81 err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_phonet_policy); in addr_doit() 85 ifm = nlmsg_data(nlh); in addr_doit() 97 if (nlh->nlmsg_type == RTM_NEWADDR) in addr_doit() 102 phonet_address_notify(nlh->nlmsg_type, dev, pnaddr); in addr_doit() 110 struct nlmsghdr *nlh; in fill_addr() local 112 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*ifm), 0); in fill_addr() 113 if (nlh == NULL) in fill_addr() 116 ifm = nlmsg_data(nlh); in fill_addr() 124 return nlmsg_end(skb, nlh); in fill_addr() [all …]
|
/net/xfrm/ |
D | xfrm_user.c | 596 static int xfrm_add_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_add_sa() argument 600 struct xfrm_usersa_info *p = nlmsg_data(nlh); in xfrm_add_sa() 617 if (nlh->nlmsg_type == XFRM_MSG_NEWSA) in xfrm_add_sa() 631 c.seq = nlh->nlmsg_seq; in xfrm_add_sa() 632 c.portid = nlh->nlmsg_pid; in xfrm_add_sa() 633 c.event = nlh->nlmsg_type; in xfrm_add_sa() 675 static int xfrm_del_sa(struct sk_buff *skb, struct nlmsghdr *nlh, in xfrm_del_sa() argument 682 struct xfrm_usersa_id *p = nlmsg_data(nlh); in xfrm_del_sa() 704 c.seq = nlh->nlmsg_seq; in xfrm_del_sa() 705 c.portid = nlh->nlmsg_pid; in xfrm_del_sa() [all …]
|
/net/decnet/netfilter/ |
D | dn_rtmsg.c | 38 struct nlmsghdr *nlh; in dnrmg_build_message() local 50 nlh = nlmsg_put(skb, 0, 0, 0, size, 0); in dnrmg_build_message() 51 if (!nlh) { in dnrmg_build_message() 56 rtm = (struct nf_dn_rtmsg *)nlmsg_data(nlh); in dnrmg_build_message() 60 nlh->nlmsg_len = skb->tail - old_tail; in dnrmg_build_message() 101 #define RCV_SKB_FAIL(err) do { netlink_ack(skb, nlh, (err)); return; } while (0) 105 struct nlmsghdr *nlh = nlmsg_hdr(skb); in dnrmg_receive_user_skb() local 107 if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len) in dnrmg_receive_user_skb()
|
/net/core/ |
D | sock_diag.c | 13 static int (*inet_rcv_compat)(struct sk_buff *skb, struct nlmsghdr *nlh); 90 void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)) in sock_diag_register_inet_compat() argument 98 void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)) in sock_diag_unregister_inet_compat() argument 138 static int __sock_diag_cmd(struct sk_buff *skb, struct nlmsghdr *nlh) in __sock_diag_cmd() argument 141 struct sock_diag_req *req = nlmsg_data(nlh); in __sock_diag_cmd() 144 if (nlmsg_len(nlh) < sizeof(*req)) in __sock_diag_cmd() 158 else if (nlh->nlmsg_type == SOCK_DIAG_BY_FAMILY) in __sock_diag_cmd() 159 err = hndl->dump(skb, nlh); in __sock_diag_cmd() 160 else if (nlh->nlmsg_type == SOCK_DESTROY_BACKPORT && hndl->destroy) in __sock_diag_cmd() 161 err = hndl->destroy(skb, nlh); in __sock_diag_cmd() [all …]
|
D | rtnetlink.c | 543 struct nlmsghdr *nlh, gfp_t flags) in rtnl_notify() argument 548 if (nlh) in rtnl_notify() 549 report = nlmsg_report(nlh); in rtnl_notify() 854 struct nlmsghdr *nlh; in rtnl_fill_ifinfo() local 862 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ifm), flags); in rtnl_fill_ifinfo() 863 if (nlh == NULL) in rtnl_fill_ifinfo() 866 ifm = nlmsg_data(nlh); in rtnl_fill_ifinfo() 1028 return nlmsg_end(skb, nlh); in rtnl_fill_ifinfo() 1031 nlmsg_cancel(skb, nlh); in rtnl_fill_ifinfo() 1051 if (nlmsg_parse(cb->nlh, sizeof(struct ifinfomsg), tb, IFLA_MAX, in rtnl_dump_ifinfo() [all …]
|
D | fib_rules.c | 68 struct fib_rules_ops *ops, struct nlmsghdr *nlh, 307 static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh) in fib_nl_newrule() argument 310 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl_newrule() 316 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*frh))) in fib_nl_newrule() 325 err = nlmsg_parse(nlh, sizeof(*frh), tb, FRA_MAX, ops->policy); in fib_nl_newrule() 458 notify_rule_change(RTM_NEWRULE, rule, ops, nlh, NETLINK_CB(skb).portid); in fib_nl_newrule() 471 static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh) in fib_nl_delrule() argument 474 struct fib_rule_hdr *frh = nlmsg_data(nlh); in fib_nl_delrule() 481 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*frh))) in fib_nl_delrule() 490 err = nlmsg_parse(nlh, sizeof(*frh), tb, FRA_MAX, ops->policy); in fib_nl_delrule() [all …]
|
/net/netfilter/ |
D | nf_conntrack_netlink.c | 459 struct nlmsghdr *nlh; in ctnetlink_fill_info() local 465 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*nfmsg), flags); in ctnetlink_fill_info() 466 if (nlh == NULL) in ctnetlink_fill_info() 469 nfmsg = nlmsg_data(nlh); in ctnetlink_fill_info() 508 nlmsg_end(skb, nlh); in ctnetlink_fill_info() 513 nlmsg_cancel(skb, nlh); in ctnetlink_fill_info() 609 struct nlmsghdr *nlh; in ctnetlink_conntrack_event() local 644 nlh = nlmsg_put(skb, item->portid, 0, type, sizeof(*nfmsg), flags); in ctnetlink_conntrack_event() 645 if (nlh == NULL) in ctnetlink_conntrack_event() 648 nfmsg = nlmsg_data(nlh); in ctnetlink_conntrack_event() [all …]
|
D | nfnetlink_acct.c | 43 const struct nlmsghdr *nlh, const struct nlattr * const tb[]) in nfnl_acct_new() argument 59 if (nlh->nlmsg_flags & NLM_F_EXCL) in nfnl_acct_new() 67 if (nlh->nlmsg_flags & NLM_F_REPLACE) { in nfnl_acct_new() 99 struct nlmsghdr *nlh; in nfnl_acct_fill_info() local 105 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*nfmsg), flags); in nfnl_acct_fill_info() 106 if (nlh == NULL) in nfnl_acct_fill_info() 109 nfmsg = nlmsg_data(nlh); in nfnl_acct_fill_info() 129 nlmsg_end(skb, nlh); in nfnl_acct_fill_info() 134 nlmsg_cancel(skb, nlh); in nfnl_acct_fill_info() 159 cb->nlh->nlmsg_seq, in nfnl_acct_dump() [all …]
|
D | nfnetlink_cttimeout.c | 73 const struct nlmsghdr *nlh, in cttimeout_new_timeout() argument 98 if (nlh->nlmsg_flags & NLM_F_EXCL) in cttimeout_new_timeout() 114 if (nlh->nlmsg_flags & NLM_F_REPLACE) { in cttimeout_new_timeout() 162 struct nlmsghdr *nlh; in ctnl_timeout_fill_info() local 168 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*nfmsg), flags); in ctnl_timeout_fill_info() 169 if (nlh == NULL) in ctnl_timeout_fill_info() 172 nfmsg = nlmsg_data(nlh); in ctnl_timeout_fill_info() 200 nlmsg_end(skb, nlh); in ctnl_timeout_fill_info() 205 nlmsg_cancel(skb, nlh); in ctnl_timeout_fill_info() 230 cb->nlh->nlmsg_seq, in ctnl_timeout_dump() [all …]
|
D | nfnetlink_cthelper.c | 280 const struct nlmsghdr *nlh, const struct nlattr * const tb[]) in nfnl_cthelper_new() argument 312 if (nlh->nlmsg_flags & NLM_F_EXCL) { in nfnl_cthelper_new() 403 struct nlmsghdr *nlh; in nfnl_cthelper_fill_info() local 409 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*nfmsg), flags); in nfnl_cthelper_fill_info() 410 if (nlh == NULL) in nfnl_cthelper_fill_info() 413 nfmsg = nlmsg_data(nlh); in nfnl_cthelper_fill_info() 441 nlmsg_end(skb, nlh); in nfnl_cthelper_fill_info() 446 nlmsg_cancel(skb, nlh); in nfnl_cthelper_fill_info() 473 cb->nlh->nlmsg_seq, in nfnl_cthelper_dump_table() 474 NFNL_MSG_TYPE(cb->nlh->nlmsg_type), in nfnl_cthelper_dump_table() [all …]
|
D | nfnetlink.c | 143 static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) in nfnetlink_rcv_msg() argument 154 if (nlmsg_len(nlh) < sizeof(struct nfgenmsg)) in nfnetlink_rcv_msg() 157 type = nlh->nlmsg_type; in nfnetlink_rcv_msg() 183 u_int8_t cb_id = NFNL_MSG_TYPE(nlh->nlmsg_type); in nfnetlink_rcv_msg() 185 struct nlattr *attr = (void *)nlh + min_len; in nfnetlink_rcv_msg() 186 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_msg() 197 err = nc->call_rcu(net->nfnl, skb, nlh, in nfnetlink_rcv_msg() 208 err = nc->call(net->nfnl, skb, nlh, in nfnetlink_rcv_msg()
|
/net/ipv4/ |
D | inet_diag.c | 84 struct nlmsghdr *nlh; in inet_sk_diag_fill() local 93 nlh = nlmsg_put(skb, portid, seq, unlh->nlmsg_type, sizeof(*r), in inet_sk_diag_fill() 95 if (!nlh) in inet_sk_diag_fill() 98 r = nlmsg_data(nlh); in inet_sk_diag_fill() 211 return nlmsg_end(skb, nlh); in inet_sk_diag_fill() 214 nlmsg_cancel(skb, nlh); in inet_sk_diag_fill() 237 struct nlmsghdr *nlh; in inet_twsk_diag_fill() local 239 nlh = nlmsg_put(skb, portid, seq, unlh->nlmsg_type, sizeof(*r), in inet_twsk_diag_fill() 241 if (!nlh) in inet_twsk_diag_fill() 244 r = nlmsg_data(nlh); in inet_twsk_diag_fill() [all …]
|
D | udp_diag.c | 31 cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh, net_admin); in sk_diag_dump() 35 const struct nlmsghdr *nlh, struct inet_diag_req_v2 *req) in udp_dump_one() argument 77 nlh->nlmsg_seq, 0, nlh, in udp_dump_one() 153 static int udp_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *nlh, in udp_diag_dump_one() argument 156 return udp_dump_one(&udp_table, in_skb, nlh, req); in udp_diag_dump_one() 255 static int udplite_diag_dump_one(struct sk_buff *in_skb, const struct nlmsghdr *nlh, in udplite_diag_dump_one() argument 258 return udp_dump_one(&udplite_table, in_skb, nlh, req); in udplite_diag_dump_one()
|
D | devinet.c | 317 int destroy, struct nlmsghdr *nlh, u32 portid) in __inet_del_ifa() argument 351 rtmsg_ifa(RTM_DELADDR, ifa, nlh, portid); in __inet_del_ifa() 388 rtmsg_ifa(RTM_DELADDR, ifa1, nlh, portid); in __inet_del_ifa() 401 rtmsg_ifa(RTM_NEWADDR, promote, nlh, portid); in __inet_del_ifa() 426 static int __inet_insert_ifa(struct in_ifaddr *ifa, struct nlmsghdr *nlh, in __inet_insert_ifa() argument 477 rtmsg_ifa(RTM_NEWADDR, ifa, nlh, portid); in __inet_insert_ifa() 540 static int inet_rtm_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh) in inet_rtm_deladdr() argument 551 err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFA_MAX, ifa_ipv4_policy); in inet_rtm_deladdr() 555 ifm = nlmsg_data(nlh); in inet_rtm_deladdr() 576 __inet_del_ifa(in_dev, ifap, 1, nlh, NETLINK_CB(skb).portid); in inet_rtm_deladdr() [all …]
|
/net/bridge/ |
D | br_mdb.c | 116 struct nlmsghdr *nlh = NULL; in br_mdb_dump() local 133 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, in br_mdb_dump() 134 cb->nlh->nlmsg_seq, RTM_GETMDB, in br_mdb_dump() 136 if (nlh == NULL) in br_mdb_dump() 139 bpm = nlmsg_data(nlh); in br_mdb_dump() 148 nlmsg_end(skb, nlh); in br_mdb_dump() 155 if (nlh) in br_mdb_dump() 156 nlmsg_end(skb, nlh); in br_mdb_dump() 167 struct nlmsghdr *nlh; in nlmsg_populate_mdb_fill() local 171 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*bpm), NLM_F_MULTI); in nlmsg_populate_mdb_fill() [all …]
|
/net/wimax/ |
D | op-msg.c | 186 struct nlmsghdr *nlh = (void *) msg->head; in wimax_msg_data_len() local 189 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_data_len() 208 struct nlmsghdr *nlh = (void *) msg->head; in wimax_msg_data() local 211 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_data() 229 struct nlmsghdr *nlh = (void *) msg->head; in wimax_msg_len() local 232 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), in wimax_msg_len() 349 struct nlmsghdr *nlh = info->nlhdr; in wimax_gnl_doit_msg_from_user() local 402 nlh->nlmsg_len, nlh->nlmsg_type, nlh->nlmsg_flags, in wimax_gnl_doit_msg_from_user() 403 nlh->nlmsg_seq, nlh->nlmsg_pid); in wimax_gnl_doit_msg_from_user()
|
/net/netfilter/ipset/ |
D | ip_set_core.c | 628 flag_exist(const struct nlmsghdr *nlh) in flag_exist() argument 630 return nlh->nlmsg_flags & NLM_F_EXCL ? 0 : IPSET_FLAG_EXIST; in flag_exist() 637 struct nlmsghdr *nlh; in start_msg() local 640 nlh = nlmsg_put(skb, portid, seq, cmd | (NFNL_SUBSYS_IPSET << 8), in start_msg() 642 if (nlh == NULL) in start_msg() 645 nfmsg = nlmsg_data(nlh); in start_msg() 650 return nlh; in start_msg() 717 const struct nlmsghdr *nlh, in ip_set_none() argument 725 const struct nlmsghdr *nlh, in ip_set_create() argument 733 u32 flags = flag_exist(nlh); in ip_set_create() [all …]
|
/net/netlink/ |
D | diag.c | 60 struct nlmsghdr *nlh; in sk_diag_fill() local 64 nlh = nlmsg_put(skb, portid, seq, SOCK_DIAG_BY_FAMILY, sizeof(*rep), in sk_diag_fill() 66 if (!nlh) in sk_diag_fill() 69 rep = nlmsg_data(nlh); in sk_diag_fill() 93 return nlmsg_end(skb, nlh); in sk_diag_fill() 96 nlmsg_cancel(skb, nlh); in sk_diag_fill() 110 req = nlmsg_data(cb->nlh); in __netlink_diag_dump() 123 cb->nlh->nlmsg_seq, in __netlink_diag_dump() 146 cb->nlh->nlmsg_seq, in __netlink_diag_dump() 166 req = nlmsg_data(cb->nlh); in netlink_diag_dump()
|
D | genetlink.c | 530 struct nlmsghdr *nlh; in genlmsg_put() local 533 nlh = nlmsg_put(skb, portid, seq, family->id, GENL_HDRLEN + in genlmsg_put() 535 if (nlh == NULL) in genlmsg_put() 538 hdr = nlmsg_data(nlh); in genlmsg_put() 549 struct nlmsghdr *nlh) in genl_family_rcv_msg() argument 554 struct genlmsghdr *hdr = nlmsg_data(nlh); in genl_family_rcv_msg() 563 if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) in genl_family_rcv_msg() 574 if (nlh->nlmsg_flags & NLM_F_DUMP) { in genl_family_rcv_msg() 583 return netlink_dump_start(net->genl_sock, skb, nlh, &c); in genl_family_rcv_msg() 598 err = nlmsg_parse(nlh, hdrlen, attrbuf, family->maxattr, in genl_family_rcv_msg() [all …]
|
/net/ipv6/ |
D | addrlabel.c | 417 static int ip6addrlbl_newdel(struct sk_buff *skb, struct nlmsghdr *nlh) in ip6addrlbl_newdel() argument 426 err = nlmsg_parse(nlh, sizeof(*ifal), tb, IFAL_MAX, ifal_policy); in ip6addrlbl_newdel() 430 ifal = nlmsg_data(nlh); in ip6addrlbl_newdel() 446 switch(nlh->nlmsg_type) { in ip6addrlbl_newdel() 454 nlh->nlmsg_flags & NLM_F_REPLACE); in ip6addrlbl_newdel() 466 static void ip6addrlbl_putmsg(struct nlmsghdr *nlh, in ip6addrlbl_putmsg() argument 469 struct ifaddrlblmsg *ifal = nlmsg_data(nlh); in ip6addrlbl_putmsg() 483 struct nlmsghdr *nlh = nlmsg_put(skb, portid, seq, event, in ip6addrlbl_fill() local 485 if (!nlh) in ip6addrlbl_fill() 488 ip6addrlbl_putmsg(nlh, p->prefixlen, p->ifindex, lseq); in ip6addrlbl_fill() [all …]
|
/net/dcb/ |
D | dcbnl.c | 203 struct nlmsghdr *nlh; in dcbnl_newmsg() local 209 nlh = nlmsg_put(skb, port, seq, type, sizeof(*dcb), flags); in dcbnl_newmsg() 210 BUG_ON(!nlh); in dcbnl_newmsg() 212 dcb = nlmsg_data(nlh); in dcbnl_newmsg() 218 *nlhp = nlh; in dcbnl_newmsg() 223 static int dcbnl_getstate(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getstate() argument 234 static int dcbnl_getpfccfg(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getpfccfg() argument 279 static int dcbnl_getperm_hwaddr(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getperm_hwaddr() argument 293 static int dcbnl_getcap(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getcap() argument 337 static int dcbnl_getnumtcs(struct net_device *netdev, struct nlmsghdr *nlh, in dcbnl_getnumtcs() argument [all …]
|
/net/unix/ |
D | diag.c | 115 struct nlmsghdr *nlh; in sk_diag_fill() local 118 nlh = nlmsg_put(skb, portid, seq, SOCK_DIAG_BY_FAMILY, sizeof(*rep), in sk_diag_fill() 120 if (!nlh) in sk_diag_fill() 123 rep = nlmsg_data(nlh); in sk_diag_fill() 157 return nlmsg_end(skb, nlh); in sk_diag_fill() 160 nlmsg_cancel(skb, nlh); in sk_diag_fill() 185 req = nlmsg_data(cb->nlh); in unix_diag_dump() 206 cb->nlh->nlmsg_seq, in unix_diag_dump() 242 const struct nlmsghdr *nlh, in unix_diag_get_exact() argument 271 nlh->nlmsg_seq, 0, req->udiag_ino); in unix_diag_get_exact()
|
/net/sched/ |
D | act_api.c | 653 struct nlmsghdr *nlh; in tca_get_fill() local 657 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*t), flags); in tca_get_fill() 658 if (!nlh) in tca_get_fill() 660 t = nlmsg_data(nlh); in tca_get_fill() 674 nlh->nlmsg_len = skb_tail_pointer(skb) - b; in tca_get_fill() 771 struct nlmsghdr *nlh; in tca_action_flush() local 804 nlh = nlmsg_put(skb, portid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t), 0); in tca_action_flush() 805 if (!nlh) in tca_action_flush() 807 t = nlmsg_data(nlh); in tca_action_flush() 824 nlh->nlmsg_len = skb_tail_pointer(skb) - b; in tca_action_flush() [all …]
|
/net/decnet/ |
D | dn_fib.c | 264 const struct nlmsghdr *nlh, int *errp) in dn_fib_create_info() argument 500 static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh) in dn_fib_rtm_delroute() argument 504 struct rtmsg *r = nlmsg_data(nlh); in dn_fib_rtm_delroute() 514 err = nlmsg_parse(nlh, sizeof(*r), attrs, RTA_MAX, rtm_dn_policy); in dn_fib_rtm_delroute() 522 return tb->delete(tb, r, attrs, nlh, &NETLINK_CB(skb)); in dn_fib_rtm_delroute() 525 static int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh) in dn_fib_rtm_newroute() argument 529 struct rtmsg *r = nlmsg_data(nlh); in dn_fib_rtm_newroute() 539 err = nlmsg_parse(nlh, sizeof(*r), attrs, RTA_MAX, rtm_dn_policy); in dn_fib_rtm_newroute() 547 return tb->insert(tb, r, attrs, nlh, &NETLINK_CB(skb)); in dn_fib_rtm_newroute() 554 struct nlmsghdr nlh; in fib_magic() member [all …]
|
/net/packet/ |
D | diag.c | 133 struct nlmsghdr *nlh; in sk_diag_fill() local 137 nlh = nlmsg_put(skb, portid, seq, SOCK_DIAG_BY_FAMILY, sizeof(*rp), flags); in sk_diag_fill() 138 if (!nlh) in sk_diag_fill() 141 rp = nlmsg_data(nlh); in sk_diag_fill() 177 return nlmsg_end(skb, nlh); in sk_diag_fill() 180 nlmsg_cancel(skb, nlh); in sk_diag_fill() 192 req = nlmsg_data(cb->nlh); in packet_diag_dump() 204 cb->nlh->nlmsg_seq, NLM_F_MULTI, in packet_diag_dump()
|