ndhc/ifchd/ifchd-defines.h
Nicholas J. Kain 2bf7306bb9 Add some more syscalls to the ndhc permit filter. Netlink sockets were
broken before because of too-strict filters.

Move setup_signals under the seccomp filter to give it more testing coverage.

Make the UDP datagram length check much more strict.  If the read buffer
does not match up with the header lengths exactly, it is discarded.

Print a warning to syslog/stdout when ifchd execute_buffer() returns an
error.

Fix a regression introduced in ifchd that would cause the epoll handler to
spin when a client connection closed.
2012-07-20 18:48:26 -04:00

31 lines
693 B
C

#ifndef IFCHD_DEFINES_H_
#define IFCHD_DEFINES_H_
#include "defines.h"
#define PID_FILE_DEFAULT "/var/run/ifchd.pid"
#define IFCHD_VERSION "0.9"
#define MAX_BUF 384
#define SOCK_QUEUE 2
#define CONN_TIMEOUT 60
#define MAX_IFACES 10
#include <net/if.h>
struct ifchd_client {
/* Socket fd, current state, and idle time for connection. */
int fd;
int state;
int idle_time;
/* Symbolic name of the interface associated with a connection. */
char ifnam[IFNAMSIZ];
/* Per-connection buffer. */
char ibuf[MAX_BUF];
/* ' '-delimited buffers of nameservers and domains */
char namesvrs[MAX_BUF];
char domains[MAX_BUF];
};
#endif /* IFCHD_DEFINES_H_ */