From ee937667fd0ecd82faab4c88d756b906fb625f1a Mon Sep 17 00:00:00 2001 From: sc Date: Tue, 28 Nov 2000 17:07:47 +0000 Subject: 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 --- comm/IrdaAddress.cc | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 comm/IrdaAddress.cc (limited to 'comm/IrdaAddress.cc') 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 +#include + +#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; +} -- cgit v1.1