summaryrefslogtreecommitdiff
path: root/comm/Address.cc
diff options
context:
space:
mode:
authorsc2000-11-29 12:46:27 +0000
committersc2000-11-29 12:46:27 +0000
commit4a8e1c0e43f7c70d84d1f0b850e66a32c00a47b8 (patch)
tree9af86f0958857c486478a67a6a64fb60ea5ce6e1 /comm/Address.cc
parentd0d03e43ecca9bfd78fa5a861b7914c6a1b90274 (diff)
downloadivy-league-4a8e1c0e43f7c70d84d1f0b850e66a32c00a47b8.zip
ivy-league-4a8e1c0e43f7c70d84d1f0b850e66a32c00a47b8.tar.gz
ivy-league-4a8e1c0e43f7c70d84d1f0b850e66a32c00a47b8.tar.bz2
ivy-league-4a8e1c0e43f7c70d84d1f0b850e66a32c00a47b8.tar.xz
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
Diffstat (limited to 'comm/Address.cc')
-rw-r--r--comm/Address.cc3
1 files changed, 2 insertions, 1 deletions
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;