diff options
Diffstat (limited to 'misc/arpd.c')
-rw-r--r-- | misc/arpd.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/misc/arpd.c b/misc/arpd.c index dd1de80c..ec9d570f 100644 --- a/misc/arpd.c +++ b/misc/arpd.c @@ -92,7 +92,7 @@ int broadcast_rate = 1000; int broadcast_burst = 3000; int poll_timeout = 30000; -void usage(void) +static void usage(void) { fprintf(stderr, "Usage: arpd [ -lkh? ] [ -a N ] [ -b dbase ] [ -B number ]" @@ -100,7 +100,7 @@ void usage(void) exit(1); } -int handle_if(int ifindex) +static int handle_if(int ifindex) { int i; @@ -115,7 +115,7 @@ int handle_if(int ifindex) int sysctl_adjusted; -void do_sysctl_adjustments(void) +static void do_sysctl_adjustments(void) { int i; @@ -148,7 +148,7 @@ void do_sysctl_adjustments(void) sysctl_adjusted = 1; } -void undo_sysctl_adjustments(void) +static void undo_sysctl_adjustments(void) { int i; @@ -178,7 +178,7 @@ void undo_sysctl_adjustments(void) } -int send_probe(int ifindex, __u32 addr) +static int send_probe(int ifindex, __u32 addr) { struct ifreq ifr; struct sockaddr_in dst; @@ -238,7 +238,7 @@ int send_probe(int ifindex, __u32 addr) /* Be very tough on sending probes: 1 per second with burst of 3. */ -int queue_active_probe(int ifindex, __u32 addr) +static int queue_active_probe(int ifindex, __u32 addr) { static struct timeval prev; static int buckets; @@ -262,7 +262,7 @@ int queue_active_probe(int ifindex, __u32 addr) return -1; } -int respond_to_kernel(int ifindex, __u32 addr, char *lla, int llalen) +static int respond_to_kernel(int ifindex, __u32 addr, char *lla, int llalen) { struct { struct nlmsghdr n; @@ -286,7 +286,7 @@ int respond_to_kernel(int ifindex, __u32 addr, char *lla, int llalen) return rtnl_send(&rth, &req, req.n.nlmsg_len) <= 0; } -void prepare_neg_entry(__u8 *ndata, __u32 stamp) +static void prepare_neg_entry(__u8 *ndata, __u32 stamp) { ndata[0] = 0xFF; ndata[1] = 0; @@ -297,7 +297,7 @@ void prepare_neg_entry(__u8 *ndata, __u32 stamp) } -int do_one_request(struct nlmsghdr *n) +static int do_one_request(struct nlmsghdr *n) { struct ndmsg *ndm = NLMSG_DATA(n); int len = n->nlmsg_len; @@ -426,12 +426,12 @@ int do_one_request(struct nlmsghdr *n) return 0; } -void load_initial_table(void) +static void load_initial_table(void) { rtnl_wilddump_request(&rth, AF_INET, RTM_GETNEIGH); } -void get_kern_msg(void) +static void get_kern_msg(void) { int status; struct nlmsghdr *h; @@ -477,7 +477,7 @@ void get_kern_msg(void) } /* Receive gratuitous ARP messages and store them, that's all. */ -void get_arp_pkt(void) +static void get_arp_pkt(void) { unsigned char buf[1024]; struct sockaddr_ll sll; @@ -532,7 +532,7 @@ void get_arp_pkt(void) dbase->put(dbase, &dbkey, &dbdat, 0); } -void catch_signal(int sig, void (*handler)(int)) +static void catch_signal(int sig, void (*handler)(int)) { struct sigaction sa; @@ -548,21 +548,21 @@ void catch_signal(int sig, void (*handler)(int)) sigjmp_buf env; volatile int in_poll; -void sig_exit(int signo) +static void sig_exit(int signo) { do_exit = 1; if (in_poll) siglongjmp(env, 1); } -void sig_sync(int signo) +static void sig_sync(int signo) { do_sync = 1; if (in_poll) siglongjmp(env, 1); } -void sig_stats(int signo) +static void sig_stats(int signo) { do_sync = 1; do_stats = 1; @@ -570,7 +570,7 @@ void sig_stats(int signo) siglongjmp(env, 1); } -void send_stats(void) +static void send_stats(void) { syslog(LOG_INFO, "arp_rcv: n%lu c%lu app_rcv: tot %lu hits %lu bad %lu neg %lu sup %lu", stats.arp_new, stats.arp_change, |