/* * Copyright (C) 1997-2000 SpellCaster Telecommunications Inc. * $Id: babd.h,v 1.8 2004/10/19 17:10:22 bcrl Exp $ * Released under the GNU Public License. See LICENSE file for details. */ #ifndef BABD_H #define BABD_H #include /* for MAXPATHLEN */ #include extern unsigned long interim_update_interval; extern int b_sock_fd, b_sock6_fd; extern struct timeval timer_getdelay(void); extern void timer_run(void); extern void setup_select(int fd, void *data, void (*read_cb)(int fd, void *data), void (*write_cb)(int fd, void *data)); extern int aps_init(void); extern void aps_cleanup(void); extern void bab_poll(void); extern void bab_init(void); extern char *iface_name(void *ifc, char *name); extern char *strcause(unsigned char); extern int l2tp_setup(FILE *cfg); extern unsigned long strtoip(const char *); extern int bstrtoip_sin(const char *str, struct sockaddr_in *sin); class ctrlfd_t; extern int do_l2tpctl(ctrlfd_t *cfd, char *str); extern void do_bradius(ctrlfd_t *cfd, char *str); extern void do_bpppoe(ctrlfd_t *cfd, char *str); extern void show_pppoed_list(ctrlfd_t *cfd, int verbose); extern void do_bvirt(ctrlfd_t *cfd, char *str); extern int num_ifaces; extern long debug; extern int am_radius_client, am_radius_acct_client; class AcctMessage_t; extern void radius_acct(AcctMessage_t *); extern char *iptostr(unsigned int); class Call; extern int do_bdial(ctrlfd_t *cfd, const char *site, const char *phone, Call *call, int lcp_timeout = 0, int lcp_interval = 0, const char *dev_class = NULL); extern int dyn_ip_enabled; extern int want_mlcp; extern int iface_rename_to_ip; extern void get_random(unsigned char *buf, int len); void dfs_dump_interfaces(ctrlfd_t *cfd); int addchan(const char *, const char *, const char *, int); extern const char *sysname; extern int deny_pfc; extern int do_userland_only; class bvirt_ns_t; extern void iface_change_flags(bvirt_ns_t *netns, unsigned ifi_index, unsigned ifi_flags, unsigned ifi_change); extern void killIfaces(void); extern void do_hangups(void); extern void selectops_epoll_init(void); extern void make_nonblock(int fd); extern void init_netlink(void); class policy_t; extern policy_t g_policy; extern void do_bpolicy(ctrlfd_t *cfd, char *str); extern void bpolicy_show_running_config(ctrlfd_t *cfd, int verbose); /* ip pool stuff */ #define RANGE_TAG "range" #define INCLUDE_TAG "include" #define EXCLUDE_TAG "exclude" #define MAX_NAME_LENGTH 16 extern char dynamicFile[MAXPATHLEN]; extern int parse_dynamic(void); extern unsigned int request_ip_address(const char *name, void *id); extern void release_ip_address(unsigned ip, void *id); extern void print_pool(ctrlfd_t *cfd); /* cluster stuff */ extern void do_bcluster(ctrlfd_t *cfd, char *str); extern void bcluster_show_running_config(ctrlfd_t *cfd, int verbose); extern char **strtoargv(char *str); /* plugin hook. If return value == 0 keeps loaded, unloads otherwise */ extern "C" int babylond_plugin_init(ctrlfd_t *cfd, void *dl_handle); #endif