Home | History | Annotate | Download | only in ip

Lines Matching defs:xpinfo

249 		struct xfrm_userpolicy_info	xpinfo;
270 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xpinfo));
273 req.xpinfo.sel.family = preferred_family;
275 req.xpinfo.lft.soft_byte_limit = XFRM_INF;
276 req.xpinfo.lft.hard_byte_limit = XFRM_INF;
277 req.xpinfo.lft.soft_packet_limit = XFRM_INF;
278 req.xpinfo.lft.hard_packet_limit = XFRM_INF;
287 xfrm_policy_dir_parse(&req.xpinfo.dir, &argc, &argv);
301 if (get_u32(&req.xpinfo.index, *argv, 0))
313 req.xpinfo.action = XFRM_POLICY_ALLOW;
315 req.xpinfo.action = XFRM_POLICY_BLOCK;
320 if (get_u32(&req.xpinfo.priority, *argv, 0))
324 xfrm_policy_flag_parse(&req.xpinfo.flags, &argc,
328 xfrm_lifetime_cfg_parse(&req.xpinfo.lft, &argc, &argv);
352 xfrm_selector_parse(&req.xpinfo.sel, &argc, &argv);
354 preferred_family = req.xpinfo.sel.family;
392 if (req.xpinfo.sel.family == AF_UNSPEC)
393 req.xpinfo.sel.family = AF_INET;
403 static int xfrm_policy_filter_match(struct xfrm_userpolicy_info *xpinfo,
409 if ((xpinfo->dir^filter.xpinfo.dir)&filter.dir_mask)
416 if (xfrm_addr_match(&xpinfo->sel.saddr, &filter.xpinfo.sel.saddr,
422 if (xfrm_addr_match(&xpinfo->sel.daddr, &filter.xpinfo.sel.daddr,
427 if ((xpinfo->sel.ifindex^filter.xpinfo.sel.ifindex)&filter.sel_dev_mask)
430 if ((xpinfo->sel.proto^filter.xpinfo.sel.proto)&filter.upspec_proto_mask)
434 if ((xpinfo->sel.sport^filter.xpinfo.sel.sport)&filter.upspec_sport_mask)
439 if ((xpinfo->sel.dport^filter.xpinfo.sel.dport)&filter.upspec_dport_mask)
443 if ((xpinfo->index^filter.xpinfo.index)&filter.index_mask)
446 if ((xpinfo->action^filter.xpinfo.action)&filter.action_mask)
449 if ((xpinfo->priority^filter.xpinfo.priority)&filter.priority_mask)
453 if ((xpinfo->flags & filter.xpinfo.flags) == 0)
464 struct xfrm_userpolicy_info *xpinfo = NULL;
485 xpinfo = &xpexp->pol;
489 xpinfo = NLMSG_DATA(n);
490 len -= NLMSG_SPACE(sizeof(*xpinfo));
503 rta = XFRMP_RTA(xpinfo);
518 if (xpinfo && !xfrm_policy_filter_match(xpinfo, ptype))
534 if (RTA_PAYLOAD(tb[XFRMA_POLICY]) < sizeof(*xpinfo)) {
538 xpinfo = (struct xfrm_userpolicy_info *)RTA_DATA(tb[XFRMA_POLICY]);
541 xfrm_policy_info_print(xpinfo, tb, fp, NULL, NULL);
712 struct xfrm_userpolicy_info *xpinfo = NLMSG_DATA(n);
725 len -= NLMSG_LENGTH(sizeof(*xpinfo));
731 parse_rtattr(tb, XFRMA_MAX, XFRMP_RTA(xpinfo), len);
744 if (!xfrm_policy_filter_match(xpinfo, ptype))
759 memcpy(&xpid->sel, &xpinfo->sel, sizeof(xpid->sel));
760 xpid->dir = xpinfo->dir;
761 xpid->index = xpinfo->index;
776 filter.xpinfo.sel.family = preferred_family;
781 xfrm_policy_dir_parse(&filter.xpinfo.dir, &argc, &argv);
787 if (get_u32(&filter.xpinfo.index, *argv, 0))
801 filter.xpinfo.action = XFRM_POLICY_ALLOW;
803 filter.xpinfo.action = XFRM_POLICY_BLOCK;
811 if (get_u32(&filter.xpinfo.priority, *argv, 0))
818 xfrm_policy_flag_parse(&filter.xpinfo.flags, &argc,
828 xfrm_selector_parse(&filter.xpinfo.sel, &argc, &argv);
830 preferred_family = filter.xpinfo.sel.family;