typedef struct // route
{
in_addr_t ip;
- in_addr_t mask;
+ int prefixlen;
}
routet;
{
struct controls *next; // next in queue
uint16_t length; // length
- uint8_t buf[MAXCONTROL];
+ union {
+ uint8_t buf[MAXCONTROL];
+ uint16_t buf16[MAXCONTROL/2];
+ } __attribute__ ((__transparent_union__));
}
controlt;
#define SET_STAT(x, y)
#endif
+#ifndef IFNAMSIZ
+# define IFNAMSIZ 16
+#endif
+
typedef struct
{
int debug; // debugging level
int reload_config; // flag to re-read config (set by cli)
int multi_read_count; // amount of packets to read per fd in processing loop
- char tundevice[10]; // tun device name
+ char tundevice[IFNAMSIZ]; // tun device name
char log_filename[128];
char l2tp_secret[64]; // L2TP shared secret
// cli.c
-void init_cli(char *hostname);
+void init_cli();
+void cli_init_hostname(char *hostname);
void cli_do_file(FILE *fh);
void cli_do(int sockfd);
int cli_arg_help(struct cli_def *cli, int cr_ok, char *entry, ...);
FD_TYPE_DAE,
FD_TYPE_RADIUS,
FD_TYPE_BGP,
+ FD_TYPE_NETLINK,
} type;
int index; // for RADIUS, BGP
};