ndhc/ifchd/ifchd-defines.h

39 lines
1.0 KiB
C
Raw Normal View History

#ifndef IFCHD_DEFINES_H_
#define IFCHD_DEFINES_H_
#include "defines.h"
2010-11-12 14:32:18 +05:30
#define PID_FILE_DEFAULT "/var/run/ifchd.pid"
#define IFCHD_VERSION "0.9"
2010-11-12 14:32:18 +05:30
#define MAX_BUF 1024
#define SOCK_QUEUE 2
#define CONN_TIMEOUT 60
#include <net/if.h>
#include "strlist.h"
struct ifchd_client {
/* Socket fd, current state, and idle time for connection. */
int fd;
int state;
int idle_time;
/*
* Per-connection pointers into the command lists. Respectively, the
* topmost item on the list, the current item, and the last item on the
* list.
*/
strlist_t *head, *curl, *last;
/* Lists of nameservers and search domains. Unfortunately they must be
* per-connection, since otherwise seperate clients could race against
* one another to write out unpredictable data.
*/
strlist_t *namesvrs, *domains;
/* Symbolic name of the interface associated with a connection. */
char ifnam[IFNAMSIZ];
/* Per-connection buffer. */
char ibuf[MAX_BUF];
};
#endif /* IFCHD_DEFINES_H_ */
2010-11-12 14:32:18 +05:30