fix prototypes decls (already back-ported into KAME).

RCSID police.
This commit is contained in:
itojun 1999-09-03 05:14:37 +00:00
parent ba92138668
commit 65da2d8803
7 changed files with 67 additions and 32 deletions

13
usr.sbin/rtsold/Makefile Normal file
View File

@ -0,0 +1,13 @@
# $NetBSD: Makefile,v 1.1 1999/09/03 05:14:37 itojun Exp $
PROG= rtsold
SRCS= rtsold.c rtsol.c if.c probe.c
CPPFLAGS+=-DINET6
LDADD+= -lkvm
DPADD+= ${LIBKVM}
MAN= rtsold.8
.include <bsd.prog.mk>

View File

@ -1,3 +1,5 @@
/* $NetBSD: if.c,v 1.2 1999/09/03 05:14:37 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@ -71,9 +73,9 @@
static int ifsock;
static int getifa(char *name, struct in6_ifaddr *ifap);
static void get_rtaddrs(int addrs, struct sockaddr *sa,
struct sockaddr **rti_info);
static int getifa __P((char *name, struct in6_ifaddr *ifap));
static void get_rtaddrs __P((int addrs, struct sockaddr *sa,
struct sockaddr **rti_info));
int
ifinit()

View File

@ -1,3 +1,5 @@
/* $NetBSD: probe.c,v 1.2 1999/09/03 05:14:37 itojun Exp $ */
/*
* Copyright (C) 1998 WIDE Project.
* All rights reserved.
@ -40,6 +42,7 @@
#include <netinet/in.h>
#include <netinet6/in6_var.h>
#include <netinet/icmp6.h>
#include <netinet6/nd6.h>
#include <arpa/inet.h>
@ -49,10 +52,12 @@
#include <string.h>
#include <syslog.h>
#include "rtsold.h"
static struct msghdr sndmhdr;
static struct iovec sndiov[2];
static int probesock;
static void sendprobe(struct in6_addr *addr, int ifindex);
static void sendprobe __P((struct in6_addr *addr, int ifindex));
int
probe_init()

View File

@ -1,3 +1,5 @@
/* $NetBSD: rtsol.c,v 1.2 1999/09/03 05:14:37 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.

View File

@ -25,11 +25,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $NetBSD: rtsold.8,v 1.2 1999/09/03 05:14:37 itojun Exp $
.\" KAME Id: rtsold.8,v 1.3 1999/08/24 07:42:27 itojun Exp
.\"
.Dd May 17, 1998
.Dt RTSOLD 8
.Os KAME
.Os
.\"
.Sh NAME
.Nm rtsold

View File

@ -1,3 +1,5 @@
/* $NetBSD: rtsold.c,v 1.2 1999/09/03 05:14:37 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@ -74,26 +76,15 @@ static int fflag = 0;
/* static variables and functions */
static int mobile_node = 0;
static int ifconfig(char *ifname);
static int make_packet(struct ifinfo *ifinfo);
static struct timeval *rtsol_check_timer();
static void TIMEVAL_ADD(struct timeval *a, struct timeval *b,
struct timeval *result);
static void TIMEVAL_SUB(struct timeval *a, struct timeval *b,
struct timeval *result);
static void usage(char *progname);
/* external functions */
extern int ifinit();
extern int interface_up(char *name);
extern int lladdropt_length(struct sockaddr_dl *sdl);
extern void lladdropt_fill(struct sockaddr_dl *sdl, struct nd_opt_hdr *ndopt);
extern struct sockaddr_dl *if_nametosdl(char *name);
extern int sockopen();
extern void rtsol_input(int s);
extern void sendpacket(struct ifinfo *ifinfo);
extern int probe_init();
extern void defrouter_probe(int ifindex);
int main __P((int argc, char *argv[]));
static int ifconfig __P((char *ifname));
static int make_packet __P((struct ifinfo *ifinfo));
static struct timeval *rtsol_check_timer __P((void));
static void TIMEVAL_ADD __P((struct timeval *a, struct timeval *b,
struct timeval *result));
static void TIMEVAL_SUB __P((struct timeval *a, struct timeval *b,
struct timeval *result));
static void usage __P((char *progname));
int
main(argc, argv)
@ -220,6 +211,8 @@ main(argc, argv)
rtsol_input(s);
}
/* NOTREACHED */
return 0;
}
static int

View File

@ -1,3 +1,5 @@
/* $NetBSD: rtsold.h,v 1.2 1999/09/03 05:14:38 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@ -55,13 +57,30 @@ struct ifinfo {
#define IFS_DOWN 3
#define IFS_TENTATIVE 4
struct ifinfo *find_ifinfo(int ifindex);
void rtsol_timer_update(struct ifinfo *ifinfo);
extern int interface_status(struct ifinfo*);
/* rtsold.c */
struct ifinfo *find_ifinfo __P((int ifindex));
void rtsol_timer_update __P((struct ifinfo *ifinfo));
#ifdef __STDC__
extern void warnmsg(int, const char *, const char *, ...);
extern void warnmsg __P((int, const char *, const char *, ...));
#else
extern void warnmsg(int, const char *, const char *, va_list);
extern void warnmsg __P((int, const char *, const char *, va_list));
#endif
extern int getinet6sysctl(int code);
/* if.c */
extern int ifinit __P((void));
extern int interface_up __P((char *name));
extern int interface_status __P((struct ifinfo*));
extern int lladdropt_length __P((struct sockaddr_dl *sdl));
extern void lladdropt_fill __P((struct sockaddr_dl *sdl,
struct nd_opt_hdr *ndopt));
extern struct sockaddr_dl *if_nametosdl __P((char *name));
extern int getinet6sysctl __P((int code));
/* rtsol.c */
extern int sockopen __P((void));
extern void sendpacket __P((struct ifinfo *ifinfo));
extern void rtsol_input __P((int s));
/* probe.c */
extern int probe_init __P((void));
extern void defrouter_probe __P((int ifindex));