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/IrdaAddress.cc | |
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/IrdaAddress.cc')
-rw-r--r-- | comm/IrdaAddress.cc | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/comm/IrdaAddress.cc b/comm/IrdaAddress.cc new file mode 100644 index 0000000..4beceb2 --- /dev/null +++ b/comm/IrdaAddress.cc @@ -0,0 +1,69 @@ +/* + * The Unix Channel + * + * by Michel Beaudouin-Lafon + * + * Copyright 1990-2000 + * Laboratoire de Recherche en Informatique (LRI) + * + * IRDA Addresses, + * by Stephane Chatty + * + * $Id$ + * $CurLog$ + */ + +#include "cplus_bugs.h" +#include "IrdaAddress.h" +#include <stdio.h> +#include <memory.h> + +#ifndef AF_IRDA +#define AF_IRDA 23 +#endif /* AF_IRDA */ + +IvlIrdaAddress :: IvlIrdaAddress (const char* service) +: IvlAddress (), + Service (service ? service : "OBEX") +{ + Addr.sir_family = AF_IRDA; + strncpy (Addr.sir_name, Service, 25); + Addr.sir_lsap_sel = LSAP_ANY; + Valid = true; +} + +/*?nodoc?*/ +IvlIrdaAddress :: ~IvlIrdaAddress () +{ +} + + +int +IvlIrdaAddress :: Family () +{ + return AF_IRDA; +} + + +int +IvlIrdaAddress :: Length () +{ + return sizeof (Addr); +} + + +SockAddr* +IvlIrdaAddress :: GetSockAddr () +{ + return (SockAddr*) &Addr; +} + + +char* +IvlIrdaAddress :: StrRepr (char* buf) +{ + if (! buf) + buf = new char [ strlen (Service) + 1 + 5]; + sprintf (buf, "IRDA:%s", (const char*) Service); + return buf; +} |