Changed library headers

This commit is contained in:
Michiel Broek
2004-02-21 17:22:00 +00:00
parent ceb052ecd6
commit 0334e7cc59
236 changed files with 756 additions and 1839 deletions

View File

@@ -6,13 +6,13 @@ include ../Makefile.global
SRCS = callstat.c scanout.c taskcomm.c taskinfo.c taskstat.c \
mbtask.c outstat.c signame.c taskdisk.c taskregs.c taskutil.c \
ports.c calllist.c ping.c crc.c taskchat.c
ports.c calllist.c ping.c taskchat.c crc.c
HDRS = callstat.h mbtask.h outstat.h signame.h taskdisk.h taskregs.h taskutil.h \
libs.h scanout.h taskcomm.h taskinfo.h taskstat.h \
ports.h calllist.h ping.h crc.h taskchat.h
scanout.h taskcomm.h taskinfo.h taskstat.h \
ports.h calllist.h ping.h taskchat.h
OBJS = callstat.o scanout.o taskcomm.o taskinfo.o taskstat.o \
mbtask.o outstat.o signame.o taskdisk.o taskregs.o taskutil.o \
ports.o calllist.o ping.o crc.o taskchat.o
ports.o calllist.o ping.o taskchat.o crc.o
LIBS += ../lib/libnodelist.a
OTHER = Makefile issue issue.netbsd
@@ -68,20 +68,20 @@ depend:
# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
# Dependencies generated by make depend
callstat.o: ../config.h libs.h ../lib/structs.h taskutil.h callstat.h
scanout.o: ../config.h libs.h ../lib/structs.h taskutil.h scanout.h
taskcomm.o: ../config.h libs.h ../lib/structs.h taskstat.h taskregs.h taskdisk.h taskinfo.h taskutil.h taskchat.h taskcomm.h
taskinfo.o: ../config.h libs.h ../lib/structs.h taskinfo.h
taskstat.o: ../config.h libs.h ../lib/structs.h ../lib/mberrors.h taskstat.h callstat.h outstat.h taskutil.h
mbtask.o: ../config.h libs.h ../lib/structs.h ../paths.h ../lib/mberrors.h signame.h taskstat.h taskutil.h taskregs.h taskcomm.h callstat.h outstat.h ../lib/nodelist.h ports.h calllist.h ping.h taskchat.h mbtask.h
outstat.o: ../config.h libs.h ../lib/structs.h ../lib/mberrors.h taskutil.h taskstat.h scanout.h ../lib/nodelist.h callstat.h ports.h outstat.h
callstat.o: ../config.h ../lib/mbselib.h taskutil.h callstat.h
scanout.o: ../config.h ../lib/mbselib.h taskutil.h scanout.h
taskcomm.o: ../config.h ../lib/mbselib.h taskstat.h taskregs.h taskdisk.h taskinfo.h taskutil.h taskchat.h taskcomm.h
taskinfo.o: ../config.h ../lib/mbselib.h taskinfo.h
taskstat.o: ../config.h ../lib/mbselib.h taskstat.h callstat.h outstat.h taskutil.h
mbtask.o: ../config.h ../lib/mbselib.h ../paths.h signame.h taskstat.h taskutil.h taskregs.h taskcomm.h callstat.h outstat.h ../lib/nodelist.h ports.h calllist.h ping.h taskchat.h mbtask.h
outstat.o: ../config.h ../lib/mbselib.h taskutil.h taskstat.h scanout.h ../lib/nodelist.h callstat.h ports.h outstat.h
signame.o: ../config.h signame.h
taskdisk.o: ../config.h libs.h ../lib/structs.h taskdisk.h taskutil.h
taskregs.o: ../config.h libs.h ../lib/structs.h taskstat.h taskregs.h taskchat.h taskutil.h
taskutil.o: ../config.h libs.h ../lib/structs.h signame.h scanout.h crc.h taskutil.h
ports.o: ../config.h libs.h ../lib/structs.h taskutil.h ../lib/nodelist.h ports.h
calllist.o: ../config.h libs.h ../lib/structs.h taskstat.h taskutil.h callstat.h outstat.h mbtask.h calllist.h
ping.o: ../config.h libs.h ../lib/structs.h ../lib/mberrors.h taskstat.h taskutil.h ping.h
crc.o: ../config.h libs.h crc.h
taskchat.o: ../config.h libs.h ../lib/structs.h taskutil.h taskregs.h taskchat.h
taskdisk.o: ../config.h ../lib/mbselib.h taskdisk.h taskutil.h
taskregs.o: ../config.h ../lib/mbselib.h taskstat.h taskregs.h taskchat.h taskutil.h
taskutil.o: ../config.h ../lib/mbselib.h signame.h scanout.h taskutil.h
ports.o: ../config.h ../lib/mbselib.h taskutil.h ../lib/nodelist.h ports.h
calllist.o: ../config.h ../lib/mbselib.h taskstat.h taskutil.h callstat.h outstat.h mbtask.h calllist.h
ping.o: ../config.h ../lib/mbselib.h taskstat.h taskutil.h ping.h
taskchat.o: ../config.h ../lib/mbselib.h taskutil.h taskregs.h taskchat.h
crc.o: ../config.h ../lib/mbselib.h
# End of generated dependencies

View File

