/testing/guestbin/swan-prep
west #
 send() { printf "$@" | ncat east 4500 ; }
west #
 # open the TCP socket
west #
 send ''
west #
 # open the TCP socket, send one byte
west #
 send '\0'
west #
 # open the TCP socket, send not IKETCP
west #
 send '123456'
west #
 # open the TCP socket, send IKETCP
west #
 send 'IKETCP'
west #
 # open the TCP socket, send IKETCP<byte>
west #
 send 'IKETCP\0'
west #
 # open the TCP socket, send IKETCP<0x0000>
west #
 send 'IKETCP\x0\x0'
Ncat: Connection reset by peer.
west #
 # open the TCP socket, send IKETCP<0x00ff>
west #
 send 'IKETCP\x0\xff'
west #
 # open the TCP socket, send IKETCP<0xffff>
west #
 send 'IKETCP\xff\xff'
west #
 ../../guestbin/ipsec-kernel-state.sh
west #
 ../../guestbin/ipsec-kernel-policy.sh
west #
 grep '^connection from' /tmp/pluto.log
west #
 
