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