Lines Matching defs:nlh
2165 struct nlmsghdr *nlh;
2168 nlh = skb_put(skb, NLMSG_ALIGN(size));
2169 nlh->nlmsg_type = type;
2170 nlh->nlmsg_len = size;
2171 nlh->nlmsg_flags = flags;
2172 nlh->nlmsg_pid = portid;
2173 nlh->nlmsg_seq = seq;
2175 memset(nlmsg_data(nlh) + len, 0, NLMSG_ALIGN(size) - size);
2176 return nlh;
2189 struct nlmsghdr *nlh;
2191 nlh = nlmsg_put_answer(skb, cb, NLMSG_DONE, sizeof(nlk->dump_done_errno),
2193 if (WARN_ON(!nlh))
2196 nl_dump_check_consistent(cb, nlh);
2197 memcpy(nlmsg_data(nlh), &nlk->dump_done_errno, sizeof(nlk->dump_done_errno));
2200 nlh->nlmsg_flags |= NLM_F_ACK_TLVS;
2202 nlmsg_end(skb, nlh);
2323 const struct nlmsghdr *nlh,
2356 cb->nlh = nlh;
2399 void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err,
2419 payload += nlmsg_len(nlh);
2439 rep = __nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq,
2443 memcpy(&errmsg->msg, nlh, payload > sizeof(*errmsg) ? nlh->nlmsg_len : sizeof(*nlh));
2456 (u8 *)nlh));
2476 struct nlmsghdr *nlh;
2483 nlh = nlmsg_hdr(skb);
2486 if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len)
2490 if (!(nlh->nlmsg_flags & NLM_F_REQUEST))
2494 if (nlh->nlmsg_type < NLMSG_MIN_TYPE)
2497 err = cb(skb, nlh, &extack);
2502 if (nlh->nlmsg_flags & NLM_F_ACK || err)
2503 netlink_ack(skb, nlh, err, &extack);
2506 msglen = NLMSG_ALIGN(nlh->nlmsg_len);