/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec add addconn
"addconn": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec add addconn--type=transport
"addconn--type=transport": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec add addconn--type=tunnel
"addconn--type=tunnel": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack                           --encrypt --host 1.2.3.4 --to --host 5.6.7.8
"whack": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--tunnel     --tunnel      --encrypt --host 1.2.3.4 --to --host 5.6.7.8
"whack--tunnel": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--transport  --transport   --encrypt --host 1.2.3.4 --to --host 5.6.7.8
"whack--transport": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec connectionstatus | sed -n -e 's/\(.* policy:\) .*TUNNEL.*/\1 TUNNEL/p'
"addconn":   policy: TUNNEL
"addconn--type=tunnel":   policy: TUNNEL
"whack":   policy: TUNNEL
"whack--tunnel":   policy: TUNNEL
west #
 ipsec connectionstatus | sed -n -e 's/\(.* policy:\) .*TRANSPORT.*/\1 TRANSPORT/p'
"addconn--type=transport":   policy: TRANSPORT
"whack--transport":   policy: TRANSPORT
west #
 
