Wireshark mailing list archives

Determine address type of string


From: Jo <wireshark () rueschel de>
Date: Mon, 9 Nov 2015 10:14:19 +0100

Hello,

I am writing a custom dissector as a plugin. There I need to determine
the address type of a string in a TLV. It can be either an IPv4
address, IPv6 address or a FQDN.

What is the best way to parse this string into the Wireshark data types?

My idea was to check which delimieters occur ("." -> IPv4, ":" ->
IPv6) iand if there dots, to check whether the parts between the dots
are numerical.

Bye,
Jo
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: