Wireshark-dev: Re: [Wireshark-dev] 4bytes to IP number (string)

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 28 Aug 2008 09:31:39 -0700

On Aug 28, 2008, at 9:28 AM, Tom Stevens wrote:

Is there a built-in function that converts 4 bytes to a string, according to the generally accepted IP Notation?
Example: C0 A8 D3 0D --->  192.168.211.13

ip_to_str() - it takes a "const guint8 *" as an argument, pointing to the first byte of an IP address (in *network* byte order, not *host* byte order), and returns a string pointer.