• Home
  • Raw
  • Download

Lines Matching refs:req

244 	} req;  in xfrm_state_modify()  local
254 memset(&req, 0, sizeof(req)); in xfrm_state_modify()
257 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsinfo)); in xfrm_state_modify()
258 req.n.nlmsg_flags = NLM_F_REQUEST|flags; in xfrm_state_modify()
259 req.n.nlmsg_type = cmd; in xfrm_state_modify()
260 req.xsinfo.family = preferred_family; in xfrm_state_modify()
262 req.xsinfo.lft.soft_byte_limit = XFRM_INF; in xfrm_state_modify()
263 req.xsinfo.lft.hard_byte_limit = XFRM_INF; in xfrm_state_modify()
264 req.xsinfo.lft.soft_packet_limit = XFRM_INF; in xfrm_state_modify()
265 req.xsinfo.lft.hard_packet_limit = XFRM_INF; in xfrm_state_modify()
270 xfrm_mode_parse(&req.xsinfo.mode, &argc, &argv); in xfrm_state_modify()
275 xfrm_reqid_parse(&req.xsinfo.reqid, &argc, &argv); in xfrm_state_modify()
278 xfrm_seq_parse(&req.xsinfo.seq, &argc, &argv); in xfrm_state_modify()
281 if (get_u8(&req.xsinfo.replay_window, *argv, 0)) in xfrm_state_modify()
293 xfrm_state_flag_parse(&req.xsinfo.flags, &argc, &argv); in xfrm_state_modify()
296 xfrm_selector_parse(&req.xsinfo.sel, &argc, &argv); in xfrm_state_modify()
299 xfrm_lifetime_cfg_parse(&req.xsinfo.lft, &argc, &argv); in xfrm_state_modify()
316 addattr_l(&req.n, sizeof(req.buf), XFRMA_ENCAP, in xfrm_state_modify()
337 addattr_l(&req.n, sizeof(req.buf), XFRMA_COADDR, in xfrm_state_modify()
420 addattr_l(&req.n, sizeof(req.buf), type, in xfrm_state_modify()
431 xfrm_id_parse(&req.xsinfo.saddr, &req.xsinfo.id, in xfrm_state_modify()
432 &req.xsinfo.family, 0, &argc, &argv); in xfrm_state_modify()
434 preferred_family = req.xsinfo.family; in xfrm_state_modify()
441 addattr_l(&req.n, sizeof(req.buf), XFRMA_REPLAY_VAL, in xfrm_state_modify()
450 int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK, in xfrm_state_modify()
458 switch (req.xsinfo.mode) { in xfrm_state_modify()
461 if (!xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) { in xfrm_state_modify()
463 strxf_xfrmproto(req.xsinfo.id.proto)); in xfrm_state_modify()
469 if (!xfrm_xfrmproto_is_ro(req.xsinfo.id.proto)) { in xfrm_state_modify()
471 strxf_xfrmproto(req.xsinfo.id.proto)); in xfrm_state_modify()
474 if (req.xsinfo.id.spi != 0) { in xfrm_state_modify()
476 strxf_xfrmproto(req.xsinfo.id.proto)); in xfrm_state_modify()
485 if (!xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) { in xfrm_state_modify()
487 strxf_xfrmproto(req.xsinfo.id.proto)); in xfrm_state_modify()
491 if (xfrm_xfrmproto_is_ipsec(req.xsinfo.id.proto)) { in xfrm_state_modify()
493 strxf_xfrmproto(req.xsinfo.id.proto)); in xfrm_state_modify()
499 if (!xfrm_xfrmproto_is_ro(req.xsinfo.id.proto)) { in xfrm_state_modify()
501 strxf_xfrmproto(req.xsinfo.id.proto)); in xfrm_state_modify()
505 if (xfrm_xfrmproto_is_ro(req.xsinfo.id.proto)) { in xfrm_state_modify()
507 strxf_xfrmproto(req.xsinfo.id.proto)); in xfrm_state_modify()
515 if (req.xsinfo.family == AF_UNSPEC) in xfrm_state_modify()
516 req.xsinfo.family = AF_INET; in xfrm_state_modify()
518 if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0) in xfrm_state_modify()
533 } req; in xfrm_state_allocspi() local
543 memset(&req, 0, sizeof(req)); in xfrm_state_allocspi()
545 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xspi)); in xfrm_state_allocspi()
546 req.n.nlmsg_flags = NLM_F_REQUEST; in xfrm_state_allocspi()
547 req.n.nlmsg_type = XFRM_MSG_ALLOCSPI; in xfrm_state_allocspi()
548 req.xspi.info.family = preferred_family; in xfrm_state_allocspi()
551 req.xsinfo.lft.soft_byte_limit = XFRM_INF; in xfrm_state_allocspi()
552 req.xsinfo.lft.hard_byte_limit = XFRM_INF; in xfrm_state_allocspi()
553 req.xsinfo.lft.soft_packet_limit = XFRM_INF; in xfrm_state_allocspi()
554 req.xsinfo.lft.hard_packet_limit = XFRM_INF; in xfrm_state_allocspi()
560 xfrm_mode_parse(&req.xspi.info.mode, &argc, &argv); in xfrm_state_allocspi()
565 xfrm_reqid_parse(&req.xspi.info.reqid, &argc, &argv); in xfrm_state_allocspi()
568 xfrm_seq_parse(&req.xspi.info.seq, &argc, &argv); in xfrm_state_allocspi()
576 if (get_u32(&req.xspi.min, *argv, 0)) in xfrm_state_allocspi()
585 if (get_u32(&req.xspi.max, *argv, 0)) in xfrm_state_allocspi()
594 xfrm_id_parse(&req.xspi.info.saddr, &req.xspi.info.id, in xfrm_state_allocspi()
595 &req.xspi.info.family, 0, &argc, &argv); in xfrm_state_allocspi()
596 if (req.xspi.info.id.spi) { in xfrm_state_allocspi()
601 preferred_family = req.xspi.info.family; in xfrm_state_allocspi()
616 if (req.xspi.min > req.xspi.max) { in xfrm_state_allocspi()
629 req.xspi.min = 0x100; in xfrm_state_allocspi()
630 req.xspi.max = 0x0fffffff; in xfrm_state_allocspi()
635 if (req.xspi.info.id.proto == IPPROTO_COMP) in xfrm_state_allocspi()
636 req.xspi.max = 0xffff; in xfrm_state_allocspi()
640 int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK, in xfrm_state_allocspi()
651 if (req.xspi.info.family == AF_UNSPEC) in xfrm_state_allocspi()
652 req.xspi.info.family = AF_INET; in xfrm_state_allocspi()
655 if (rtnl_talk(&rth, &req.n, 0, 0, res_n, NULL, NULL) < 0) in xfrm_state_allocspi()
790 } req; in xfrm_state_get_or_delete() local
795 memset(&req, 0, sizeof(req)); in xfrm_state_get_or_delete()
797 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsid)); in xfrm_state_get_or_delete()
798 req.n.nlmsg_flags = NLM_F_REQUEST; in xfrm_state_get_or_delete()
799 req.n.nlmsg_type = delete ? XFRM_MSG_DELSA : XFRM_MSG_GETSA; in xfrm_state_get_or_delete()
800 req.xsid.family = preferred_family; in xfrm_state_get_or_delete()
815 xfrm_id_parse(&saddr, &id, &req.xsid.family, 0, in xfrm_state_get_or_delete()
818 memcpy(&req.xsid.daddr, &id.daddr, sizeof(req.xsid.daddr)); in xfrm_state_get_or_delete()
819 req.xsid.spi = id.spi; in xfrm_state_get_or_delete()
820 req.xsid.proto = id.proto; in xfrm_state_get_or_delete()
822 addattr_l(&req.n, sizeof(req.buf), XFRMA_SRCADDR, in xfrm_state_get_or_delete()
830 int r = addattr_l(&req.n, sizeof(req.buf), XFRMA_MARK, in xfrm_state_get_or_delete()
841 if (req.xsid.family == AF_UNSPEC) in xfrm_state_get_or_delete()
842 req.xsid.family = AF_INET; in xfrm_state_get_or_delete()
845 if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0) in xfrm_state_get_or_delete()
853 if (rtnl_talk(&rth, &req.n, 0, 0, res_n, NULL, NULL) < 0) in xfrm_state_get_or_delete()
1083 } req; in xfrm_sad_getinfo() local
1085 memset(&req, 0, sizeof(req)); in xfrm_sad_getinfo()
1086 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.flags)); in xfrm_sad_getinfo()
1087 req.n.nlmsg_flags = NLM_F_REQUEST; in xfrm_sad_getinfo()
1088 req.n.nlmsg_type = XFRM_MSG_GETSADINFO; in xfrm_sad_getinfo()
1089 req.flags = 0XFFFFFFFF; in xfrm_sad_getinfo()
1094 if (rtnl_talk(&rth, &req.n, 0, 0, &req.n, NULL, NULL) < 0) in xfrm_sad_getinfo()
1097 print_sadinfo(&req.n, (void*)stdout); in xfrm_sad_getinfo()
1110 } req; in xfrm_state_flush() local
1113 memset(&req, 0, sizeof(req)); in xfrm_state_flush()
1115 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.xsf)); in xfrm_state_flush()
1116 req.n.nlmsg_flags = NLM_F_REQUEST; in xfrm_state_flush()
1117 req.n.nlmsg_type = XFRM_MSG_FLUSHSA; in xfrm_state_flush()
1118 req.xsf.proto = 0; in xfrm_state_flush()
1134 req.xsf.proto = (__u8)ret; in xfrm_state_flush()
1146 strxf_xfrmproto(req.xsf.proto)); in xfrm_state_flush()
1148 if (rtnl_talk(&rth, &req.n, 0, 0, NULL, NULL, NULL) < 0) in xfrm_state_flush()