IPV4Address ia("127.0.0.1"); char addr[16]; memset(addr,0,16); strncpy(addr,inet_ntoa(ia.getAddress()),15);
---------- Bug-commoncpp Digest, Vol 28, Issue 1 ------------------------------ Message: 8 Date: Tue, 31 May 2005 16:15:52 -0400 (EDT) From: Ken Sewell <[EMAIL PROTECTED]> Subject: Getting numeric ip address string To: Common C++ mailing list <bug-commoncpp@gnu.org> Message-ID: <[EMAIL PROTECTED]> Content-Type: TEXT/PLAIN; charset=US-ASCII I've very new to CommonC++ so I apologize if this is addresses elsewhere ( if so I haven't been able to find it ). I'm using the IPV4Address class and I'm setting the address, lets say to "127.0.0.1" for this example. How can I retrieve this? The only call that seems to return a string is getHostname() which returns "localhost". Is there a function to return the ip address in a string and give me back the original "127.0.0.1"? Thanks for any help. Ken Sewell Defense Research Associates Project Engineer 3915 Germany Lane, Suite 102 937-656-4899 x3004 Beavercreek, Ohio 45431-1608 [EMAIL PROTECTED] End of Bug-commoncpp Digest, Vol 28, Issue 1 ******************************************** _______________________________________________ Bug-commoncpp mailing list Bug-commoncpp@gnu.org http://lists.gnu.org/mailman/listinfo/bug-commoncpp