From 4a8e1c0e43f7c70d84d1f0b850e66a32c00a47b8 Mon Sep 17 00:00:00 2001 From: sc Date: Wed, 29 Nov 2000 12:46:27 +0000 Subject: Chose a consistent convention for INET addresses: they are stored in objects in 'network' representation, and manipulated outside object in 'host' representation. The corresponding calls to hton{sl} and ntoh{sl} have been added --- comm/Address.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'comm/Address.cc') diff --git a/comm/Address.cc b/comm/Address.cc index 01bc037..e0e4f4b 100644 --- a/comm/Address.cc +++ b/comm/Address.cc @@ -132,7 +132,8 @@ IvlAddress :: Decode (GEN_ADDR* addr, int alen) return new IvlIrdaAddress (addr->sir.sir_name); #endif case AF_INET : - return new IvlInetAddress (addr->si.sin_addr.s_addr, addr->si.sin_port); + return new IvlInetAddress (ntohl (addr->si.sin_addr.s_addr), + ntohs (addr->si.sin_port)); default : return 0; -- cgit v1.1