/* alived.h - alived header file full of.. heady.. goodness
   Copyright (C) 2003, Kris Foster <kris@krweb.net>

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#define VERSION		"0.2.2"

#define ALIVE_PORT      7776    // port that server is listening on
#define HELLOTIME       30      // seconds to wait between messages
#define HOLDMULTIPLIER  3       // miss this many messages before we freak
#define KEEPALIVE       1
#define LOOKUP          2
#define REMOVE		3
#define HELLO           4
#define DUMP		5
#define SLEEPTIME	1
#define RETRYLIMIT      3
#define ITIMEOUT        2
#define TIMEOUT         5

#define NOTFOUNDCHAR	"!"

#define TRUE		1
#define FALSE		0

/* need to change this to a varialbe length id */
/* possibly add user defined address to the struct, and just copying the struct to the watchlist */
struct message {
        int type;
        char id[28];
};

struct watchlist {
        long ip_addr;
        time_t last_heard;
        char id[28];
        struct watchlist *next;
};


/* alived.h - End of header file */
