diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-07-26 22:15:25 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-07-27 01:28:44 +0000 |
commit | fed443e7996aae36a3f2dda55ab06e6ebe05e07a (patch) | |
tree | de1b742474fd7867acd7a728bfa0107b771372d7 /randpkt_core | |
parent | 9a73978ba5bbb78026721500aaf332f53e19d0cd (diff) | |
download | wireshark-fed443e7996aae36a3f2dda55ab06e6ebe05e07a.tar.gz wireshark-fed443e7996aae36a3f2dda55ab06e6ebe05e07a.tar.bz2 wireshark-fed443e7996aae36a3f2dda55ab06e6ebe05e07a.zip |
randpkt: Add support to generate IPv6
Change-Id: I23e68ef204486f6e3e388172cfa8701a595fcedc
Reviewed-on: https://code.wireshark.org/review/16707
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'randpkt_core')
-rw-r--r-- | randpkt_core/randpkt_core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/randpkt_core/randpkt_core.c b/randpkt_core/randpkt_core.c index 8e7bce1a69..6dcc9deb2b 100644 --- a/randpkt_core/randpkt_core.c +++ b/randpkt_core/randpkt_core.c @@ -47,6 +47,7 @@ enum { PKT_GIOP, PKT_ICMP, PKT_IP, + PKT_IPv6, PKT_LLC, PKT_M2M, PKT_MEGACO, @@ -110,6 +111,14 @@ guint8 pkt_ip[] = { 0x08, 0x00 }; +/* Ethernet, indicating IPv6 */ +guint8 pkt_ipv6[] = { + 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, + 0x86, 0xdd +}; + /* TR, indicating LLC */ guint8 pkt_llc[] = { 0x10, 0x40, 0x68, 0x00, @@ -416,6 +425,14 @@ static randpkt_example examples[] = { 1000, }, + { "ipv6", "Internet Protocol Version 6", + PKT_IPv6, WTAP_ENCAP_ETHERNET, + pkt_ipv6, array_length(pkt_ipv6), + NULL, 0, + NULL, NULL, + 1000, + }, + { "llc", "Logical Link Control", PKT_LLC, WTAP_ENCAP_TOKEN_RING, pkt_llc, array_length(pkt_llc), |