Lines Matching refs:parser

228 nl_parse_header(void *hdr, int len, const struct nlhdr_parser *parser,  in nl_parse_header()  argument
233 if (__predict_false(len < parser->nl_hdr_off)) { in nl_parse_header()
236 parser->nl_hdr_off, len); in nl_parse_header()
241 void *tmp_hdr = npt_alloc(npt, parser->nl_hdr_off); in nl_parse_header()
246 len = parser->nl_hdr_off; in nl_parse_header()
249 if (npt->strict && parser->sp != NULL && !parser->sp(hdr, npt)) in nl_parse_header()
253 for (int i = 0; i < parser->fp_size; i++) { in nl_parse_header()
254 const struct nlfield_parser *fp = &parser->fp[i]; in nl_parse_header()
263 struct nlattr *nla_head = (struct nlattr *)((char *)hdr + parser->nl_hdr_off); in nl_parse_header()
264 error = nl_parse_attrs_raw(nla_head, len - parser->nl_hdr_off, parser->np, in nl_parse_header()
265 parser->np_size, npt, target); in nl_parse_header()
267 if (parser->post_parse != NULL && error == 0) { in nl_parse_header()
268 if (!parser->post_parse(target, npt)) in nl_parse_header()
276 nl_parse_nested(struct nlattr *nla, const struct nlhdr_parser *parser, in nl_parse_nested() argument
281 return (nl_parse_attrs_raw(nla_head, NLA_DATA_LEN(nla), parser->np, in nl_parse_nested()
282 parser->np_size, npt, target)); in nl_parse_nested()
289 nl_verify_parsers(const struct nlhdr_parser **parser, int count) in nl_verify_parsers() argument
293 const struct nlhdr_parser *p = parser[i]; in nl_verify_parsers()
310 void nl_verify_parsers(const struct nlhdr_parser **parser, int count);
314 nl_parse_nlmsg(struct nlmsghdr *hdr, const struct nlhdr_parser *parser, in nl_parse_nlmsg() argument
317 return (nl_parse_header(hdr + 1, hdr->nlmsg_len - sizeof(*hdr), parser, npt, target)); in nl_parse_nlmsg()
321 nl_get_attrs_bmask_nlmsg(struct nlmsghdr *hdr, const struct nlhdr_parser *parser, in nl_get_attrs_bmask_nlmsg() argument
326 nla_head = (struct nlattr *)((char *)(hdr + 1) + parser->nl_hdr_off); in nl_get_attrs_bmask_nlmsg()
327 int len = hdr->nlmsg_len - sizeof(*hdr) - parser->nl_hdr_off; in nl_get_attrs_bmask_nlmsg()