From f2203b40cf372462e5277b1b530561e929636ee1 Mon Sep 17 00:00:00 2001 From: chatty Date: Mon, 15 Feb 1999 09:17:36 +0000 Subject: Initial revision --- src/ivyd.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/ivyd.h (limited to 'src/ivyd.h') diff --git a/src/ivyd.h b/src/ivyd.h new file mode 100644 index 0000000..39f2691 --- /dev/null +++ b/src/ivyd.h @@ -0,0 +1,62 @@ +/* + * IvyDaemon, an Ivy gateway for short-lived agents + * + * Copyright (C) 1999 + * Centre d'Études de la Navigation Aérienne + * + * Header shared by server, superserver and clients + * + * Author(s): Stephane Chatty + * from code by Patrick Amar + * + * $Id$ + * + * Please refer to file version.h for the + * copyright notice regarding this software + * + */ + +/* exchanges with super-server (port registration) */ + +#ifndef DEFAULT_INIVYD_PORT +#define DEFAULT_INIVYD_PORT 3006 +#endif + +#define MSG_REPLY ((char) 0) +#define MSG_CLIENT ((char) 1) +#define MSG_SERVER ((char) 2) + +struct connmsg { + short msg_uid; /* identification de l'expediteur */ + short msg_port; /* le port a utiliser pour l'uid ci-dessus */ + char msg_type; /* type de messages */ + char msg_fill1, /* fillers */ + msg_fill2, + msg_fill3; + +}; + +/* exchanges between clients and server */ + +#define BUFSIZE 512 + +typedef struct { + char buffer [BUFSIZE]; +} request; + +typedef struct { + int ok; +} answer; + + +/* + * L'adresse de la machine locale + */ +#ifndef LOCALHOST +#ifdef INADDR_LOOPBACK +#define LOCALHOST htonl (INADDR_LOOPBACK) +#else +#define LOCALHOST htonl (0x7f000001) +#endif +#endif + -- cgit v1.1