Lines Matching refs:hdrlen
117 int genlmsg_valid_hdr(struct nlmsghdr *nlh, int hdrlen) in genlmsg_valid_hdr() argument
125 if (genlmsg_len(ghdr) < NLMSG_ALIGN(hdrlen)) in genlmsg_valid_hdr()
151 int genlmsg_validate(struct nlmsghdr *nlh, int hdrlen, int maxtype, in genlmsg_validate() argument
156 if (!genlmsg_valid_hdr(nlh, hdrlen)) in genlmsg_validate()
160 return nla_validate(genlmsg_attrdata(ghdr, hdrlen), in genlmsg_validate()
161 genlmsg_attrlen(ghdr, hdrlen), maxtype, policy); in genlmsg_validate()
191 int genlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[], in genlmsg_parse() argument
196 if (!genlmsg_valid_hdr(nlh, hdrlen)) in genlmsg_parse()
200 return nla_parse(tb, maxtype, genlmsg_attrdata(ghdr, hdrlen), in genlmsg_parse()
201 genlmsg_attrlen(ghdr, hdrlen), policy); in genlmsg_parse()
259 void *genlmsg_user_data(const struct genlmsghdr *gnlh, const int hdrlen) in genlmsg_user_data() argument
261 return genlmsg_user_hdr(gnlh) + NLMSG_ALIGN(hdrlen); in genlmsg_user_data()
273 int genlmsg_user_datalen(const struct genlmsghdr *gnlh, const int hdrlen) in genlmsg_user_datalen() argument
275 return genlmsg_len(gnlh) - NLMSG_ALIGN(hdrlen); in genlmsg_user_datalen()
287 struct nlattr *genlmsg_attrdata(const struct genlmsghdr *gnlh, int hdrlen) in genlmsg_attrdata() argument
289 return genlmsg_user_data(gnlh, hdrlen); in genlmsg_attrdata()
302 int genlmsg_attrlen(const struct genlmsghdr *gnlh, int hdrlen) in genlmsg_attrlen() argument
304 return genlmsg_len(gnlh) - NLMSG_ALIGN(hdrlen); in genlmsg_attrlen()
349 int hdrlen, int flags, uint8_t cmd, uint8_t version) in genlmsg_put() argument
357 nlh = nlmsg_put(msg, port, seq, family, GENL_HDRLEN + hdrlen, flags); in genlmsg_put()