Lines Matching defs:xsinfo
235 struct xfrm_usersa_info xsinfo;
249 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsinfo));
252 req.xsinfo.family = preferred_family;
254 req.xsinfo.lft.soft_byte_limit = XFRM_INF;
255 req.xsinfo.lft.hard_byte_limit = XFRM_INF;
256 req.xsinfo.lft.soft_packet_limit = XFRM_INF;
257 req.xsinfo.lft.hard_packet_limit = XFRM_INF;
262 xfrm_mode_parse(&req.xsinfo.mode, &argc, &argv);
265 xfrm_reqid_parse(&req.xsinfo.reqid, &argc, &argv);
268 xfrm_seq_parse(&req.xsinfo.seq, &argc, &argv);
271 if (get_u8(&req.xsinfo.replay_window, *argv, 0))
283 xfrm_state_flag_parse(&req.xsinfo.flags, &argc, &argv);
286 xfrm_selector_parse(&req.xsinfo.sel, &argc, &argv);
289 xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv);
421 xfrm_id_parse(&req.xsinfo.saddr, &req.xsinfo.id,
422 &req.xsinfo.family, 0, &argc, &argv);
424 preferred_family = req.xsinfo.family;
439 switch (req.xsinfo.mode) {
442 if (!xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) {
444 strxf_xfrmproto(req.xsinfo.id.proto));
450 if (!xfrm_xfrmproto_is_ro(req.xsinfo.id.proto)) {
452 strxf_xfrmproto(req.xsinfo.id.proto));
455 if (req.xsinfo.id.spi != 0) {
457 strxf_xfrmproto(req.xsinfo.id.proto));
466 if (!xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) {
468 strxf_xfrmproto(req.xsinfo.id.proto));
472 if (xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) {
474 strxf_xfrmproto(req.xsinfo.id.proto));
480 if (!xfrm_xfrmproto_is_ro(req.xsinfo.id.proto)) {
482 strxf_xfrmproto(req.xsinfo.id.proto));
486 if (xfrm_xfrmproto_is_ro(req.xsinfo.id.proto)) {
488 strxf_xfrmproto(req.xsinfo.id.proto));
496 if (req.xsinfo.family == AF_UNSPEC)
497 req.xsinfo.family = AF_INET;
531 req.xsinfo.lft.soft_byte_limit = XFRM_INF;
532 req.xsinfo.lft.hard_byte_limit = XFRM_INF;
533 req.xsinfo.lft.soft_packet_limit = XFRM_INF;
534 req.xsinfo.lft.hard_packet_limit = XFRM_INF;
637 static int xfrm_state_filter_match(struct xfrm_usersa_info *xsinfo)
643 if (xfrm_addr_match(&xsinfo->saddr, &filter.xsinfo.saddr,
647 if (xfrm_addr_match(&xsinfo->id.daddr, &filter.xsinfo.id.daddr,
650 if ((xsinfo->id.proto^filter.xsinfo.id.proto)&filter.id_proto_mask)
652 if ((xsinfo->id.spi^filter.xsinfo.id.spi)&filter.id_spi_mask)
654 if ((xsinfo->mode^filter.xsinfo.mode)&filter.mode_mask)
656 if ((xsinfo->reqid^filter.xsinfo.reqid)&filter.reqid_mask)
659 if ((xsinfo->flags & filter.xsinfo.flags) == 0)
671 struct xfrm_usersa_info *xsinfo = NULL;
691 xsinfo = &xexp->state;
695 xsinfo = NLMSG_DATA(n);
696 len -= NLMSG_SPACE(sizeof(*xsinfo));
704 if (xsinfo && !xfrm_state_filter_match(xsinfo))
719 rta = XFRMS_RTA(xsinfo);
730 if (RTA_PAYLOAD(tb[XFRMA_SA]) < sizeof(*xsinfo)) {
734 xsinfo = RTA_DATA(tb[XFRMA_SA]);
737 xfrm_state_info_print(xsinfo, tb, fp, NULL, NULL);
832 struct xfrm_usersa_info *xsinfo = NLMSG_DATA(n);
843 len -= NLMSG_LENGTH(sizeof(*xsinfo));
849 if (!xfrm_state_filter_match(xsinfo))
864 xsid->family = xsinfo->family;
865 memcpy(&xsid->daddr, &xsinfo->id.daddr, sizeof(xsid->daddr));
866 xsid->spi = xsinfo->id.spi;
867 xsid->proto = xsinfo->id.proto;
869 addattr_l(new_n, xb->size, XFRMA_SRCADDR, &xsinfo->saddr,
885 filter.xsinfo.family = preferred_family;
890 xfrm_mode_parse(&filter.xsinfo.mode, &argc, &argv);
896 xfrm_reqid_parse(&filter.xsinfo.reqid, &argc, &argv);
902 xfrm_state_flag_parse(&filter.xsinfo.flags, &argc, &argv);
912 xfrm_id_parse(&filter.xsinfo.saddr, &filter.xsinfo.id,
913 &filter.xsinfo.family, 1, &argc, &argv);
915 preferred_family = filter.xsinfo.family;