summaryrefslogtreecommitdiff
path: root/ace/OS.cpp
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-04-03 23:06:10 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-04-03 23:06:10 +0000
commitd992cd86edad9fdb89c102eecfa1d3560c50f304 (patch)
treeff82c43bb14bca9880cd9aa4902d946acc06e905 /ace/OS.cpp
parentbae555a611aa810dd90d3517981d25ed039d3777 (diff)
downloadATCD-d992cd86edad9fdb89c102eecfa1d3560c50f304.tar.gz
foo
Diffstat (limited to 'ace/OS.cpp')
-rw-r--r--ace/OS.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp
index 98819e99450..75680f5e4c7 100644
--- a/ace/OS.cpp
+++ b/ace/OS.cpp
@@ -2312,3 +2312,21 @@ ACE_Thread_ID::operator != (const ACE_Thread_ID &rhs)
{
return !(*this == rhs);
}
+
+int
+ACE_OS::inet_aton (const char *host_name, struct in_addr *addr)
+{
+ long ip_addr = ACE_OS::inet_addr (host_name);
+ if (ip_addr == (long) htonl ((ACE_UINT32) ~0)
+ // Broadcast addresses are weird...
+ && ACE_OS::strcmp (host_name, "255.255.255.255") != 0)
+ return 0;
+ else if (addr != 0)
+ {
+ ACE_OS::memcpy ((void *) addr, (void *) &ip_addr, sizeof ip_addr);
+ return 1;
+ }
+ else
+ return 1;
+}
+