diff --git a/scapy/contrib/sebek.uts b/scapy/contrib/sebek.uts new file mode 100644 index 0000000000000000000000000000000000000000..de1be6b98cec454b87562ddb66e4a55c5fde599d --- /dev/null +++ b/scapy/contrib/sebek.uts @@ -0,0 +1,30 @@ +# Sebek layer unit tests +# +# Type the following command to launch start the tests: +# $ test/run_tests -P "load_contrib('sebek')" -t scapy/contrib/sebek.uts + ++ Sebek protocol + += Layer binding 1 +pkt = IP() / UDP() / SebekHead() / SebekV1() +pkt.sport == pkt.dport == 1101 and pkt[SebekHead].version == 1 + += Packet dissection 1 +pkt = IP(str(pkt)) +pkt.sport == pkt.dport == 1101 and pkt[SebekHead].version == 1 + += Layer binding 2 +pkt = IP() / UDP() / SebekHead() / SebekV2Sock() +pkt.sport == pkt.dport == 1101 and pkt[SebekHead].version == 2 and pkt[SebekHead].type ==2 + += Packet dissection 2 +pkt = IP(str(pkt)) +pkt.sport == pkt.dport == 1101 and pkt[SebekHead].version == 2 and pkt[SebekHead].type ==2 + += Layer binding 3 +pkt = IPv6()/UDP()/SebekHead()/SebekV3() +pkt.sport == pkt.dport == 1101 and pkt[SebekHead].version == 3 + += Packet dissection 3 +pkt = IPv6(str(pkt)) +pkt.sport == pkt.dport == 1101 and pkt[SebekHead].version == 3