Home | History | Annotate | Download | only in ip

Lines Matching refs:xsinfo

293 		struct xfrm_usersa_info xsinfo;
296 .n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsinfo)),
299 .xsinfo.family = preferred_family,
300 .xsinfo.lft.soft_byte_limit = XFRM_INF,
301 .xsinfo.lft.hard_byte_limit = XFRM_INF,
302 .xsinfo.lft.soft_packet_limit = XFRM_INF,
303 .xsinfo.lft.hard_packet_limit = XFRM_INF,
331 xfrm_mode_parse(&req.xsinfo.mode, &argc, &argv);
336 xfrm_reqid_parse(&req.xsinfo.reqid, &argc, &argv);
339 xfrm_seq_parse(&req.xsinfo.seq, &argc, &argv);
362 xfrm_state_flag_parse(&req.xsinfo.flags, &argc, &argv);
369 xfrm_selector_parse(&req.xsinfo.sel, &argc, &argv);
370 preferred_family = req.xsinfo.sel.family;
373 xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv);
561 xfrm_id_parse(&req.xsinfo.saddr, &req.xsinfo.id,
562 &req.xsinfo.family, 0, &argc, &argv);
564 preferred_family = req.xsinfo.family;
570 if (req.xsinfo.flags & XFRM_STATE_ESN &&
589 if (req.xsinfo.flags & XFRM_STATE_ESN ||
607 req.xsinfo.replay_window = replay_window;
628 if (xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) {
629 switch (req.xsinfo.mode) {
634 if (req.xsinfo.id.proto == IPPROTO_ESP)
638 strxf_xfrmproto(req.xsinfo.id.proto));
642 switch (req.xsinfo.id.proto) {
647 strxf_xfrmproto(req.xsinfo.id.proto));
654 strxf_xfrmproto(req.xsinfo.id.proto));
664 strxf_xfrmproto(req.xsinfo.id.proto));
671 strxf_xfrmproto(req.xsinfo.id.proto));
682 strxf_xfrmproto(req.xsinfo.id.proto));
688 strxf_xfrmproto(req.xsinfo.id.proto));
696 strxf_xfrmproto(req.xsinfo.id.proto));
701 if (xfrm_xfrmproto_is_ro(req.xsinfo.id.proto)) {
702 switch (req.xsinfo.mode) {
708 strxf_xfrmproto(req.xsinfo.id.proto));
712 strxf_xfrmproto(req.xsinfo.id.proto));
718 strxf_xfrmproto(req.xsinfo.id.proto));
724 strxf_xfrmproto(req.xsinfo.id.proto));
735 if (req.xsinfo.family == AF_UNSPEC)
736 req.xsinfo.family = AF_INET;
883 static int xfrm_state_filter_match(struct xfrm_usersa_info *xsinfo)
889 if (xfrm_addr_match(&xsinfo->saddr, &filter.xsinfo.saddr,
893 if (xfrm_addr_match(&xsinfo->id.daddr, &filter.xsinfo.id.daddr,
896 if ((xsinfo->id.proto^filter.xsinfo.id.proto)&filter.id_proto_mask)
898 if ((xsinfo->id.spi^filter.xsinfo.id.spi)&filter.id_spi_mask)
900 if ((xsinfo->mode^filter.xsinfo.mode)&filter.mode_mask)
902 if ((xsinfo->reqid^filter.xsinfo.reqid)&filter.reqid_mask)
905 if ((xsinfo->flags & filter.xsinfo.flags) == 0)
917 struct xfrm_usersa_info *xsinfo = NULL;
937 xsinfo = &xexp->state;
941 xsinfo = NLMSG_DATA(n);
942 len -= NLMSG_SPACE(sizeof(*xsinfo));
950 if (xsinfo && !xfrm_state_filter_match(xsinfo))
965 rta = XFRMS_RTA(xsinfo);
976 if (RTA_PAYLOAD(tb[XFRMA_SA]) < sizeof(*xsinfo)) {
980 xsinfo = RTA_DATA(tb[XFRMA_SA]);
983 xfrm_state_info_print(xsinfo, tb, fp, NULL, NULL);
1088 struct xfrm_usersa_info *xsinfo = NLMSG_DATA(n);
1100 len -= NLMSG_LENGTH(sizeof(*xsinfo));
1106 if (!xfrm_state_filter_match(xsinfo))
1121 xsid->family = xsinfo->family;
1122 memcpy(&xsid->daddr, &xsinfo->id.daddr, sizeof(xsid->daddr));
1123 xsid->spi = xsinfo->id.spi;
1124 xsid->proto = xsinfo->id.proto;
1126 addattr_l(new_n, xb->size, XFRMA_SRCADDR, &xsinfo->saddr,
1129 parse_rtattr(tb, XFRMA_MAX, XFRMS_RTA(xsinfo), len);
1153 filter.xsinfo.family = preferred_family;
1158 xfrm_mode_parse(&filter.xsinfo.mode, &argc, &argv);
1164 xfrm_reqid_parse(&filter.xsinfo.reqid, &argc, &argv);
1170 xfrm_state_flag_parse(&filter.xsinfo.flags, &argc, &argv);
1180 xfrm_id_parse(&filter.xsinfo.saddr, &filter.xsinfo.id,
1181 &filter.xsinfo.family, 1, &argc, &argv);
1183 preferred_family = filter.xsinfo.family;
1245 .saddr = filter.xsinfo.saddr,
1246 .daddr = filter.xsinfo.id.daddr,
1247 .family = filter.xsinfo.family,
1261 if (filter.xsinfo.id.proto)
1263 filter.xsinfo.id.proto);