ANSIfy + __printflike + __dead

This commit is contained in:
joerg 2011-08-30 19:49:10 +00:00
parent 257a846ab4
commit 732d96f1f0
22 changed files with 153 additions and 208 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmp.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: cmp.h,v 1.7 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: cmp.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: cmp.h,v 1.7 2011/08/30 19:49:10 joerg Exp $
*
*/
@ -31,7 +31,7 @@
#define _CMP_H_
__BEGIN_DECLS
int mopCmpEAddr __P((const u_char *, const u_char *));
int mopCmpEAddr(const u_char *, const u_char *);
__END_DECLS
#endif /* _CMP_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: common.h,v 1.8 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: common.h,v 1.9 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: common.h,v 1.8 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: common.h,v 1.9 2011/08/30 19:49:10 joerg Exp $
*
*/
@ -53,11 +53,11 @@ struct if_info {
int trans; /* Transport type Ethernet/802.3 */
u_char eaddr[6]; /* Ethernet addr of this interface */
char if_name[IFNAME_SIZE]; /* Interface Name */
int (*iopen) __P((const char *, int, u_short, int));
int (*iopen)(const char *, int, u_short, int);
/* Interface Open Routine */
int (*write) __P((int, const u_char *, int, int));
int (*write)(int, const u_char *, int, int);
/* Interface Write Routine */
void (*read) __P((void)); /* Interface Read Routine */
void (*read)(void); /* Interface Read Routine */
struct if_info *next; /* Next Interface */
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: device.c,v 1.11 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: device.c,v 1.12 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: device.c,v 1.11 2009/11/17 18:58:07 drochner Exp $");
__RCSID("$NetBSD: device.c,v 1.12 2011/08/30 19:49:10 joerg Exp $");
#endif
#include "os.h"
@ -218,7 +218,7 @@ deviceInitOne(const char *ifname)
* point to point.
*/
void
deviceInitAll()
deviceInitAll(void)
{
#ifdef DEV_NEW_CONF
struct sockaddr_dl *sdl;

View File

@ -1,4 +1,4 @@
/* $NetBSD: device.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: device.h,v 1.7 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: device.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: device.h,v 1.7 2011/08/30 19:49:10 joerg Exp $
*
*/
@ -32,17 +32,17 @@
__BEGIN_DECLS
#ifdef DEV_NEW_CONF
void deviceEthAddr __P((const char *, u_char *));
void deviceEthAddr(const char *, u_char *);
#endif
void deviceInitOne __P((const char *));
void deviceInitAll __P((void));
void deviceInitOne(const char *);
void deviceInitAll(void);
/* from loop-bsd.c */
void Loop __P((void));
int mopOpenDL __P((struct if_info *, int));
int mopOpenRC __P((struct if_info *, int));
void mopReadDL __P((void));
void mopReadRC __P((void));
__dead void Loop(void);
int mopOpenDL(struct if_info *, int);
int mopOpenRC(struct if_info *, int);
void mopReadDL(void);
void mopReadRC(void);
__END_DECLS
#endif /* _DEVICE_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: dl.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: dl.h,v 1.7 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: dl.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: dl.h,v 1.7 2011/08/30 19:49:10 joerg Exp $
*
*/
@ -31,7 +31,7 @@
#define _DL_H_
__BEGIN_DECLS
void mopDumpDL __P((FILE *, const u_char *, int));
void mopDumpDL(FILE *, const u_char *, int);
__END_DECLS
#endif /* _DL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: file.c,v 1.13 2011/08/16 16:45:20 christos Exp $ */
/* $NetBSD: file.c,v 1.14 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1995-96 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: file.c,v 1.13 2011/08/16 16:45:20 christos Exp $");
__RCSID("$NetBSD: file.c,v 1.14 2011/08/30 19:49:10 joerg Exp $");
#endif
#include "os.h"
@ -58,12 +58,11 @@ __RCSID("$NetBSD: file.c,v 1.13 2011/08/16 16:45:20 christos Exp $");
# endif
#endif /* NOELF */
int getCLBYTES __P((int));
int getMID __P((int, int));
static int getCLBYTES(int);
static int getMID(int, int);
const char *
FileTypeName(type)
mopd_imagetype type;
FileTypeName(mopd_imagetype type)
{
switch (type) {
@ -81,10 +80,7 @@ FileTypeName(type)
}
void
mopFilePutLX(buf, idx, value, cnt)
u_char *buf;
int idx, cnt;
u_int32_t value;
mopFilePutLX(u_char *buf, int idx, u_int32_t value, int cnt)
{
int i;
for (i = 0; i < cnt; i++) {
@ -94,10 +90,7 @@ mopFilePutLX(buf, idx, value, cnt)
}
void
mopFilePutBX(buf, idx, value, cnt)
u_char *buf;
int idx, cnt;
u_int32_t value;
mopFilePutBX(u_char *buf, int idx, u_int32_t value, int cnt)
{
int i;
for (i = 0; i < cnt; i++) {
@ -107,9 +100,7 @@ mopFilePutBX(buf, idx, value, cnt)
}
u_int32_t
mopFileGetLX(buf, idx, cnt)
u_char *buf;
int idx, cnt;
mopFileGetLX(u_char *buf, int idx, int cnt)
{
u_int32_t ret = 0;
int i;
@ -125,9 +116,7 @@ mopFileGetLX(buf, idx, cnt)
}
u_int32_t
mopFileGetBX(buf, idx, cnt)
u_char *buf;
int idx, cnt;
mopFileGetBX(u_char *buf, int idx, int cnt)
{
u_int32_t ret = 0;
int i;
@ -143,9 +132,7 @@ mopFileGetBX(buf, idx, cnt)
}
void
mopFileSwapX(buf, idx, cnt)
u_char *buf;
int idx, cnt;
mopFileSwapX(u_char *buf, int idx, int cnt)
{
int i;
u_char c;
@ -159,8 +146,7 @@ mopFileSwapX(buf, idx, cnt)
}
int
CheckMopFile(fd)
int fd;
CheckMopFile(int fd)
{
u_char header[512];
short image_type;
@ -190,8 +176,7 @@ CheckMopFile(fd)
}
int
GetMopFileInfo(dl)
struct dllist *dl;
GetMopFileInfo(struct dllist *dl)
{
u_char header[512];
short image_type;
@ -302,9 +287,8 @@ GetMopFileInfo(dl)
}
#ifndef NOAOUT
int
getMID(old_mid,new_mid)
int old_mid, new_mid;
static int
getMID(int old_mid, int new_mid)
{
int mid;
@ -364,9 +348,8 @@ getMID(old_mid,new_mid)
return(mid);
}
int
getCLBYTES(mid)
int mid;
static int
getCLBYTES(int mid)
{
int clbytes;
@ -421,8 +404,7 @@ getCLBYTES(mid)
#endif
int
CheckElfFile(fd)
int fd;
CheckElfFile(int fd)
{
#ifdef NOELF
return(-1);
@ -449,8 +431,7 @@ CheckElfFile(fd)
}
int
GetElfFileInfo(dl)
struct dllist *dl;
GetElfFileInfo(struct dllist *dl)
{
#ifdef NOELF
return(-1);
@ -633,8 +614,7 @@ GetElfFileInfo(dl)
}
int
CheckAOutFile(fd)
int fd;
CheckAOutFile(int fd)
{
#ifdef NOAOUT
return(-1);
@ -667,8 +647,7 @@ CheckAOutFile(fd)
}
int
GetAOutFileInfo(dl)
struct dllist *dl;
GetAOutFileInfo(struct dllist *dl)
{
#ifdef NOAOUT
return(-1);
@ -869,8 +848,7 @@ GetAOutFileInfo(dl)
}
int
GetFileInfo(dl)
struct dllist *dl;
GetFileInfo(struct dllist *dl)
{
int error;
@ -906,9 +884,7 @@ GetFileInfo(dl)
}
ssize_t
mopFileRead(dlslot, buf)
struct dllist *dlslot;
u_char *buf;
mopFileRead(struct dllist *dlslot, u_char *buf)
{
ssize_t len, outlen;
int bsz, sec;

View File

@ -1,4 +1,4 @@
/* $NetBSD: get.h,v 1.5 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: get.h,v 1.6 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: get.h,v 1.5 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: get.h,v 1.6 2011/08/30 19:49:10 joerg Exp $
*
*/
@ -31,14 +31,14 @@
#define _GET_H_
__BEGIN_DECLS
u_char mopGetChar __P((const u_char *, int *));
u_short mopGetShort __P((const u_char *, int *));
u_int32_t mopGetLong __P((const u_char *, int *));
void mopGetMulti __P((const u_char *, int *, u_char *, int));
int mopGetTrans __P((const u_char *, int));
void mopGetHeader __P((const u_char *, int *, const u_char **, const u_char **,
u_short *, int *, int));
u_short mopGetLength __P((const u_char *, int));
u_char mopGetChar(const u_char *, int *);
u_short mopGetShort(const u_char *, int *);
u_int32_t mopGetLong(const u_char *, int *);
void mopGetMulti(const u_char *, int *, u_char *, int);
int mopGetTrans(const u_char *, int);
void mopGetHeader(const u_char *, int *, const u_char **, const u_char **,
u_short *, int *, int);
u_short mopGetLength(const u_char *, int);
__END_DECLS
#endif /* _GET_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: log.h,v 1.2 2008/04/28 20:24:17 martin Exp $ */
/* $NetBSD: log.h,v 1.3 2011/08/30 19:49:10 joerg Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -34,14 +34,10 @@
__BEGIN_DECLS
extern int mopInteractive;
void mopLogErr __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
void mopLogErrX __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
void mopLogWarn __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
void mopLogWarnX __P((const char *, ...))
__attribute__((__format__(__printf__, 1, 2)));
void mopLogErr(const char *, ...) __dead __printflike(1, 2);
void mopLogErrX(const char *, ...) __dead __printflike(1, 2);
void mopLogWarn(const char *, ...) __printflike(1, 2);
void mopLogWarnX(const char *, ...) __printflike(1, 2);
__END_DECLS
#endif /* _LOG_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: loop-bsd.c,v 1.10 2009/10/20 00:51:13 snj Exp $ */
/* $NetBSD: loop-bsd.c,v 1.11 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: loop-bsd.c,v 1.10 2009/10/20 00:51:13 snj Exp $");
__RCSID("$NetBSD: loop-bsd.c,v 1.11 2011/08/30 19:49:10 joerg Exp $");
#endif
#include <errno.h>
@ -48,9 +48,7 @@ __RCSID("$NetBSD: loop-bsd.c,v 1.10 2009/10/20 00:51:13 snj Exp $");
#include "log.h"
int
mopOpenRC(p, trans)
struct if_info *p;
int trans;
mopOpenRC(struct if_info *p, int trans)
{
#ifndef NORC
return (*(p->iopen))(p->if_name,
@ -63,9 +61,7 @@ mopOpenRC(p, trans)
}
int
mopOpenDL(p, trans)
struct if_info *p;
int trans;
mopOpenDL(struct if_info *p, int trans)
{
#ifndef NODL
return (*(p->iopen))(p->if_name,
@ -78,12 +74,12 @@ mopOpenDL(p, trans)
}
void
mopReadRC()
mopReadRC(void)
{
}
void
mopReadDL()
mopReadDL(void)
{
}
@ -93,14 +89,14 @@ mopReadDL()
*/
struct if_info *iflist;
void mopProcess __P((struct if_info *, u_char *));
void mopProcess(struct if_info *, u_char *);
/*
* Loop indefinitely listening for MOP requests on the
* interfaces in 'iflist'.
*/
void
Loop()
Loop(void)
{
u_char *buf, *bp, *ep;
int cc, n, m;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mopdef.c,v 1.4 2009/10/20 00:51:13 snj Exp $ */
/* $NetBSD: mopdef.c,v 1.5 2011/08/30 19:49:10 joerg Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mopdef.c,v 1.4 2009/10/20 00:51:13 snj Exp $");
__RCSID("$NetBSD: mopdef.c,v 1.5 2011/08/30 19:49:10 joerg Exp $");
#endif
#define MOPDEF_SURPESS_EXTERN
@ -40,7 +40,7 @@ char lp_802_proto[5] = MOP_K_PROTO_802_LP; /* Loopback 802.2 */
#if 0
int
mopdef_dummy()
mopdef_dummy(void)
{
/* Just to keep them as variables */
return(dl_mcst[0]-rc_mcst[0]-

View File

@ -1,4 +1,4 @@
/* $NetBSD: nma.c,v 1.5 2009/10/20 00:51:13 snj Exp $ */
/* $NetBSD: nma.c,v 1.6 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: nma.c,v 1.5 2009/10/20 00:51:13 snj Exp $");
__RCSID("$NetBSD: nma.c,v 1.6 2011/08/30 19:49:11 joerg Exp $");
#endif
#include "os.h"
@ -188,8 +188,7 @@ struct commDev nmaCommDev[] = {
};
const char *
nmaGetShort(devno)
int devno;
nmaGetShort(int devno)
{
struct commDev *current;
@ -205,8 +204,7 @@ nmaGetShort(devno)
}
const char *
nmaGetDevice(devno)
int devno;
nmaGetDevice(int devno)
{
struct commDev *current;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nma.h,v 1.6 2009/10/20 00:51:13 snj Exp $ */
/* $NetBSD: nma.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: nma.h,v 1.6 2009/10/20 00:51:13 snj Exp $
* $NetBSD: nma.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@ -31,8 +31,8 @@
#define _NMA_H_
__BEGIN_DECLS
const char *nmaGetShort __P((int));
const char *nmaGetDevice __P((int));
const char *nmaGetShort(int);
const char *nmaGetDevice(int);
__END_DECLS
#endif /* _NMA_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pf.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: pf.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: pf.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: pf.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@ -31,13 +31,13 @@
#define _PF_H_
__BEGIN_DECLS
int pfTrans __P((const char *));
int pfInit __P((const char *, int, u_short, int));
int pfEthAddr __P((int, u_char *));
int pfAddMulti __P((int, const char *, const char *));
int pfDelMulti __P((int, const char *, const char *));
int pfRead __P((int, u_char *, int));
int pfWrite __P((int, const u_char *, int, int));
int pfTrans(const char *);
int pfInit(const char *, int, u_short, int);
int pfEthAddr(int, u_char *);
int pfAddMulti(int, const char *, const char *);
int pfDelMulti(int, const char *, const char *);
int pfRead(int, u_char *, int);
int pfWrite(int, const u_char *, int, int);
__END_DECLS
#endif /* _PF_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: print.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: print.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: print.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: print.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@ -31,16 +31,15 @@
#define _PRINT_H_
__BEGIN_DECLS
void mopPrintHWA __P((FILE *, const u_char *));
void mopPrintBPTY __P((FILE *, u_char));
void mopPrintPGTY __P((FILE *, u_char));
void mopPrintOneline __P((FILE *, const u_char *, int));
void mopPrintHeader __P((FILE *, const u_char *, int));
void mopPrintMopHeader __P((FILE *, const u_char *, int));
void mopPrintDevice __P((FILE *, u_char));
void mopPrintTime __P((FILE *, const u_char *));
void mopPrintInfo __P((FILE *, const u_char *, int *, u_short,
u_char, int));
void mopPrintHWA(FILE *, const u_char *);
void mopPrintBPTY(FILE *, u_char);
void mopPrintPGTY(FILE *, u_char);
void mopPrintOneline(FILE *, const u_char *, int);
void mopPrintHeader(FILE *, const u_char *, int);
void mopPrintMopHeader(FILE *, const u_char *, int);
void mopPrintDevice(FILE *, u_char);
void mopPrintTime(FILE *, const u_char *);
void mopPrintInfo(FILE *, const u_char *, int *, u_short, u_char, int);
__END_DECLS
#endif /* _PRINT_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: put.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: put.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: put.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: put.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@ -31,13 +31,13 @@
#define _PUT_H_
__BEGIN_DECLS
void mopPutChar __P((u_char *, int *, u_char));
void mopPutShort __P((u_char *, int *, u_short));
void mopPutLong __P((u_char *, int *, u_int32_t));
void mopPutMulti __P((u_char *, int *, const u_char *, int));
void mopPutTime __P((u_char *, int *, time_t));
void mopPutHeader __P((u_char *, int *, const u_char *, const u_char *, u_short, int));
void mopPutLength __P((u_char *, int, u_short));
void mopPutChar(u_char *, int *, u_char);
void mopPutShort(u_char *, int *, u_short);
void mopPutLong(u_char *, int *, u_int32_t);
void mopPutMulti(u_char *, int *, const u_char *, int);
void mopPutTime(u_char *, int *, time_t);
void mopPutHeader(u_char *, int *, const u_char *, const u_char *, u_short, int);
void mopPutLength(u_char *, int, u_short);
__END_DECLS
#endif /* _PUT_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: rc.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: rc.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: rc.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: rc.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@ -31,7 +31,7 @@
#define _RC_H_
__BEGIN_DECLS
void mopDumpRC __P((FILE *, const u_char *, int));
void mopDumpRC(FILE *, const u_char *, int);
__END_DECLS
#endif /* _RC_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mopchk.c,v 1.12 2009/10/20 00:51:13 snj Exp $ */
/* $NetBSD: mopchk.c,v 1.13 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1995-96 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mopchk.c,v 1.12 2009/10/20 00:51:13 snj Exp $");
__RCSID("$NetBSD: mopchk.c,v 1.13 2011/08/30 19:49:11 joerg Exp $");
#endif
/*
@ -49,9 +49,8 @@ __RCSID("$NetBSD: mopchk.c,v 1.12 2009/10/20 00:51:13 snj Exp $");
*/
struct if_info *iflist;
void Usage __P((void));
int main __P((int, char **));
void mopProcess __P((struct if_info *, u_char *));
__dead static void Usage(void);
void mopProcess(struct if_info *, u_char *);
int AllFlag = 0; /* listen on "all" interfaces */
int VersionFlag = 0; /* Show version */
@ -60,9 +59,7 @@ int promisc = 0; /* promisc mode not needed */
extern char version[];
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
struct dllist dl;
int op, i;
@ -143,8 +140,8 @@ main(argc, argv)
return (0);
}
void
Usage()
static void
Usage(void)
{
(void) fprintf(stderr, "usage: %s [-a] [-v] [filename...]\n",
getprogname());
@ -156,8 +153,6 @@ Usage()
* Doesn't actually do anything for mopchk(1)
*/
void
mopProcess(ii, pkt)
struct if_info *ii;
u_char *pkt;
mopProcess(struct if_info *ii, u_char *pkt)
{
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mopcopy.c,v 1.4 2009/08/20 22:26:19 he Exp $ */
/* $NetBSD: mopcopy.c,v 1.5 2011/08/30 19:49:11 joerg Exp $ */
/* mopcopy - Convert a Unix format kernel into something that
* can be transfered via MOP.
@ -49,7 +49,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mopcopy.c,v 1.4 2009/08/20 22:26:19 he Exp $");
__RCSID("$NetBSD: mopcopy.c,v 1.5 2011/08/30 19:49:11 joerg Exp $");
#endif
#include "os.h"
@ -89,7 +89,7 @@ struct exec ex, ex_swap;
#endif
int
main (int argc, char **argv)
main(int argc, char **argv)
{
FILE *out; /* A FILE because that is easier. */
int i, j;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mopd.c,v 1.13 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: mopd.c,v 1.14 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-96 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mopd.c,v 1.13 2009/11/17 18:58:07 drochner Exp $");
__RCSID("$NetBSD: mopd.c,v 1.14 2011/08/30 19:49:11 joerg Exp $");
#endif
/*
@ -56,9 +56,8 @@ __RCSID("$NetBSD: mopd.c,v 1.13 2009/11/17 18:58:07 drochner Exp $");
*/
struct if_info *iflist;
void Usage __P((void));
int main __P((int, char **));
void mopProcess __P((struct if_info *, u_char *));
__dead static void Usage(void);
void mopProcess(struct if_info *, u_char *);
int AllFlag = 0; /* listen on "all" interfaces */
int DebugFlag = 0; /* print debugging messages */
@ -70,9 +69,7 @@ int promisc = 1; /* Need promisc mode */
const char *MopdDir = MOP_FILE_PATH; /* Path to mop directory */
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
int c, pid;
@ -155,8 +152,8 @@ main(argc, argv)
return (0);
}
void
Usage()
static void
Usage(void)
{
(void) fprintf(stderr, "usage: %s -a [ -d -f -v ] [ -3 | -4 ]\n",
getprogname());
@ -170,9 +167,7 @@ Usage()
* Process incomming packages.
*/
void
mopProcess(ii, pkt)
struct if_info *ii;
u_char *pkt;
mopProcess(struct if_info *ii, u_char *pkt)
{
const u_char *dst, *src;
u_short ptype;

View File

@ -1,4 +1,4 @@
/* $NetBSD: process.h,v 1.6 2009/11/17 18:58:07 drochner Exp $ */
/* $NetBSD: process.h,v 1.7 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $NetBSD: process.h,v 1.6 2009/11/17 18:58:07 drochner Exp $
* $NetBSD: process.h,v 1.7 2011/08/30 19:49:11 joerg Exp $
*
*/
@ -31,10 +31,10 @@
#define _PROCESS_H_
__BEGIN_DECLS
void mopProcessDL __P((FILE *, struct if_info *, u_char *, int *,
const u_char *, const u_char *, int, u_short));
void mopProcessRC __P((FILE *, struct if_info *, u_char *, int *,
const u_char *, const u_char *, int, u_short));
void mopProcessDL(FILE *, struct if_info *, u_char *, int *,
const u_char *, const u_char *, int, u_short);
void mopProcessRC(FILE *, struct if_info *, u_char *, int *,
const u_char *, const u_char *, int, u_short);
__END_DECLS
#endif /* _PROCESS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mopprobe.c,v 1.10 2009/10/20 00:51:13 snj Exp $ */
/* $NetBSD: mopprobe.c,v 1.11 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-96 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: mopprobe.c,v 1.10 2009/10/20 00:51:13 snj Exp $");
__RCSID("$NetBSD: mopprobe.c,v 1.11 2011/08/30 19:49:11 joerg Exp $");
#endif
/*
@ -53,9 +53,8 @@ __RCSID("$NetBSD: mopprobe.c,v 1.10 2009/10/20 00:51:13 snj Exp $");
*/
struct if_info *iflist;
void Usage __P((void));
int main __P((int, char **));
void mopProcess __P((struct if_info *, u_char *));
__dead static void Usage(void);
void mopProcess(struct if_info *, u_char *);
int AllFlag = 0; /* listen on "all" interfaces */
int DebugFlag = 0; /* print debugging messages */
@ -65,9 +64,7 @@ int oflag = 0; /* print only once */
int promisc = 1; /* Need promisc mode */
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
int op;
char *interface;
@ -115,8 +112,8 @@ main(argc, argv)
return (0);
}
void
Usage()
static void
Usage(void)
{
(void) fprintf(stderr, "usage: %s -a [ -3 | -4 ]\n", getprogname());
(void) fprintf(stderr, " %s [ -3 | -4 ] interface\n",
@ -128,9 +125,7 @@ Usage()
* Process incomming packages.
*/
void
mopProcess(ii, pkt)
struct if_info *ii;
u_char *pkt;
mopProcess(struct if_info *ii, u_char *pkt)
{
u_char *dst, *src, *p, mopcode, tmpc, ilen;
u_short *ptype, moplen, tmps, itype, len;

View File

@ -1,4 +1,4 @@
/* $NetBSD: moptrace.c,v 1.10 2009/10/20 00:51:14 snj Exp $ */
/* $NetBSD: moptrace.c,v 1.11 2011/08/30 19:49:11 joerg Exp $ */
/*
* Copyright (c) 1993-95 Mats O Jansson. All rights reserved.
@ -26,7 +26,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: moptrace.c,v 1.10 2009/10/20 00:51:14 snj Exp $");
__RCSID("$NetBSD: moptrace.c,v 1.11 2011/08/30 19:49:11 joerg Exp $");
#endif
/*
@ -53,9 +53,8 @@ __RCSID("$NetBSD: moptrace.c,v 1.10 2009/10/20 00:51:14 snj Exp $");
*/
struct if_info *iflist;
void Usage __P((void));
int main __P((int, char **));
void mopProcess __P((struct if_info *, u_char *));
__dead static void Usage(void);
void mopProcess(struct if_info *, u_char *);
int AllFlag = 0; /* listen on "all" interfaces */
int DebugFlag = 0; /* print debugging messages */
@ -64,9 +63,7 @@ int Not4Flag = 0; /* Ignore MOP V4 messages */
int promisc = 1; /* Need promisc mode */
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
int op;
char *interface;
@ -110,8 +107,8 @@ main(argc, argv)
return (0);
}
void
Usage()
static void
Usage(void)
{
(void) fprintf(stderr, "usage: %s -a [ -d ] [ -3 | -4 ]\n",
getprogname());
@ -124,9 +121,7 @@ Usage()
* Process incoming packages.
*/
void
mopProcess(ii, pkt)
struct if_info *ii;
u_char *pkt;
mopProcess(struct if_info *ii, u_char *pkt)
{
int trans;