Lines Matching defs:nlh

2158 	struct nlmsghdr *nlh;
2161 nlh = skb_put(skb, NLMSG_ALIGN(size));
2162 nlh->nlmsg_type = type;
2163 nlh->nlmsg_len = size;
2164 nlh->nlmsg_flags = flags;
2165 nlh->nlmsg_pid = portid;
2166 nlh->nlmsg_seq = seq;
2168 memset(nlmsg_data(nlh) + len, 0, NLMSG_ALIGN(size) - size);
2169 return nlh;
2182 struct nlmsghdr *nlh;
2184 nlh = nlmsg_put_answer(skb, cb, NLMSG_DONE, sizeof(nlk->dump_done_errno),
2186 if (WARN_ON(!nlh))
2189 nl_dump_check_consistent(cb, nlh);
2190 memcpy(nlmsg_data(nlh), &nlk->dump_done_errno, sizeof(nlk->dump_done_errno));
2193 nlh->nlmsg_flags |= NLM_F_ACK_TLVS;
2195 nlmsg_end(skb, nlh);
2318 const struct nlmsghdr *nlh,
2351 cb->nlh = nlh;
2428 struct nlmsghdr *nlh, int err,
2444 (u8 *)extack->bad_attr - (u8 *)nlh));
2455 (u8 *)extack->miss_nest - (u8 *)nlh));
2458 void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err,
2474 payload += nlmsg_len(nlh);
2486 rep = nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq,
2492 errmsg->msg = *nlh;
2495 if (!nlmsg_append(skb, nlmsg_len(nlh)))
2498 memcpy(nlmsg_data(&errmsg->msg), nlmsg_data(nlh),
2499 nlmsg_len(nlh));
2503 netlink_ack_tlv_fill(in_skb, skb, nlh, err, extack);
2524 struct nlmsghdr *nlh;
2531 nlh = nlmsg_hdr(skb);
2534 if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len)
2538 if (!(nlh->nlmsg_flags & NLM_F_REQUEST))
2542 if (nlh->nlmsg_type < NLMSG_MIN_TYPE)
2545 err = cb(skb, nlh, &extack);
2550 if (nlh->nlmsg_flags & NLM_F_ACK || err)
2551 netlink_ack(skb, nlh, err, &extack);
2554 msglen = NLMSG_ALIGN(nlh->nlmsg_len);