Lines Matching full:hdr
60 nw->hdr = NULL; in nlmsg_get_buf()
111 if (__predict_false(nw->hdr != NULL)) { in _nlmsg_flush()
113 int completed_len = (char *)nw->hdr - nw->buf->data; in _nlmsg_flush()
116 nw->hdr = NULL; in _nlmsg_flush()
156 completed_len = (nw->hdr != NULL) ? in _nlmsg_refill_buffer()
157 (char *)nw->hdr - nw->buf->data : nw->buf->datalen; in _nlmsg_refill_buffer()
181 memcpy(new->data, nw->hdr, last_len); in _nlmsg_refill_buffer()
194 nw->hdr = (last_len > 0) ? (struct nlmsghdr *)new->data : NULL; in _nlmsg_refill_buffer()
206 struct nlmsghdr *hdr; in _nlmsg_add() local
209 MPASS(nw->hdr == NULL); in _nlmsg_add()
218 hdr = (struct nlmsghdr *)(&nb->data[nb->datalen]); in _nlmsg_add()
220 hdr->nlmsg_len = len; in _nlmsg_add()
221 hdr->nlmsg_type = type; in _nlmsg_add()
222 hdr->nlmsg_flags = flags; in _nlmsg_add()
223 hdr->nlmsg_seq = seq; in _nlmsg_add()
224 hdr->nlmsg_pid = portid; in _nlmsg_add()
226 nw->hdr = hdr; in _nlmsg_add()
237 MPASS(nw->hdr != NULL); in _nlmsg_end()
245 nw->hdr->nlmsg_len = nb->data + nb->datalen - (char *)nw->hdr; in _nlmsg_end()
247 nw->hdr->nlmsg_len, nw->hdr->nlmsg_type, nw->hdr->nlmsg_flags, in _nlmsg_end()
248 nw->hdr->nlmsg_seq, nw->hdr->nlmsg_pid); in _nlmsg_end()
249 nw->hdr = NULL; in _nlmsg_end()
259 if (nw->hdr != NULL) { in _nlmsg_abort()
260 nb->datalen = (char *)nw->hdr - nb->data; in _nlmsg_abort()
261 nw->hdr = NULL; in _nlmsg_abort()
266 nlmsg_ack(struct nlpcb *nlp, int error, struct nlmsghdr *hdr, in nlmsg_ack() argument
284 payload_len += hdr->nlmsg_len - sizeof(struct nlmsghdr); in nlmsg_ack()
292 hdr->nlmsg_type, hdr->nlmsg_seq); in nlmsg_ack()
294 if (!nlmsg_add(nw, nlp->nl_port, hdr->nlmsg_seq, NLMSG_ERROR, nl_flags, payload_len)) in nlmsg_ack()
300 memcpy(&errmsg->msg, hdr, cap_ack ? sizeof(*hdr) : hdr->nlmsg_len); in nlmsg_ack()
313 hdr->nlmsg_type, hdr->nlmsg_seq); in nlmsg_ack()
318 _nlmsg_end_dump(struct nl_writer *nw, int error, struct nlmsghdr *hdr) in _nlmsg_end_dump() argument
320 if (!nlmsg_add(nw, hdr->nlmsg_pid, hdr->nlmsg_seq, NLMSG_DONE, 0, sizeof(int))) { in _nlmsg_end_dump()
342 return (nw->buf->datalen - ((char *)nw->hdr - nw->buf->data)); in nlattr_save_offset()