/*
- * $Id: config.c,v 1.16 2008-12-02 18:18:06 morgana Exp $
+ * $Id: config.c,v 1.17 2009-10-13 22:55:37 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#define IFF_SLAVE 0
#endif /* IFF_SLAVE */
-int router(), dontroute(), seed(), phase(), net(), addr(), zone(), noallmulti();
+int router(struct interface *iface, char **av);
+int dontroute(struct interface *iface, char **av);
+int seed(struct interface *iface, char **av);
+int phase(struct interface *iface, char **av);
+int net(struct interface *iface, char **av);
+int addr(struct interface *iface, char **av);
+int zone(struct interface *iface, char **av);
+int noallmulti(struct interface *iface, char **av);
static const struct param {
char *p_name;
- int (*p_func)();
+ int (*p_func)(struct interface *iface, char **av);
} params[] = {
{ "router", router },
{ "dontroute", dontroute },
}
}
-int writeconf( cf )
- char *cf;
+int writeconf(char *cf)
{
struct stat st;
char *path, *p, newpath[ MAXPATHLEN ], line[ MAXLINELEN ];
* zone for an interface is the first zone encountered for that
* interface.
*/
-int readconf( cf )
- char *cf;
+int readconf(char *cf)
{
struct ifreq ifr;
struct interface *iface, *niface;
return -1;
}
-int noallmulti( iface, av )
- struct interface *iface;
- char **av _U_;
+int noallmulti( struct interface *iface, char **av _U_)
{
/* Linux specific, no effect on other platforms */
iface->i_flags &= !IFACE_ALLMULTI;
}
/*ARGSUSED*/
-int router( iface, av )
- struct interface *iface;
- char **av _U_;
+int router(struct interface *iface, char **av _U_)
{
/* make sure "-router" and "-dontroute" aren't both on the same line. */
if (iface->i_flags & IFACE_DONTROUTE) {
}
/*ARGSUSED*/
-int dontroute( iface, av )
- struct interface *iface;
- char **av _U_;
+int dontroute(struct interface *iface, char **av _U_)
{
/* make sure "-router" and "-dontroute" aren't both on the same line. */
if (iface->i_flags & IFACE_RSEED) {
}
/*ARGSUSED*/
-int seed( iface, av )
- struct interface *iface;
- char **av _U_;
+int seed( struct interface *iface, char **av _U_)
{
/*
* Check to be sure "-seed" is before "-zone". we keep the old
return( 1 );
}
-int phase( iface, av )
- struct interface *iface;
- char **av;
+int phase(struct interface *iface, char **av)
{
int n;
char *pnum;
return( 2 );
}
-int net( iface, av )
- struct interface *iface;
- char **av;
+int net(struct interface *iface, char **av)
{
char *nrange;
char *stop;
return( 2 );
}
-int addr( iface, av )
- struct interface *iface;
- char **av;
+int addr(struct interface *iface, char **av)
{
if ( av[ 0 ] == NULL ) {
fprintf( stderr, "No address.\n" );
return( 2 );
}
-int zone( iface, av )
- struct interface *iface;
- char **av;
+int zone(struct interface *iface, char **av)
{
struct ziptab *zt;
char *zname;
* Get the configuration from the kernel. Only called if there's no
* configuration.
*/
-int getifconf()
+int getifconf(void)
{
struct interface *iface, *niface;
struct ifreq ifr;
* the interface structure and have it updated nicely.
*/
-struct interface *newiface( name )
- const char *name;
+struct interface *newiface( const char *name)
{
struct interface *niface;
}
#ifdef __svr4__
-int plumb()
+int plumb(void)
{
struct interface *iface;
char device[ MAXPATHLEN + 1], *p, *t;