Home | History | Annotate | Download | only in ip

Lines Matching refs:xsinfo

274 		struct xfrm_usersa_info xsinfo;
300 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsinfo));
303 req.xsinfo.family = preferred_family;
305 req.xsinfo.lft.soft_byte_limit = XFRM_INF;
306 req.xsinfo.lft.hard_byte_limit = XFRM_INF;
307 req.xsinfo.lft.soft_packet_limit = XFRM_INF;
308 req.xsinfo.lft.hard_packet_limit = XFRM_INF;
313 xfrm_mode_parse(&req.xsinfo.mode, &argc, &argv);
318 xfrm_reqid_parse(&req.xsinfo.reqid, &argc, &argv);
321 xfrm_seq_parse(&req.xsinfo.seq, &argc, &argv);
344 xfrm_state_flag_parse(&req.xsinfo.flags, &argc, &argv);
351 xfrm_selector_parse(&req.xsinfo.sel, &argc, &argv);
352 preferred_family = req.xsinfo.sel.family;
355 xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv);
522 xfrm_id_parse(&req.xsinfo.saddr, &req.xsinfo.id,
523 &req.xsinfo.family, 0, &argc, &argv);
525 preferred_family = req.xsinfo.family;
531 if (req.xsinfo.flags & XFRM_STATE_ESN &&
544 if (req.xsinfo.flags & XFRM_STATE_ESN ||
562 req.xsinfo.replay_window = replay_window;
583 if (xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) {
584 switch (req.xsinfo.mode) {
589 if (req.xsinfo.id.proto == IPPROTO_ESP)
593 strxf_xfrmproto(req.xsinfo.id.proto));
597 switch (req.xsinfo.id.proto) {
602 strxf_xfrmproto(req.xsinfo.id.proto));
609 strxf_xfrmproto(req.xsinfo.id.proto));
619 strxf_xfrmproto(req.xsinfo.id.proto));
626 strxf_xfrmproto(req.xsinfo.id.proto));
637 strxf_xfrmproto(req.xsinfo.id.proto));
643 strxf_xfrmproto(req.xsinfo.id.proto));
651 strxf_xfrmproto(req.xsinfo.id.proto));
656 if (xfrm_xfrmproto_is_ro(req.xsinfo.id.proto)) {
657 switch (req.xsinfo.mode) {
663 strxf_xfrmproto(req.xsinfo.id.proto));
667 strxf_xfrmproto(req.xsinfo.id.proto));
673 strxf_xfrmproto(req.xsinfo.id.proto));
679 strxf_xfrmproto(req.xsinfo.id.proto));
687 if (req.xsinfo.family == AF_UNSPEC)
688 req.xsinfo.family = AF_INET;
723 req.xsinfo.lft.soft_byte_limit = XFRM_INF;
724 req.xsinfo.lft.hard_byte_limit = XFRM_INF;
725 req.xsinfo.lft.soft_packet_limit = XFRM_INF;
726 req.xsinfo.lft.hard_packet_limit = XFRM_INF;
840 static int xfrm_state_filter_match(struct xfrm_usersa_info *xsinfo)
846 if (xfrm_addr_match(&xsinfo->saddr, &filter.xsinfo.saddr,
850 if (xfrm_addr_match(&xsinfo->id.daddr, &filter.xsinfo.id.daddr,
853 if ((xsinfo->id.proto^filter.xsinfo.id.proto)&filter.id_proto_mask)
855 if ((xsinfo->id.spi^filter.xsinfo.id.spi)&filter.id_spi_mask)
857 if ((xsinfo->mode^filter.xsinfo.mode)&filter.mode_mask)
859 if ((xsinfo->reqid^filter.xsinfo.reqid)&filter.reqid_mask)
862 if ((xsinfo->flags & filter.xsinfo.flags) == 0)
874 struct xfrm_usersa_info *xsinfo = NULL;
894 xsinfo = &xexp->state;
898 xsinfo = NLMSG_DATA(n);
899 len -= NLMSG_SPACE(sizeof(*xsinfo));
907 if (xsinfo && !xfrm_state_filter_match(xsinfo))
922 rta = XFRMS_RTA(xsinfo);
933 if (RTA_PAYLOAD(tb[XFRMA_SA]) < sizeof(*xsinfo)) {
937 xsinfo = RTA_DATA(tb[XFRMA_SA]);
940 xfrm_state_info_print(xsinfo, tb, fp, NULL, NULL);
1049 struct xfrm_usersa_info *xsinfo = NLMSG_DATA(n);
1060 len -= NLMSG_LENGTH(sizeof(*xsinfo));
1066 if (!xfrm_state_filter_match(xsinfo))
1081 xsid->family = xsinfo->family;
1082 memcpy(&xsid->daddr, &xsinfo->id.daddr, sizeof(xsid->daddr));
1083 xsid->spi = xsinfo->id.spi;
1084 xsid->proto = xsinfo->id.proto;
1086 addattr_l(new_n, xb->size, XFRMA_SRCADDR, &xsinfo->saddr,
1102 filter.xsinfo.family = preferred_family;
1107 xfrm_mode_parse(&filter.xsinfo.mode, &argc, &argv);
1113 xfrm_reqid_parse(&filter.xsinfo.reqid, &argc, &argv);
1119 xfrm_state_flag_parse(&filter.xsinfo.flags, &argc, &argv);
1129 xfrm_id_parse(&filter.xsinfo.saddr, &filter.xsinfo.id,
1130 &filter.xsinfo.family, 1, &argc, &argv);
1132 preferred_family = filter.xsinfo.family;
1194 .saddr = filter.xsinfo.saddr,
1195 .daddr = filter.xsinfo.id.daddr,
1196 .family = filter.xsinfo.family,
1210 if (filter.xsinfo.id.proto)
1212 filter.xsinfo.id.proto);