Lines Matching refs:nlmsghdr
107 void *nlmsg_data(const struct nlmsghdr *nlh) in nlmsg_data()
112 void *nlmsg_tail(const struct nlmsghdr *nlh) in nlmsg_tail()
123 int nlmsg_datalen(const struct nlmsghdr *nlh) in nlmsg_datalen()
128 static int nlmsg_len(const struct nlmsghdr *nlh) in nlmsg_len()
145 struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh, int hdrlen) in nlmsg_attrdata()
156 int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen) in nlmsg_attrlen()
168 int nlmsg_valid_hdr(const struct nlmsghdr *nlh, int hdrlen) in nlmsg_valid_hdr()
181 int nlmsg_ok(const struct nlmsghdr *nlh, int remaining) in nlmsg_ok()
183 return (remaining >= (int)sizeof(struct nlmsghdr) && in nlmsg_ok()
184 nlh->nlmsg_len >= sizeof(struct nlmsghdr) && in nlmsg_ok()
196 struct nlmsghdr *nlmsg_next(struct nlmsghdr *nlh, int *remaining) in nlmsg_next()
202 return (struct nlmsghdr *) ((unsigned char *) nlh + totlen); in nlmsg_next()
215 int nlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[], in nlmsg_parse()
233 struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh, int hdrlen, int attrtype) in nlmsg_find_attr()
246 int nlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype, in nlmsg_validate()
267 if (len < sizeof(struct nlmsghdr)) in __nlmsg_alloc()
268 len = sizeof(struct nlmsghdr); in __nlmsg_alloc()
324 struct nl_msg *nlmsg_inherit(struct nlmsghdr *hdr) in nlmsg_inherit()
330 struct nlmsghdr *new = nm->nm_nlh; in nlmsg_inherit()
351 struct nlmsghdr nlh = { in nlmsg_alloc_simple()
386 struct nl_msg *nlmsg_convert(struct nlmsghdr *hdr) in nlmsg_convert()
510 struct nlmsghdr *nlmsg_put(struct nl_msg *n, uint32_t pid, uint32_t seq, in nlmsg_put()
513 struct nlmsghdr *nlh; in nlmsg_put()
518 nlh = (struct nlmsghdr *) n->nm_nlh; in nlmsg_put()
543 struct nlmsghdr *nlmsg_hdr(struct nl_msg *n) in nlmsg_hdr()
802 struct nlmsghdr *nlh = nlmsg_hdr(msg); in print_hdr()
838 static void *print_genl_msg(struct nl_msg *msg, FILE *ofd, struct nlmsghdr *hdr, in print_genl_msg()
917 struct nlmsghdr *hdr = nlmsg_hdr(msg); in dump_error_msg()
935 static void print_msg(struct nl_msg *msg, FILE *ofd, struct nlmsghdr *hdr) in print_msg()
978 struct nlmsghdr *hdr = nlmsg_hdr(msg); in nl_msg_dump()
983 fprintf(ofd, " [NETLINK HEADER] %zu octets\n", sizeof(struct nlmsghdr)); in nl_msg_dump()