Home | History | Annotate | Download | only in lib

Lines Matching defs:hdr

113  * struct nlmsghdr hdr = {
117 * struct nl_msg *msg = nlmsg_inherit(&hdr);
148 * struct nlmsghdr *hdr;
152 * hdr = (struct nlmsghdr *) buf;
153 * while (nlmsg_ok(hdr, n)) {
155 * hdr = nlmsg_next(hdr, &n);
419 * @arg hdr Netlink message header template
422 * header. If \a hdr is not NULL it will be used as a template for
427 struct nl_msg *nlmsg_inherit(struct nlmsghdr *hdr)
432 if (nm && hdr) {
435 new->nlmsg_type = hdr->nlmsg_type;
436 new->nlmsg_flags = hdr->nlmsg_flags;
437 new->nlmsg_seq = hdr->nlmsg_seq;
438 new->nlmsg_pid = hdr->nlmsg_pid;
480 * @arg hdr Netlink message received from netlink socket.
483 * by \a hdr into the new message object.
487 struct nl_msg *nlmsg_convert(struct nlmsghdr *hdr)
491 nm = __nlmsg_alloc(NLMSG_ALIGN(hdr->nlmsg_len));
495 memcpy(nm->nm_nlh, hdr, hdr->nlmsg_len);
967 struct nlmsghdr *hdr = nlmsg_hdr(msg);
976 if (hdr->nlmsg_type == NLMSG_ERROR &&
977 hdr->nlmsg_len >= nlmsg_msg_size(sizeof(struct nlmsgerr))) {
979 struct nlmsgerr *err = nlmsg_data(hdr);
984 fprintf(ofd, " [ORIGINAL MESSAGE] %Zu octets\n", sizeof(*hdr));
989 } else if (nlmsg_len(hdr) > 0) {
991 int payloadlen = nlmsg_len(hdr);
995 hdr->nlmsg_type);
997 attrlen = nlmsg_attrlen(hdr, ops->co_hdrsize);
1002 dump_hex(ofd, nlmsg_data(hdr), payloadlen, 0);
1008 attrs = nlmsg_attrdata(hdr, ops->co_hdrsize);
1009 attrlen = nlmsg_attrlen(hdr, ops->co_hdrsize);