@@ -193,7 +193,7 @@ int8_t bind_to_iface( int32_t sock, char *dev ) {
-int8_t use_gateway_module() {
+int8_t use_gateway_module(char *BATMANUNUSED(dev)) {
int32_t fd;
@@ -76,7 +76,7 @@ static struct task_struct *kthread_task = NULL;
static struct proc_dir_entry *proc_dir, *clients_file;
-int init_module()
+int init_module(void)
{
/* register our device - kernel assigns a free major number */
if ( ( Major = register_chrdev( 0, DRIVER_DEVICE, &fops ) ) < 0 ) {
@@ -111,7 +111,7 @@ int init_module()
return(0);
}
-void cleanup_module()
+void cleanup_module(void)
{
struct free_client_data *entry, *next;
struct gw_client *gw_client;
@@ -591,7 +591,7 @@ static int bat_netdev_close( struct net_device *dev )
return( 0 );
}
-static int create_bat_netdev()
+static int create_bat_netdev(void)
{
struct gate_priv *priv;
@@ -67,7 +67,7 @@ static struct hashtable_t *wip_hash;
static struct hashtable_t *vip_hash;
static struct list_head free_client_list;
-int init_module()
+int init_module(void)
{
printk(KERN_DEBUG "B.A.T.M.A.N. gateway modul\n");
@@ -95,7 +95,7 @@ int init_module()
return(0);
}
-void cleanup_module()
+void cleanup_module(void)
{
struct gate_priv *priv;
struct free_client_data *entry, *next;
@@ -545,7 +545,7 @@ static int bat_netdev_close( struct net_device *dev )
return( 0 );
}
-static int create_bat_netdev()
+static int create_bat_netdev(void)
{
struct gate_priv *priv;
@@ -429,7 +429,7 @@ void purge_orig(uint32_t curr_time)
-void debug_orig() {
+void debug_orig(void) {
struct hash_it_t *hashit = NULL;
struct list_head *forw_pos, *orig_pos, *neigh_pos;
@@ -29,5 +29,5 @@ int choose_orig( void *data, int32_t size );
struct orig_node *get_orig_node( uint32_t addr );
void update_orig( struct orig_node *orig_node, struct bat_packet *in, uint32_t neigh, struct batman_if *if_incoming, unsigned char *hna_recv_buff, int16_t hna_buff_len, uint8_t is_duplicate, uint32_t curr_time );
void purge_orig( uint32_t curr_time );
-void debug_orig();
+void debug_orig(void);
@@ -36,7 +36,7 @@ void addr_to_string( uint32_t addr, char *str, int32_t len );
-int8_t is_aborted();
+int8_t is_aborted(void);
void update_hna(struct orig_node *orig_node, unsigned char *new_hna,
int new_hna_len, struct neigh_node *old_router);
void handler(int32_t sig);
@@ -59,8 +59,8 @@ int8_t set_tun_addr( int32_t fd, uint32_t tun_addr, char *tun_dev );
void apply_init_args(int argc, char *argv[]);
void init_interface(struct batman_if *batman_if);
void deactivate_interface(struct batman_if *batman_if);
-void check_inactive_interfaces();
-void init_interface_gw();
+void check_inactive_interfaces(void);
+void init_interface_gw(void);
/* kernel.c */
void set_rp_filter( int32_t state, char* dev );
@@ -70,20 +70,20 @@ int32_t get_send_redirects( char *dev );
void set_forwarding( int32_t state );
int32_t get_forwarding( void );
int8_t bind_to_iface( int32_t sock, char *dev );
-int8_t use_gateway_module();
+int8_t use_gateway_module(char *dev);
/* posix.c */
void print_animation( void );
-void del_default_route();
-void add_default_route();
+void del_default_route(void);
+void add_default_route(void);
int8_t receive_packet(unsigned char *packet_buff, int32_t packet_buff_len, int16_t *packet_len, uint32_t *neigh, uint32_t timeout, struct batman_if **if_incoming);
int8_t send_udp_packet(unsigned char *packet_buff, int packet_buff_len, struct sockaddr_in *broad, int send_sock, struct batman_if *batman_if);
-void del_gw_interface();
-void restore_defaults();
-void cleanup();
+void del_gw_interface(void);
+void restore_defaults(void);
+void cleanup(void);
/* tunnel.c */
-void init_bh_ports();
+void init_bh_ports(void);
void *gw_listen(void *arg);
void *client_to_gw_tun( void *arg );
@@ -44,7 +44,7 @@ int8_t stop;
-int my_daemon() {
+int my_daemon(void) {
int fd;
@@ -85,7 +85,7 @@ int my_daemon() {
}
-void create_routing_pipe()
+void create_routing_pipe(void)
{
int fd[2], pipe_opts;
@@ -879,7 +879,7 @@ close_con:
}
-void interface_listen_sockets()
+void interface_listen_sockets(void)
{
struct list_head *list_pos;
struct batman_if *batman_if;
@@ -1124,7 +1124,7 @@ void init_interface(struct batman_if *batman_if)
activate_interface(batman_if);
}
-void check_inactive_interfaces()
+void check_inactive_interfaces(void)
{
struct list_head *list_pos;
struct batman_if *batman_if;
@@ -1143,7 +1143,7 @@ void check_inactive_interfaces()
-void init_interface_gw () {
+void init_interface_gw (void) {
int32_t sock_opts, err, skfd;
struct ifreq ifr;
@@ -52,7 +52,7 @@ uint8_t tunnel_running = 0;
static pthread_mutex_t batman_clock_mutex = PTHREAD_MUTEX_INITIALIZER;
-void update_internal_clock()
+void update_internal_clock(void)
{
struct tms tp;
clock_t current_clock_tick = times(&tp);
@@ -61,7 +61,7 @@ void update_internal_clock()
last_clock_tick = current_clock_tick;
}
-uint32_t get_time_msec()
+uint32_t get_time_msec(void)
{
uint32_t time;
@@ -73,7 +73,7 @@ uint32_t get_time_msec()
return time;
}
-uint64_t get_time_msec64()
+uint64_t get_time_msec64(void)
{
uint64_t time;
@@ -230,7 +230,7 @@ int32_t rand_num( int32_t limit ) {
-int8_t is_aborted() {
+int8_t is_aborted(void) {
return stop != 0;
@@ -245,14 +245,14 @@ void handler( int32_t BATMANUNUSED(sig) ) {
}
-void del_default_route()
+void del_default_route(void)
{
curr_gateway = NULL;
}
-void add_default_route()
+void add_default_route(void)
{
struct curr_gw_data *curr_gw_data;
@@ -378,7 +378,7 @@ int8_t send_udp_packet(unsigned char *packet_buff, int32_t packet_buff_len, stru
}
-void del_gw_interface()
+void del_gw_interface(void)
{
struct batman_if *batman_if = (struct batman_if *)if_list.next;
struct batgat_ioc_args args;
@@ -410,7 +410,7 @@ void del_gw_interface()
}
}
-void restore_defaults() {
+void restore_defaults(void) {
struct list_head *if_pos, *if_pos_tmp;
struct batman_if *batman_if;
@@ -520,7 +520,7 @@ void segmentation_fault(int32_t BATMANUNUSED(sig)) {
-void cleanup() {
+void cleanup(void) {
int8_t i;
struct debug_level_info *debug_level_info;
@@ -58,7 +58,7 @@
unsigned short bh_udp_ports[] = BH_UDP_PORTS;
-void init_bh_ports()
+void init_bh_ports(void)
{
int i;
@@ -57,7 +57,7 @@ void prof_stop(int32_t index) {
}
-void prof_print() {
+void prof_print(void) {
int32_t index;
@@ -92,7 +92,7 @@ void prof_stop( int32_t index ) {
}
-void prof_print() {
+void prof_print(void) {
}
@@ -48,4 +48,4 @@ struct prof_container {
void prof_init(int32_t index, char *name);
void prof_start(int32_t index);
void prof_stop(int32_t index);
-void prof_print();
+void prof_print(void);