ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] using inet_ntop4

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Wed, 23 Mar 2005 11:28:59 -0800
alok wrote:

Or do we need to make our own snprintf and replicate it in code.....

No. To convert an IPv4 address to a string, use "ip_to_str()" or "ip_to_str_buf()". It doesn't use "snprintf()", it does a table lookup - the table is an array of 256 pointers to strings.