Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/route6d Unifdef __STDC__, ansify.
details: https://anonhg.NetBSD.org/src/rev/5872e04fad30
branches: trunk
changeset: 534655:5872e04fad30
user: wiz <wiz%NetBSD.org@localhost>
date: Thu Aug 01 00:17:31 2002 +0000
description:
Unifdef __STDC__, ansify.
diffstat:
usr.sbin/route6d/route6d.c | 223 +++++++++++---------------------------------
1 files changed, 55 insertions(+), 168 deletions(-)
diffs (truncated from 645 to 300 lines):
diff -r f07c764875df -r 5872e04fad30 usr.sbin/route6d/route6d.c
--- a/usr.sbin/route6d/route6d.c Wed Jul 31 18:48:17 2002 +0000
+++ b/usr.sbin/route6d/route6d.c Thu Aug 01 00:17:31 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route6d.c,v 1.35 2002/06/09 02:47:03 itojun Exp $ */
+/* $NetBSD: route6d.c,v 1.36 2002/08/01 00:17:31 wiz Exp $ */
/* $KAME: route6d.c,v 1.85 2002/06/07 16:39:41 itojun Exp $ */
/*
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: route6d.c,v 1.35 2002/06/09 02:47:03 itojun Exp $");
+__RCSID("$NetBSD: route6d.c,v 1.36 2002/08/01 00:17:31 wiz Exp $");
#endif
#include <stdio.h>
@@ -42,11 +42,7 @@
#include <stdlib.h>
#include <string.h>
#include <signal.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#include <syslog.h>
#include <stddef.h>
#include <errno.h>
@@ -278,9 +274,7 @@
#define MALLOC(type) ((type *)malloc(sizeof(type)))
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
int ch;
int error = 0;
@@ -474,8 +468,7 @@
}
void
-sighandler(signo)
- int signo;
+sighandler(int signo)
{
switch (signo) {
@@ -499,7 +492,7 @@
*/
/* ARGSUSED */
void
-rtdexit()
+rtdexit(void)
{
struct riprt *rrt;
@@ -526,7 +519,7 @@
*/
/* ARGSUSED */
void
-ripalarm()
+ripalarm(void)
{
struct ifc *ifcp;
struct riprt *rrt, *rrt_prev, *rrt_next;
@@ -566,7 +559,7 @@
}
void
-init()
+init(void)
{
int i, int0, int255, error;
struct addrinfo hints, *res;
@@ -679,9 +672,7 @@
static struct netinfo6 *np;
void
-ripflush(ifcp, sin6)
- struct ifc *ifcp;
- struct sockaddr_in6 *sin6;
+ripflush(struct ifc *ifcp, struct sockaddr_in6 *sin6)
{
int i;
int error;
@@ -730,10 +721,7 @@
* Generate RIP6_RESPONSE packets and send them.
*/
void
-ripsend(ifcp, sin6, flag)
- struct ifc *ifcp;
- struct sockaddr_in6 *sin6;
- int flag;
+ripsend(struct ifc *ifcp, struct sockaddr_in6 *sin6, int flag)
{
struct riprt *rrt;
struct in6_addr *nh; /* next hop */
@@ -856,9 +844,7 @@
* outbound filter logic, per-route/interface.
*/
int
-out_filter(rrt, ifcp)
- struct riprt *rrt;
- struct ifc *ifcp;
+out_filter(struct riprt *rrt, struct ifc *ifcp)
{
struct iff *iffp;
struct in6_addr ia;
@@ -929,9 +915,7 @@
* It checks options specified in the arguments and the split horizon rule.
*/
int
-tobeadv(rrt, ifcp)
- struct riprt *rrt;
- struct ifc *ifcp;
+tobeadv(struct riprt *rrt, struct ifc *ifcp)
{
/* Special care for static routes */
@@ -956,9 +940,7 @@
* Send a rip packet actually.
*/
int
-sendpacket(sin6, len)
- struct sockaddr_in6 *sin6;
- int len;
+sendpacket(struct sockaddr_in6 *sin6, int len)
{
struct msghdr m;
struct cmsghdr *cm;
@@ -1017,7 +999,7 @@
* table if necessary.
*/
void
-riprecv()
+riprecv(void)
{
struct ifc *ifcp, *ic;
struct sockaddr_in6 fsock;
@@ -1300,8 +1282,7 @@
* Send all routes request packet to the specified interface.
*/
void
-sendrequest(ifcp)
- struct ifc *ifcp;
+sendrequest(struct ifc *ifcp)
{
struct netinfo6 *np;
int error;
@@ -1329,11 +1310,8 @@
* Process a RIP6_REQUEST packet.
*/
void
-riprequest(ifcp, np, nn, sin6)
- struct ifc *ifcp;
- struct netinfo6 *np;
- int nn;
- struct sockaddr_in6 *sin6;
+riprequest(struct ifc *ifcp, struct netinfo6 *np, int nn,
+ struct sockaddr_in6 *sin6)
{
int i;
struct riprt *rrt;
@@ -1361,7 +1339,7 @@
* Get information of each interface.
*/
void
-ifconfig()
+ifconfig(void)
{
struct ifaddrs *ifap, *ifa;
struct ifc *ifcp;
@@ -1433,11 +1411,7 @@
}
void
-ifconfig1(name, sa, ifcp, s)
- const char *name;
- const struct sockaddr *sa;
- struct ifc *ifcp;
- int s;
+ifconfig1(const char *name, const struct sockaddr *sa, struct ifc *ifcp, int s)
{
struct in6_ifreq ifr;
const struct sockaddr_in6 *sin6;
@@ -1514,7 +1488,7 @@
* Update interface information as necesssary.
*/
void
-rtrecv()
+rtrecv(void)
{
char buf[BUFSIZ];
char *p, *q;
@@ -1747,10 +1721,8 @@
* remove specified route from the internal routing table.
*/
int
-rt_del(sdst, sgw, smask)
- const struct sockaddr_in6 *sdst;
- const struct sockaddr_in6 *sgw;
- const struct sockaddr_in6 *smask;
+rt_del(const struct sockaddr_in6 *sdst, const struct sockaddr_in6 *sgw,
+ const struct sockaddr_in6 *smask)
{
const struct in6_addr *dst = NULL;
const struct in6_addr *gw = NULL;
@@ -1846,10 +1818,8 @@
* remove specified address from internal interface/routing table.
*/
int
-rt_deladdr(ifcp, sifa, smask)
- struct ifc *ifcp;
- const struct sockaddr_in6 *sifa;
- const struct sockaddr_in6 *smask;
+rt_deladdr(struct ifc *ifcp, const struct sockaddr_in6 *sifa,
+ const struct sockaddr_in6 *smask)
{
const struct in6_addr *addr = NULL;
int prefix;
@@ -1958,9 +1928,7 @@
* list.
*/
int
-ifrt(ifcp, again)
- struct ifc *ifcp;
- int again;
+ifrt(struct ifc *ifcp, int again)
{
struct ifac *ifa;
struct riprt *rrt = NULL, *search_rrt, *prev_rrt, *loop_rrt;
@@ -2078,9 +2046,7 @@
* since BSD kernels do not look at prefix length on p2p interfaces.
*/
void
-ifrt_p2p(ifcp, again)
- struct ifc *ifcp;
- int again;
+ifrt_p2p(struct ifc *ifcp, int again)
{
struct ifac *ifa;
struct riprt *rrt, *orrt, *prevrrt;
@@ -2248,8 +2214,7 @@
}
int
-getifmtu(ifindex)
- int ifindex;
+getifmtu(int ifindex)
{
int mib[6];
char *buf;
@@ -2288,8 +2253,7 @@
}
const char *
-rttypes(rtm)
- struct rt_msghdr *rtm;
+rttypes(struct rt_msghdr *rtm)
{
#define RTTYPE(s, f) \
do { \
@@ -2333,8 +2297,7 @@
}
const char *
-rtflags(rtm)
- struct rt_msghdr *rtm;
+rtflags(struct rt_msghdr *rtm)
{
static char buf[BUFSIZ];
@@ -2399,8 +2362,7 @@
}
const char *
-ifflags(flags)
- int flags;
+ifflags(int flags)
{
static char buf[BUFSIZ];
@@ -2439,8 +2401,7 @@
}
void
-krtread(again)
- int again;
+krtread(int again)
{
int mib[6];
size_t msize;
@@ -2491,9 +2452,7 @@
}
void
Home |
Main Index |
Thread Index |
Old Index