Lines Matching refs:xsinfo
227 struct xfrm_usersa_info xsinfo;
237 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsinfo));
240 req.xsinfo.family = preferred_family;
242 req.xsinfo.lft.soft_byte_limit = XFRM_INF;
243 req.xsinfo.lft.hard_byte_limit = XFRM_INF;
244 req.xsinfo.lft.soft_packet_limit = XFRM_INF;
245 req.xsinfo.lft.hard_packet_limit = XFRM_INF;
250 xfrm_mode_parse(&req.xsinfo.mode, &argc, &argv);
253 xfrm_reqid_parse(&req.xsinfo.reqid, &argc, &argv);
256 xfrm_seq_parse(&req.xsinfo.seq, &argc, &argv);
259 if (get_u8(&req.xsinfo.replay_window, *argv, 0))
263 xfrm_state_flag_parse(&req.xsinfo.flags, &argc, &argv);
266 xfrm_selector_parse(&req.xsinfo.sel, &argc, &argv);
269 xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv);
353 xfrm_id_parse(&req.xsinfo.saddr, &req.xsinfo.id,
354 &req.xsinfo.family, 0, &argc, &argv);
356 preferred_family = req.xsinfo.family;
368 if (req.xsinfo.id.proto != IPPROTO_ESP &&
369 req.xsinfo.id.proto != IPPROTO_AH &&
370 req.xsinfo.id.proto != IPPROTO_COMP) {
371 fprintf(stderr, "\"ALGO\" is invalid with proto=%s\n", strxf_xfrmproto(req.xsinfo.id.proto));
375 if (req.xsinfo.id.proto == IPPROTO_ESP ||
376 req.xsinfo.id.proto == IPPROTO_AH ||
377 req.xsinfo.id.proto == IPPROTO_COMP) {
378 fprintf(stderr, "\"ALGO\" is required with proto=%s\n", strxf_xfrmproto(req.xsinfo.id.proto));
386 if (req.xsinfo.family == AF_UNSPEC)
387 req.xsinfo.family = AF_INET;
421 req.xsinfo.lft.soft_byte_limit = XFRM_INF;
422 req.xsinfo.lft.hard_byte_limit = XFRM_INF;
423 req.xsinfo.lft.soft_packet_limit = XFRM_INF;
424 req.xsinfo.lft.hard_packet_limit = XFRM_INF;
527 static int xfrm_state_filter_match(struct xfrm_usersa_info *xsinfo)
533 if (xfrm_addr_match(&xsinfo->saddr, &filter.xsinfo.saddr,
537 if (xfrm_addr_match(&xsinfo->id.daddr, &filter.xsinfo.id.daddr,
540 if ((xsinfo->id.proto^filter.xsinfo.id.proto)&filter.id_proto_mask)
542 if ((xsinfo->id.spi^filter.xsinfo.id.spi)&filter.id_spi_mask)
544 if ((xsinfo->mode^filter.xsinfo.mode)&filter.mode_mask)
546 if ((xsinfo->reqid^filter.xsinfo.reqid)&filter.reqid_mask)
549 if ((xsinfo->flags & filter.xsinfo.flags) == 0)
559 struct xfrm_usersa_info *xsinfo;
575 xsinfo = &xexp->state;
580 xsinfo = NLMSG_DATA(n);
582 len -= NLMSG_LENGTH(sizeof(*xsinfo));
590 if (!xfrm_state_filter_match(xsinfo))
596 rta = XFRMS_RTA(xsinfo);
605 xfrm_state_info_print(xsinfo, tb, fp, NULL, NULL);
699 struct xfrm_usersa_info *xsinfo = NLMSG_DATA(n);
710 len -= NLMSG_LENGTH(sizeof(*xsinfo));
716 if (!xfrm_state_filter_match(xsinfo))
731 xsid->family = xsinfo->family;
732 memcpy(&xsid->daddr, &xsinfo->id.daddr, sizeof(xsid->daddr));
733 xsid->spi = xsinfo->id.spi;
734 xsid->proto = xsinfo->id.proto;
749 filter.xsinfo.family = preferred_family;
754 xfrm_mode_parse(&filter.xsinfo.mode, &argc, &argv);
760 xfrm_reqid_parse(&filter.xsinfo.reqid, &argc, &argv);
766 xfrm_state_flag_parse(&filter.xsinfo.flags, &argc, &argv);
776 xfrm_id_parse(&filter.xsinfo.saddr, &filter.xsinfo.id,
777 &filter.xsinfo.family, 1, &argc, &argv);
779 preferred_family = filter.xsinfo.family;