From 2d5e5eb91c661ecab9a2b80364629c237015742a Mon Sep 17 00:00:00 2001 From: Guillaume Valadon <guillaume@valadon.net> Date: Thu, 25 Dec 2014 08:02:36 +0100 Subject: [PATCH] Simple unit tests --HG-- branch : GTP support --- scapy/contrib/gtp.uts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scapy/contrib/gtp.uts diff --git a/scapy/contrib/gtp.uts b/scapy/contrib/gtp.uts new file mode 100644 index 00000000..515f53c1 --- /dev/null +++ b/scapy/contrib/gtp.uts @@ -0,0 +1,10 @@ +# GTP unit tests +# +# Type the following command to launch start the tests: +# $ sudo bash test/run_tests -t scapy/contrib/gtp.uts -F + ++ GTPv1 + += GTPCreatePDPContextRequest(), basic instanciation +gtp = IP(str(IP()/UDP(sport=2123)/GTPHeader(teid=2807)/GTPCreatePDPContextRequest())) +str(gtp) == 'E\x00\x00(\x00\x01\x00\x00@\x11|\xc2\x7f\x00\x00\x01\x7f\x00\x00\x01\x08K\x08K\x00\x14\xb4"2\x10\x00\x04\x00\x00\n\xf7\x00\x00\x00\x00' -- GitLab