@@ -4,7 +4,7 @@
* Purpose ...............: mbtask - calllist
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskstat.h"
#include "taskutil.h"
#include "callstat.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Read mailer last call status
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskutil.h"
#include "callstat.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Crc32 calculations
*
*****************************************************************************
* Copyright (C) 1993-2002
* Copyright (C) 1993-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "crc.h"
#include "../lib/mbselib.h"
/*

View File

@@ -1,8 +0,0 @@
#ifndef _CRC_H
#define _CRC_H
/* $Id$ */
unsigned long StringCRC32(char *);
#endif

View File

@@ -1,146 +0,0 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: Libraries include list for mbtask
*
*****************************************************************************
* Copyright (C) 1997-2003
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
* 1971 BV IJmuiden
* the Netherlands
*
* This file is part of MBSE BBS.
*
* This BBS is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* MBSE BBS is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MBSE BBS; see the file COPYING. If not, write to the Free
* Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*****************************************************************************/
#ifndef _LIBS_H
#define _LIBS_H
#define TRUE 1
#define FALSE 0
#define SS_BUFSIZE 1024 /* Streams socket buffersize */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/poll.h>
#include <netinet/in.h>
#include <sys/un.h>
#include <string.h>
#include <errno.h>
#include <sys/fcntl.h>
#include <sys/utsname.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <stdarg.h>
#include <netdb.h>
#include <arpa/inet.h>
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include <pwd.h>
#include <pthread.h>
#include <stddef.h>
#include <fcntl.h>
#if defined(__FreeBSD__) || defined(__NetBSD__)
#include <netinet/in_systm.h>
#endif
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
/*
* Some older systems don;t have this
*/
#ifndef ICMP_FILTER
#define ICMP_FILTER 1
struct icmp_filter {
u_int32_t data;
};
#endif
/* some older glibc versions seem to lack this. */
# ifndef IP_PKTINFO
# define IP_PKTINFO 8
# endif
/* A macro to extract the pointer to the address of a struct sockaddr (_in or _in6) */
#define SOCKA_A4(a) ((void *)&((struct sockaddr_in *)(a))->sin_addr)
/* Some old libs don't have socklen_t */
#ifndef socklen_t
#define socklen_t unsigned int
#endif
#pragma pack(1)
#define MAXNAME 35
#define MAXUFLAGS 16
typedef struct _faddr {
char *name;
unsigned int point;
unsigned int node;
unsigned int net;
unsigned int zone;
char *domain;
} faddr;
/*
* ANSI colors
*/
#define BLACK 0
#define BLUE 1
#define GREEN 2
#define CYAN 3
#define RED 4
#define MAGENTA 5
#define BROWN 6
#define LIGHTGRAY 7
#define DARKGRAY 8
#define LIGHTBLUE 9
#define LIGHTGREEN 10
#define LIGHTCYAN 11
#define LIGHTRED 12
#define LIGHTMAGENTA 13
#define YELLOW 14
#define WHITE 15
#endif

View File

@@ -4,7 +4,7 @@
* Purpose ...............: MBSE BBS Task Manager
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,10 +29,8 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "../paths.h"
#include "../lib/mberrors.h"
#include "signame.h"
#include "taskstat.h"
#include "taskutil.h"

View File

@@ -29,9 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mberrors.h"
#include "../lib/mbselib.h"
#include "taskutil.h"
#include "taskstat.h"
#include "scanout.h"

View File

@@ -29,9 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mberrors.h"
#include "../lib/mbselib.h"
#include "taskstat.h"
#include "taskutil.h"
#include "ping.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: mbtask - mode portlists
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskutil.h"
#include "../lib/nodelist.h"
#include "ports.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Outbound scanning
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskutil.h"
#include "scanout.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Signal names
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10

View File

@@ -4,7 +4,7 @@
* Purpose ...............: mbtask - chat server
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskutil.h"
#include "taskregs.h"
#include "taskchat.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: MBSE BBS Daemon
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskstat.h"
#include "taskregs.h"
#include "taskdisk.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Give status of all filesystems
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskdisk.h"
#include "taskutil.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Give system information
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskinfo.h"
@@ -43,7 +42,6 @@ char *get_sysinfo(void)
FILE *fp;
static char buf[SS_BUFSIZE];
char *temp;
struct sysrec SYSINFO;
sprintf(buf, "201:1,16;");
temp = calloc(128, sizeof(char));
@@ -71,7 +69,6 @@ char *get_lastcallercount(void)
static char buf[SS_BUFSIZE];
char *temp;
FILE *fp;
struct lastcallershdr LCALLhdr;
sprintf(buf, "201:1,16;");
temp = calloc(128, sizeof(char));
@@ -94,8 +91,6 @@ char *get_lastcallerrec(int Rec)
static char buf[SS_BUFSIZE];
char *temp, action[9];
FILE *fp;
struct lastcallershdr LCALLhdr;
struct lastcallers LCALL;
sprintf(buf, "201:1,16;");
temp = calloc(128, sizeof(char));

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Buffers for registration information.
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,8 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "taskstat.h"
#include "taskregs.h"
#include "taskchat.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Keep track of server status
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,9 +29,7 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mberrors.h"
#include "../lib/mbselib.h"
#include "taskstat.h"
#include "callstat.h"
#include "outstat.h"

View File

@@ -4,7 +4,7 @@
* Purpose ...............: MBSE BBS Task Manager, utilities
*
*****************************************************************************
* Copyright (C) 1997-2003
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -29,11 +29,9 @@
*****************************************************************************/
#include "../config.h"
#include "libs.h"
#include "../lib/structs.h"
#include "../lib/mbselib.h"
#include "signame.h"
#include "scanout.h"
#include "crc.h"
#include "taskutil.h"