diff options
author | sc | 2000-11-28 17:07:47 +0000 |
---|---|---|
committer | sc | 2000-11-28 17:07:47 +0000 |
commit | ee937667fd0ecd82faab4c88d756b906fb625f1a (patch) | |
tree | 19e679318b5cb87e8be1a05a7bbc9ba5568d0814 /comm/InetAddress.h | |
parent | 1326b11d65f7020f5f6c691305d2c090b064bd04 (diff) | |
download | ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.zip ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.gz ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.bz2 ivy-league-ee937667fd0ecd82faab4c88d756b906fb625f1a.tar.xz |
Integration into IvyLeague
Uvh -> Ivl
Multiplexer.* is renamed into Scheduler.*
A few name conflicts in the merger with ex-DNN have been solved
Imakefile is replaced by Makefile
Created InetAddress.* and UnixAddress.* from Address.*
Created IrdaAddress.*
OLD/TextStream has been updated
Diffstat (limited to 'comm/InetAddress.h')
-rw-r--r-- | comm/InetAddress.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/comm/InetAddress.h b/comm/InetAddress.h new file mode 100644 index 0000000..eec1490 --- /dev/null +++ b/comm/InetAddress.h @@ -0,0 +1,58 @@ +/* + * The Unix Channel + * + * by Michel Beaudouin-Lafon + * + * Copyright 1990-1997 + * Laboratoire de Recherche en Informatique (LRI) + * + * INET Addresses + * + * $Id$ + * $CurLog$ + * Created from Address.h + */ + +#ifndef InetAddress_H_ +#define InetAddress_H_ + +#include "cplus_bugs.h" +#include "error.h" +#include "Address.h" + +class IvlInetAddress : public IvlAddress { +protected: + IvlString HostName; + bool HasHostName; + struct sockaddr_in Addr; + + const char* GetNoHostName (); + +public: + IvlInetAddress (); + IvlInetAddress (lword, sword); // hostid, port# + IvlInetAddress (const char*, sword = 0); // hostname, port# + ~IvlInetAddress (); + + int Family (); + int Length (); + SockAddr* GetSockAddr (); +inline sword Port () { return Addr.sin_port; } +inline lword Host () { return Addr.sin_addr.s_addr; } + char* StrRepr (char* buf = 0); + const char* GetHostName (); + +static lword LoopBack (); +}; + +#ifndef INADDR_LOOPBACK +#define INADDR_LOOPBACK (INET_ADDR::LoopBack ()) +#endif + +#define ANYADDR ((lword) INADDR_ANY) +#define LOOPBACK ((lword) INADDR_LOOPBACK) +#define BROADCAST ((lword) INADDR_BROADCAST) + + + +#endif /* InetAddress_H_ */ |