Splitted the libaries, the nodelist functions are separated
This commit is contained in:
22
lib/Makefile
22
lib/Makefile
@@ -8,16 +8,19 @@ CLCOMM_SRCS = clcomm.c client.c crc.c semafore.c signame.c
|
||||
CLCOMM_OBJS = clcomm.o client.o crc.o semafore.o signame.o
|
||||
CLCOMM_HDRS = clcomm.h
|
||||
COMMON_SRCS = attach.c charconv_utf.c falists.c hdr.c parsedate.c rfcmsg.c unpacker.c \
|
||||
batchrd.c charset.c ftn.c nodelist.c pktname.c mangle.c sectest.c \
|
||||
batchrd.c charset.c ftn.c pktname.c mangle.c sectest.c \
|
||||
charconv.c dostran.c ftnmsg.c mbfile.c nodelock.c rawio.c strcasestr.c \
|
||||
charconv_hz.c execute.c expipe.c getheader.c mime.c noderecord.c rfcaddr.c strutil.c \
|
||||
charconv_jp.c faddr.c gmtoffset.c packet.c rfcdate.c term.c
|
||||
COMMON_OBJS = ftscprod.o attach.o charconv_utf.o falists.o hdr.o parsedate.o rfcmsg.o unpacker.o \
|
||||
batchrd.o charset.o ftn.o nodelist.o pktname.o mangle.o sectest.o \
|
||||
batchrd.o charset.o ftn.o pktname.o mangle.o sectest.o \
|
||||
charconv.o dostran.o ftnmsg.o mbfile.o nodelock.o rawio.o strcasestr.o \
|
||||
charconv_hz.o execute.o expipe.o getheader.o mime.o noderecord.o rfcaddr.o strutil.o \
|
||||
charconv_jp.o faddr.o gmtoffset.o packet.o rfcdate.o term.o
|
||||
COMMON_HDRS = common.h
|
||||
NODELIST_SRCS = nodelist.c
|
||||
NODELIST_OBJS = nodelist.o
|
||||
NODELIST_HDRS = nodelist.h
|
||||
DBASE_SRCS = dbcfg.c dbdupe.c dbftn.c dbmsgs.c dbnode.c dbtic.c dbuser.c
|
||||
DBASE_OBJS = dbcfg.o dbdupe.o dbftn.o dbmsgs.o dbnode.o dbtic.o dbuser.o
|
||||
DBASE_HDRS = dbcfg.h dbdupe.h dbftn.h dbmsgs.h dbnode.h dbtic.h dbuser.h
|
||||
@@ -35,14 +38,15 @@ MEMWATCH_OBJS = memwatch.o
|
||||
MEMWATCH_HDRS = memwatch.h
|
||||
OTHER_HDRS = ansi.h bluewave.h libs.h mbse.h records.h structs.h users.h mberrors.h
|
||||
SRCS = ${CLCOMM_SRCS} ${COMMON_SRCS} ${DBASE_SRCS} ${MSGBASE_SRCS} ${MBINET_SRCS} \
|
||||
${DIESEL_SRCS} ${MEMWATCH_SRCS}
|
||||
${DIESEL_SRCS} ${MEMWATCH_SRCS} ${NODELIST_SRCS}
|
||||
OBJS = ${CLCOMM_OBJS} ${COMMON_OBJS} ${DBASE_OBJS} ${MSGBASE_OBJS} ${MBINET_OBJS} \
|
||||
${DIESEL_OBJS} ${MEMWATCH_OBJS}
|
||||
${DIESEL_OBJS} ${MEMWATCH_OBJS} ${NODELIST_OBJS}
|
||||
HDRS = ${CLCOMM_HDRS} ${COMMON_HDRS} ${DBASE_HDRS} ${MSGBASE_HDRS} ${MBINET_HDRS} \
|
||||
${DIESEL_HDRS} ${MEMWATCH_HDRS} ${OTHER_HDRS}
|
||||
${DIESEL_HDRS} ${MEMWATCH_HDRS} ${NODELIST_HDRS} ${OTHER_HDRS}
|
||||
OTHER = Makefile README ftscprod.006 mkprod.awk FAQ README.memwatch USING test.c \
|
||||
memwatch.c.org README.diesel README.macro Diesel.doc nodelist.conf
|
||||
TARGET = libclcomm.a libcommon.a libdbase.a libmsgbase.a libmbinet.a libdiesel.a libmemwatch.a
|
||||
TARGET = libclcomm.a libcommon.a libdbase.a libmsgbase.a libmbinet.a libdiesel.a \
|
||||
libmemwatch.a libnodelist.a
|
||||
|
||||
#############################################################################
|
||||
|
||||
@@ -82,6 +86,10 @@ libmemwatch.a: ${MEMWATCH_OBJS}
|
||||
ar r $@ $?
|
||||
${RANLIB} $@
|
||||
|
||||
libnodelist.a: ${NODELIST_OBJS}
|
||||
ar r $@ $?
|
||||
${RANLIB} $@
|
||||
|
||||
install: all
|
||||
${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0444 nodelist.conf ${ETCDIR}
|
||||
|
||||
@@ -131,7 +139,6 @@ unpacker.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h c
|
||||
batchrd.o: ../config.h libs.h memwatch.h structs.h clcomm.h common.h
|
||||
charset.o: ../config.h libs.h memwatch.h structs.h common.h clcomm.h
|
||||
ftn.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h dbftn.h common.h
|
||||
nodelist.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h common.h
|
||||
pktname.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h common.h
|
||||
mangle.o: ../config.h libs.h memwatch.h structs.h clcomm.h common.h
|
||||
sectest.o: ../config.h libs.h structs.h common.h clcomm.h
|
||||
@@ -172,5 +179,6 @@ smtp.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h mbine
|
||||
diesel.o: ../config.h libs.h memwatch.h diesel.h
|
||||
mbdiesel.o: ../config.h libs.h memwatch.h structs.h users.h records.h common.h clcomm.h diesel.h
|
||||
memwatch.o: ../config.h libs.h memwatch.h
|
||||
nodelist.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h common.h nodelist.h
|
||||
ftscprod.o: ../config.h libs.h memwatch.h structs.h common.h
|
||||
# End of generated dependencies
|
||||
|
181
lib/common.h
181
lib/common.h
@@ -48,89 +48,6 @@
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Analogue Modem flag values, order is important, first the
|
||||
* compresion capabilities, then the linespeeds. This is late
|
||||
* tested by portsel to find the fastest common connection
|
||||
* speed for a given line if you have multiple dialout modems.
|
||||
*/
|
||||
#define NL_MNP 0x00000001L
|
||||
#define NL_V42 0x00000002L
|
||||
#define NL_V42B 0x00000004L
|
||||
#define NL_V22 0x00000008L
|
||||
#define NL_V29 0x00000010L
|
||||
#define NL_V32 0x00000020L
|
||||
#define NL_H96 0x00000040L
|
||||
#define NL_HST 0x00000080L
|
||||
#define NL_MAX 0x00000100L
|
||||
#define NL_PEP 0x00000200L
|
||||
#define NL_CSP 0x00000400L
|
||||
#define NL_V32B 0x00000800L
|
||||
#define NL_H14 0x00001000L
|
||||
#define NL_V32T 0x00002000L
|
||||
#define NL_H16 0x00004000L
|
||||
#define NL_ZYX 0x00008000L
|
||||
#define NL_Z19 0x00010000L
|
||||
#define NL_VFC 0x00020000L
|
||||
#define NL_V34 0x00040000L
|
||||
#define NL_X2C 0x00080000L
|
||||
#define NL_X2S 0x00100000L
|
||||
#define NL_V90C 0x00200000L
|
||||
#define NL_V90S 0x00400000L
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ISDN Flags
|
||||
*/
|
||||
#define ND_V110L 0x00000001L
|
||||
#define ND_V110H 0x00000002L
|
||||
#define ND_V120L 0x00000004L
|
||||
#define ND_V120H 0x00000008L
|
||||
#define ND_X75 0x00000010L
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* TCP/IP flags
|
||||
*/
|
||||
#define IP_IBN 0x00000001L
|
||||
#define IP_IFC 0x00000002L
|
||||
#define IP_ITN 0x00000004L
|
||||
#define IP_IVM 0x00000008L
|
||||
#define IP_IP 0x00000010L
|
||||
#define IP_IFT 0x00000020L
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Online special flags
|
||||
*/
|
||||
#define OL_CM 0x00000001L
|
||||
#define OL_MO 0x00000002L
|
||||
#define OL_LO 0x00000004L
|
||||
#define OL_MN 0x00000008L
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Request flags
|
||||
*/
|
||||
#define RQ_RQMODE 0x0000000fL
|
||||
#define RQ_RQ_BR 0x00000001L
|
||||
#define RQ_RQ_BU 0x00000002L
|
||||
#define RQ_RQ_WR 0x00000004L
|
||||
#define RQ_RQ_WU 0x00000008L
|
||||
#define RQ_XA (RQ_RQ_BR | RQ_RQ_BU | RQ_RQ_WR | RQ_RQ_WU)
|
||||
#define RQ_XB (RQ_RQ_BR | RQ_RQ_BU | RQ_RQ_WR )
|
||||
#define RQ_XC (RQ_RQ_BR | RQ_RQ_WR | RQ_RQ_WU)
|
||||
#define RQ_XP (RQ_RQ_BR | RQ_RQ_BU )
|
||||
#define RQ_XR (RQ_RQ_BR | RQ_RQ_WR )
|
||||
#define RQ_XW ( RQ_RQ_WR )
|
||||
#define RQ_XX ( RQ_RQ_WR | RQ_RQ_WU)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Returned function keys
|
||||
*/
|
||||
@@ -271,91 +188,6 @@ extern struct _ftscprod {
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Nodelist entry
|
||||
*/
|
||||
typedef struct _node {
|
||||
faddr addr; /* Node address */
|
||||
unsigned short upnet; /* Uplink netnumber */
|
||||
unsigned short upnode; /* Uplink nodenumber */
|
||||
unsigned short region; /* Region belongin to */
|
||||
unsigned char type;
|
||||
unsigned char pflag;
|
||||
char *name; /* System name */
|
||||
char *location; /* System location */
|
||||
char *sysop; /* Sysop name */
|
||||
char *phone; /* Phone number */
|
||||
unsigned speed; /* Baudrate */
|
||||
unsigned long mflags; /* Modem flags */
|
||||
unsigned long dflags; /* ISDN flags */
|
||||
unsigned long iflags; /* TCP-IP flags */
|
||||
unsigned long oflags; /* Online flags */
|
||||
unsigned long xflags; /* Request flags */
|
||||
char *uflags[MAXUFLAGS]; /* User flags */
|
||||
int t1; /* T flag, first char */
|
||||
int t2; /* T flag, second char */
|
||||
} node;
|
||||
|
||||
|
||||
|
||||
extern struct _fkey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} fkey[];
|
||||
|
||||
|
||||
|
||||
extern struct _dkey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} dkey[];
|
||||
|
||||
|
||||
|
||||
extern struct _ikey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} ikey[];
|
||||
|
||||
|
||||
|
||||
extern struct _okey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} okey[];
|
||||
|
||||
|
||||
|
||||
extern struct _xkey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} xkey[];
|
||||
|
||||
|
||||
|
||||
extern struct _nodelist {
|
||||
char *domain;
|
||||
FILE *fp;
|
||||
} *nodevector;
|
||||
|
||||
|
||||
|
||||
struct _ixentry {
|
||||
unsigned short zone;
|
||||
unsigned short net;
|
||||
unsigned short node;
|
||||
unsigned short point;
|
||||
};
|
||||
|
||||
|
||||
|
||||
extern struct _pkey {
|
||||
char *key;
|
||||
unsigned char type;
|
||||
unsigned char pflag;
|
||||
} pkey[];
|
||||
|
||||
|
||||
extern char SigName[32][16];
|
||||
|
||||
|
||||
@@ -463,19 +295,6 @@ int mkdirs(char *name, mode_t);
|
||||
int diskfree(int);
|
||||
|
||||
|
||||
/*
|
||||
* From nodelist.c
|
||||
*/
|
||||
int initnl(void);
|
||||
node *getnlent(faddr *);
|
||||
void olflags(unsigned long);
|
||||
void rqflags(unsigned long);
|
||||
void moflags(unsigned long);
|
||||
void diflags(unsigned long);
|
||||
void ipflags(unsigned long);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* From nodelock.c
|
||||
*/
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include "records.h"
|
||||
#include "clcomm.h"
|
||||
#include "common.h"
|
||||
#include "nodelist.h"
|
||||
|
||||
|
||||
#define NULLDOMAIN "nulldomain"
|
||||
|
196
lib/nodelist.h
Normal file
196
lib/nodelist.h
Normal file
@@ -0,0 +1,196 @@
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef _NODELIST_H
|
||||
#define _NODELIST_H
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
|
||||
#define MAXNAME 35
|
||||
#define MAXUFLAGS 16
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Analogue Modem flag values, order is important, first the
|
||||
* compresion capabilities, then the linespeeds. This is late
|
||||
* tested by portsel to find the fastest common connection
|
||||
* speed for a given line if you have multiple dialout modems.
|
||||
*/
|
||||
#define NL_MNP 0x00000001L
|
||||
#define NL_V42 0x00000002L
|
||||
#define NL_V42B 0x00000004L
|
||||
#define NL_V22 0x00000008L
|
||||
#define NL_V29 0x00000010L
|
||||
#define NL_V32 0x00000020L
|
||||
#define NL_H96 0x00000040L
|
||||
#define NL_HST 0x00000080L
|
||||
#define NL_MAX 0x00000100L
|
||||
#define NL_PEP 0x00000200L
|
||||
#define NL_CSP 0x00000400L
|
||||
#define NL_V32B 0x00000800L
|
||||
#define NL_H14 0x00001000L
|
||||
#define NL_V32T 0x00002000L
|
||||
#define NL_H16 0x00004000L
|
||||
#define NL_ZYX 0x00008000L
|
||||
#define NL_Z19 0x00010000L
|
||||
#define NL_VFC 0x00020000L
|
||||
#define NL_V34 0x00040000L
|
||||
#define NL_X2C 0x00080000L
|
||||
#define NL_X2S 0x00100000L
|
||||
#define NL_V90C 0x00200000L
|
||||
#define NL_V90S 0x00400000L
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ISDN Flags
|
||||
*/
|
||||
#define ND_V110L 0x00000001L
|
||||
#define ND_V110H 0x00000002L
|
||||
#define ND_V120L 0x00000004L
|
||||
#define ND_V120H 0x00000008L
|
||||
#define ND_X75 0x00000010L
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* TCP/IP flags
|
||||
*/
|
||||
#define IP_IBN 0x00000001L
|
||||
#define IP_IFC 0x00000002L
|
||||
#define IP_ITN 0x00000004L
|
||||
#define IP_IVM 0x00000008L
|
||||
#define IP_IP 0x00000010L
|
||||
#define IP_IFT 0x00000020L
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Online special flags
|
||||
*/
|
||||
#define OL_CM 0x00000001L
|
||||
#define OL_MO 0x00000002L
|
||||
#define OL_LO 0x00000004L
|
||||
#define OL_MN 0x00000008L
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Request flags
|
||||
*/
|
||||
#define RQ_RQMODE 0x0000000fL
|
||||
#define RQ_RQ_BR 0x00000001L
|
||||
#define RQ_RQ_BU 0x00000002L
|
||||
#define RQ_RQ_WR 0x00000004L
|
||||
#define RQ_RQ_WU 0x00000008L
|
||||
#define RQ_XA (RQ_RQ_BR | RQ_RQ_BU | RQ_RQ_WR | RQ_RQ_WU)
|
||||
#define RQ_XB (RQ_RQ_BR | RQ_RQ_BU | RQ_RQ_WR )
|
||||
#define RQ_XC (RQ_RQ_BR | RQ_RQ_WR | RQ_RQ_WU)
|
||||
#define RQ_XP (RQ_RQ_BR | RQ_RQ_BU )
|
||||
#define RQ_XR (RQ_RQ_BR | RQ_RQ_WR )
|
||||
#define RQ_XW ( RQ_RQ_WR )
|
||||
#define RQ_XX ( RQ_RQ_WR | RQ_RQ_WU)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Nodelist entry
|
||||
*/
|
||||
typedef struct _node {
|
||||
faddr addr; /* Node address */
|
||||
unsigned short upnet; /* Uplink netnumber */
|
||||
unsigned short upnode; /* Uplink nodenumber */
|
||||
unsigned short region; /* Region belongin to */
|
||||
unsigned char type;
|
||||
unsigned char pflag;
|
||||
char *name; /* System name */
|
||||
char *location; /* System location */
|
||||
char *sysop; /* Sysop name */
|
||||
char *phone; /* Phone number */
|
||||
unsigned speed; /* Baudrate */
|
||||
unsigned long mflags; /* Modem flags */
|
||||
unsigned long dflags; /* ISDN flags */
|
||||
unsigned long iflags; /* TCP-IP flags */
|
||||
unsigned long oflags; /* Online flags */
|
||||
unsigned long xflags; /* Request flags */
|
||||
char *uflags[MAXUFLAGS]; /* User flags */
|
||||
int t1; /* T flag, first char */
|
||||
int t2; /* T flag, second char */
|
||||
} node;
|
||||
|
||||
|
||||
|
||||
extern struct _fkey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} fkey[];
|
||||
|
||||
|
||||
|
||||
extern struct _dkey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} dkey[];
|
||||
|
||||
|
||||
|
||||
extern struct _ikey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} ikey[];
|
||||
|
||||
|
||||
|
||||
extern struct _okey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} okey[];
|
||||
|
||||
|
||||
|
||||
extern struct _xkey {
|
||||
char *key;
|
||||
unsigned long flag;
|
||||
} xkey[];
|
||||
|
||||
|
||||
|
||||
extern struct _nodelist {
|
||||
char *domain;
|
||||
FILE *fp;
|
||||
} *nodevector;
|
||||
|
||||
|
||||
|
||||
struct _ixentry {
|
||||
unsigned short zone;
|
||||
unsigned short net;
|
||||
unsigned short node;
|
||||
unsigned short point;
|
||||
};
|
||||
|
||||
|
||||
|
||||
extern struct _pkey {
|
||||
char *key;
|
||||
unsigned char type;
|
||||
unsigned char pflag;
|
||||
} pkey[];
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* From nodelist.c
|
||||
*/
|
||||
int initnl(void);
|
||||
node *getnlent(faddr *);
|
||||
void olflags(unsigned long);
|
||||
void rqflags(unsigned long);
|
||||
void moflags(unsigned long);
|
||||
void diflags(unsigned long);
|
||||
void ipflags(unsigned long);
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user