/* * 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