Lines Matching defs:nlh

1894 static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh,
1906 if (nlmsg_len(nlh) < sizeof(*ndm))
1909 dst_attr = nlmsg_find_attr(nlh, sizeof(*ndm), NDA_DST);
1915 ndm = nlmsg_data(nlh);
1959 static int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh,
1976 err = nlmsg_parse_deprecated(nlh, sizeof(*ndm), tb, NDA_MAX,
1987 ndm = nlmsg_data(nlh);
2059 if (!(nlh->nlmsg_flags & NLM_F_CREATE)) {
2078 if (nlh->nlmsg_flags & NLM_F_EXCL) {
2084 if (!(nlh->nlmsg_flags & NLM_F_REPLACE))
2164 struct nlmsghdr *nlh;
2167 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ndtmsg), flags);
2168 if (nlh == NULL)
2171 ndtmsg = nlmsg_data(nlh);
2242 nlmsg_end(skb, nlh);
2247 nlmsg_cancel(skb, nlh);
2258 struct nlmsghdr *nlh;
2260 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ndtmsg), flags);
2261 if (nlh == NULL)
2264 ndtmsg = nlmsg_data(nlh);
2276 nlmsg_end(skb, nlh);
2280 nlmsg_cancel(skb, nlh);
2311 static int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh,
2321 err = nlmsg_parse_deprecated(nlh, sizeof(*ndtmsg), tb, NDTA_MAX,
2331 ndtmsg = nlmsg_data(nlh);
2477 static int neightbl_valid_dump_info(const struct nlmsghdr *nlh,
2482 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ndtm))) {
2487 ndtm = nlmsg_data(nlh);
2493 if (nlmsg_attrlen(nlh, sizeof(*ndtm))) {
2503 const struct nlmsghdr *nlh = cb->nlh;
2511 int err = neightbl_valid_dump_info(nlh, cb->extack);
2517 family = ((struct rtgenmsg *)nlmsg_data(nlh))->rtgen_family;
2530 nlh->nlmsg_seq, RTM_NEWNEIGHTBL,
2545 nlh->nlmsg_seq,
2568 struct nlmsghdr *nlh;
2571 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ndm), flags);
2572 if (nlh == NULL)
2578 ndm = nlmsg_data(nlh);
2616 nlmsg_end(skb, nlh);
2620 nlmsg_cancel(skb, nlh);
2629 struct nlmsghdr *nlh;
2632 nlh = nlmsg_put(skb, pid, seq, type, sizeof(*ndm), flags);
2633 if (nlh == NULL)
2639 ndm = nlmsg_data(nlh);
2656 nlmsg_end(skb, nlh);
2660 nlmsg_cancel(skb, nlh);
2733 cb->nlh->nlmsg_seq,
2776 cb->nlh->nlmsg_seq,
2796 static int neigh_valid_dump_req(const struct nlmsghdr *nlh,
2807 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ndm))) {
2812 ndm = nlmsg_data(nlh);
2824 err = nlmsg_parse_deprecated_strict(nlh, sizeof(struct ndmsg),
2828 err = nlmsg_parse_deprecated(nlh, sizeof(struct ndmsg), tb,
2859 const struct nlmsghdr *nlh = cb->nlh;
2866 family = ((struct rtgenmsg *)nlmsg_data(nlh))->rtgen_family;
2871 if (nlmsg_len(nlh) >= sizeof(struct ndmsg) &&
2872 ((struct ndmsg *)nlmsg_data(nlh))->ndm_flags == NTF_PROXY)
2875 err = neigh_valid_dump_req(nlh, cb->strict_check, &filter, cb->extack);
2903 static int neigh_valid_get_req(const struct nlmsghdr *nlh,
2912 if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ndm))) {
2917 ndm = nlmsg_data(nlh);
2929 err = nlmsg_parse_deprecated_strict(nlh, sizeof(struct ndmsg), tb,
3024 static int neigh_get(struct sk_buff *in_skb, struct nlmsghdr *nlh,
3036 err = neigh_valid_get_req(nlh, &tbl, &dst, &dev_idx, &ndm_flags,
3063 nlh->nlmsg_seq, tbl);
3078 nlh->nlmsg_seq);