Obtained from:	KAME
This commit is contained in:
Hajimu UMEMOTO 2004-01-14 17:16:19 +00:00
parent d05ae8c388
commit 8e7409eda3
6 changed files with 20 additions and 31 deletions

View File

@ -1,4 +1,4 @@
/* $KAME: dump.c,v 1.12 2003/04/11 10:14:55 jinmei Exp $ */
/* $KAME: dump.c,v 1.13 2003/10/05 00:09:36 itojun Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@ -56,7 +56,7 @@ static char *sec2str __P((time_t));
char *ifstatstr[] = {"IDLE", "DELAY", "PROBE", "DOWN", "TENTATIVE"};
static void
dump_interface_status()
dump_interface_status(void)
{
struct ifinfo *ifinfo;
struct timeval now;
@ -97,8 +97,7 @@ dump_interface_status()
}
void
rtsold_dump_file(dumpfile)
char *dumpfile;
rtsold_dump_file(char *dumpfile)
{
if ((fp = fopen(dumpfile, "w")) == NULL) {
warnmsg(LOG_WARNING, __func__, "open a dump file(%s): %s",
@ -110,8 +109,7 @@ rtsold_dump_file(dumpfile)
}
static char *
sec2str(total)
time_t total;
sec2str(time_t total)
{
static char result[256];
int days, hours, mins, secs;

View File

@ -1,4 +1,4 @@
/* $KAME: if.c,v 1.26 2003/05/15 14:38:56 itojun Exp $ */
/* $KAME: if.c,v 1.27 2003/10/05 00:09:36 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -67,7 +67,7 @@ static int get_llflag __P((const char *));
static void get_rtaddrs __P((int, struct sockaddr *, struct sockaddr **));
int
ifinit()
ifinit(void)
{
ifsock = rssock;

View File

@ -1,4 +1,4 @@
/* $KAME: probe.c,v 1.16 2002/06/10 20:00:36 itojun Exp $ */
/* $KAME: probe.c,v 1.17 2003/10/05 00:09:36 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
@ -63,7 +63,7 @@ static int probesock;
static void sendprobe __P((struct in6_addr *, struct ifinfo *));
int
probe_init()
probe_init(void)
{
int scmsglen = CMSG_SPACE(sizeof(struct in6_pktinfo)) +
CMSG_SPACE(sizeof(int));

View File

@ -80,15 +80,14 @@ static struct {
};
int
rtsock_open()
rtsock_open(void)
{
return socket(PF_ROUTE, SOCK_RAW, 0);
}
int
rtsock_input(s)
int s;
rtsock_input(int s)
{
ssize_t n;
char msg[2048];
@ -136,10 +135,7 @@ rtsock_input(s)
#ifdef RTM_IFANNOUNCE /*NetBSD 1.5 or later*/
static int
rtsock_input_ifannounce(s, rtm, lim)
int s;
struct rt_msghdr *rtm;
char *lim;
rtsock_input_ifannounce(int s, struct rt_msghdr *rtm, char *lim)
{
struct if_announcemsghdr *ifan;
struct ifinfo *ifinfo;

View File

@ -1,4 +1,4 @@
/* $KAME: rtsol.c,v 1.26 2003/05/27 06:48:27 jinmei Exp $ */
/* $KAME: rtsol.c,v 1.27 2003/10/05 00:09:36 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -79,7 +79,7 @@ static void call_script __P((char *, char *));
static int safefile __P((const char *));
int
sockopen()
sockopen(void)
{
static u_char *rcvcmsgbuf = NULL, *sndcmsgbuf = NULL;
int sndcmsglen, on;
@ -369,8 +369,7 @@ rtsol_input(int s)
}
static void
call_script(scriptpath, ifname)
char *scriptpath, *ifname;
call_script(char *scriptpath, char *ifname)
{
pid_t pid, wpid;
@ -431,8 +430,7 @@ call_script(scriptpath, ifname)
}
static int
safefile(path)
const char *path;
safefile(const char *path)
{
struct stat s;
uid_t myuid;

View File

@ -97,9 +97,7 @@ static void rtsold_set_dump_file __P((int));
static void usage __P((char *));
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
int s, ch, once = 0;
struct timeval *timeout;
@ -436,7 +434,7 @@ ifconfig(char *ifname)
}
void
iflist_init()
iflist_init(void)
{
struct ifinfo *ifi, *next;
@ -527,7 +525,7 @@ make_packet(struct ifinfo *ifinfo)
}
static struct timeval *
rtsol_check_timer()
rtsol_check_timer(void)
{
static struct timeval returnval;
struct timeval now, rtsol_timer;
@ -713,8 +711,7 @@ rtsol_timer_update(struct ifinfo *ifinfo)
#define MILLION 1000000
static void
rtsold_set_dump_file(sig)
int sig;
rtsold_set_dump_file(int sig)
{
do_dump = 1;
}
@ -764,7 +761,7 @@ warnmsg(priority, func, msg, va_alist)
* return a list of interfaces which is suitable to sending an RS.
*/
char **
autoifprobe()
autoifprobe(void)
{
static char **argv = NULL;
static int n = 0;