From fed443e7996aae36a3f2dda55ab06e6ebe05e07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Tue, 26 Jul 2016 22:15:25 +0100 Subject: randpkt: Add support to generate IPv6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I23e68ef204486f6e3e388172cfa8701a595fcedc Reviewed-on: https://code.wireshark.org/review/16707 Reviewed-by: Dario Lombardo Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde --- randpkt_core/randpkt_core.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'randpkt_core') 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), -- cgit v1.2.3