Rebuild for configurable nodelists handling

This commit is contained in:
Michiel Broek
2002-12-30 22:13:33 +00:00
parent fbe81bfa68
commit 3dfe32df94
20 changed files with 1143 additions and 736 deletions

View File

@@ -179,6 +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
nodelist.o: ../config.h libs.h memwatch.h structs.h users.h records.h clcomm.h common.h mberrors.h nodelist.h
ftscprod.o: ../config.h libs.h memwatch.h structs.h common.h
# End of generated dependencies

File diff suppressed because it is too large Load Diff

View File

@@ -41,26 +41,6 @@
# WARNING: This file will replace hardcoded behaviour of several parts of
# the MBSE BBS package, tampering with this file is at your own risk.
# The following are the valid keywords in field 1 of the nodelist.
# They also represent the order of the nodes.
keyword Zone 1
keyword Region 2
keyword Host 3
keyword Hub 4
keyword "" 5
keyword Point 6
# The next flags are ORed to get a call possible value. A value of zero
# means that the node is reachable analogue with a FTS-0001 session.
# The rest is treated special.
#
callflag Down 0x01 # Node is Down
callflag Hold 0x02 # Node is Hold
callflag Pvt 0x04 # Pvt nodelist entry, no analogue call possible
callflag Dummy 0x08 # Dummy, no nodelist entry
callflag ISDN 0x10 # ISDN only node
callflag TCPIP 0x20 # ION (Internet Only Node)
# Online special flags.
@@ -71,49 +51,71 @@ online LO 0x00000004
online MN 0x00000008
# Request flags, masks:
# 0x00000001 Bark request
# 0x00000002 Bark update
# 0x00000004 Wazoo request
# 0x00000008 Wazoo update
#
request XA 0x0000000F # Bark request, Bark update, Wazoo request, Wazoo update
request XB 0x00000007 # Bark request, Bark update, Wazoo request
request XC 0x0000000D # Bark request, Wazoo request, Wazoo update
request XP 0x00000003 # Bark request, Bark update
request XR 0x00000005 # Bark request, Wazoo request
request XW 0x00000004 # Wazoo request
request XX 0x0000000C # Wazoo request, Wazoo update
# Request flags bits
#
reqbits RQ_BR 0x00000001 # Bark request
reqbits RQ_BU 0x00000002 # Bark update
reqbits RQ_WR 0x00000004 # Wazoo request
reqbits RQ_WU 0x00000008 # Wazoo update
# Network services, the valid IP flags translated to the internet service
# names and their default ports.
#
service IBN binkp 24554
service IFC fido 60179
service ITN telnet 23
# Switched network service names, they are used to build the
# URLs for modem and ISDN lines.
#
dialer pots
dialer isdn
# Modem flags, order is important to check the fastest possible connection
# method. This also masks implied modes.
#
# flag entry implied mask
modem MNP 0x00000001 0x00000001
modem V42 0x00000002 0x00000003 # implies MNP
modem V42B 0x00000004 0x00000007 # implies MNP and V42
modem V22 0x00000008 0x00000008
modem V29 0x00000010 0x00000010
modem V32 0x00000020 0x00000020
modem H96 0x00000040 0x00000040
modem HST 0x00000080 0x00000081 # implies MNP
modem MAX 0x00000100 0x00000100
modem PEP 0x00000200 0x00000200
modem CSP 0x00000400 0x00000400
modem V32B 0x00000800 0x00000820 # implies V32
modem H14 0x00001000 0x00001081 # implies HST and MNP
modem V32T 0x00002000 0x00002820 # implies V32B and V32
modem H16 0x00004000 0x00005087 # implies H14, HST, MNP, V42, V42B
modem ZYX 0x00008000 0x00008827 # implies V32B, V32, V42B, V42, MNP
modem Z19 0x00010000 0x00018827 # implies V32B, V32, V42B, V42, MNP, ZYX
modem VFC 0x00020000 0x00020000
modem V34 0x00040000 0x00040000
modem X2C 0x00080000 0x001B0000 # implies X2S, V34
modem X2S 0x00100000 0x00140000 # implies V34
modem V90C 0x00200000 0x00640000 # implies V90S, V34
modem V90S 0x00400000 0x00440000 # implies V34
# Request flags, masks:
# 0x00000001 Bark request
# 0x00000002 Bark update
# 0x00000004 Wazoo request
# 0x00000008 Wazoo update
#
request XA 0x0000000F # Bark request, Bark update, Wazoo request, Wazoo update
request XB 0x00000007 # Bark request, Bark update, Wazoo request
request XC 0x0000000D # Bark request, Wazoo request, Wazoo update
request XP 0x00000003 # Bark request, Bark update
request XR 0x00000005 # Bark request, Wazoo request
request XW 0x00000004 # Wazoo request
request XX 0x0000000B # Wazoo request, Wazoo update
pots MNP 0x00000001 0x00000001
pots V42 0x00000002 0x00000003 # implies MNP
pots V42B 0x00000004 0x00000007 # implies MNP and V42
pots V22 0x00000008 0x00000008
pots V29 0x00000010 0x00000010
pots V32 0x00000020 0x00000020
pots H96 0x00000040 0x00000040
pots HST 0x00000080 0x00000081 # implies MNP
pots MAX 0x00000100 0x00000100
pots PEP 0x00000200 0x00000200
pots CSP 0x00000400 0x00000400
pots V32B 0x00000800 0x00000820 # implies V32
pots H14 0x00001000 0x00001081 # implies HST and MNP
pots V32T 0x00002000 0x00002820 # implies V32B and V32
pots H16 0x00004000 0x00005087 # implies H14, HST, MNP, V42, V42B
pots ZYX 0x00008000 0x00008827 # implies V32B, V32, V42B, V42, MNP
pots Z19 0x00010000 0x00018827 # implies V32B, V32, V42B, V42, MNP, ZYX
pots VFC 0x00020000 0x00020000
pots V34 0x00040000 0x00040000
pots X2C 0x00080000 0x001B0000 # implies X2S, V34
pots X2S 0x00100000 0x00140000 # implies V34
pots V90C 0x00200000 0x00640000 # implies V90S, V34
pots V90S 0x00400000 0x00440000 # implies V34
# ISDN flags in order of best speed.
@@ -127,30 +129,31 @@ isdn X75 0x00000010 0x00000010
# Note that the IP flags do not represent the order of preference.
# That need to be changed.
# Supported IP protocols by the mailer in order of preference.
# The names must match the service names.
#
tcpip IBN 0x00000001 0x00000001
tcpip ITN 0x00000001 0x00000001
tcpip IFC 0x00000002 0x00000002
tcpip ITN 0x00000004 0x00000004
tcpip IVM 0x00000008 0x00000008
tcpip IP 0x00000010 0x00000010
tcpip IFT 0x00000020 0x00000020
tcpip IBN 0x00000004 0x00000004
# The following gives the order to search for the
# FQDN or IP address of the node. Valid values are:
# system - Search in the system name field
# phone - Search the phone field for 000- prefix
# field3 - Search in the system name field, may have :port suffix.
# 192.168.1.40:1234 or ntbox.mbse.ym:5678 are valid.
# field6 - Search the phone field for 000- prefix, may be a IP
# or a FQDN with or without a :port suffix.
# 000-192-168-1-40:1234 or 000-ntbox.mbse.ym:5678 are valid.
# ina - Search INA:fqdn (NOT YET AVAILABLE)
# firstflag - First IP flag (NOT YET AVAILABLE)
# eslf - Extended St. Louis Format fields (NOT YET AVAILABLE)
# defdomain - Asume default domain (NOT YET AVAILABLE)
#
# In all cases, the nodes setup overrides everything.
# Order is important
# Order is important, defdomain must be the last if used.
#
search system
search phone
search field3
search field6
# The default searchdomain, will be prefixed with f1.n2 (NOT YET AVAILABLE)
#

View File

@@ -5,95 +5,11 @@
#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
*/
@@ -117,43 +33,48 @@ typedef struct _node {
char *uflags[MAXUFLAGS]; /* User flags */
int t1; /* T flag, first char */
int t2; /* T flag, second char */
char *url; /* URL for connection */
} node;
extern struct _fkey {
char *key;
unsigned long flag;
} fkey[];
/*
* Memory array structures read from nodelist.conf
*/
typedef struct _nodelist_flag {
struct _nodelist_flag *next;
char *name;
unsigned long value;
} nodelist_flag;
extern struct _dkey {
char *key;
unsigned long flag;
} dkey[];
typedef struct _nodelist_modem {
struct _nodelist_modem *next;
char *name;
unsigned long mask;
unsigned long value;
} nodelist_modem;
extern struct _ikey {
char *key;
unsigned long flag;
} ikey[];
typedef struct _nodelist_array {
struct _nodelist_array *next;
char *name;
} nodelist_array;
extern struct _okey {
char *key;
unsigned long flag;
} okey[];
typedef struct _nodelist_domsuf {
struct _nodelist_domsuf *next;
unsigned short zone;
char *name;
} nodelist_domsuf;
extern struct _xkey {
char *key;
unsigned long flag;
} xkey[];
typedef struct _nodelist_service {
struct _nodelist_service *next;
char *flag;
char *service;
unsigned long port;
} nodelist_service;
extern struct _nodelist {
@@ -162,7 +83,6 @@ extern struct _nodelist {
} *nodevector;
struct _ixentry {
unsigned short zone;
unsigned short net;
@@ -171,7 +91,6 @@ struct _ixentry {
};
extern struct _pkey {
char *key;
unsigned char type;
@@ -180,16 +99,30 @@ extern struct _pkey {
nodelist_flag *nl_online;
nodelist_flag *nl_request;
nodelist_flag *nl_reqbits;
nodelist_modem *nl_pots;
nodelist_modem *nl_isdn;
nodelist_modem *nl_tcpip;
nodelist_array *nl_search;
nodelist_array *nl_dialer;
nodelist_domsuf *nl_domsuffix;
nodelist_service *nl_service;
/*
* From nodelist.c
*/
int initnl(void);
void deinitnl(void);
node *getnlent(faddr *);
void olflags(unsigned long);
void rqflags(unsigned long);
void moflags(unsigned long);
void diflags(unsigned long);
void ipflags(unsigned long);
unsigned long getCMmask(void);
#endif

View File

@@ -729,9 +729,9 @@ struct sysconfig {
unsigned xNoJanus : 1;
unsigned NoHydra : 1; /* Don't do Hydra */
unsigned NoIBN : 1; /* No TCP-IP binkp */
unsigned NoITN : 1; /* No TCP-IP telnet */
unsigned NoIFC : 1; /* No TCP-IP ifcico */
unsigned xNoIBN : 1;
unsigned xNoITN : 1;
unsigned xNoIFC : 1;
char Phone[21]; /* Default phonenumber */
unsigned long Speed; /* Default linespeed */
@@ -1221,13 +1221,13 @@ struct _nodes {
unsigned xNoJanus : 1; /* Don't use Janus */
unsigned NoHydra : 1; /* Don't use Hydra */
unsigned NoIBN : 1; /* Don't use TCP-IP binkp */
unsigned xNoIBN : 1;
unsigned PackNetmail : 1; /* Pack netmail */
unsigned ARCmailCompat : 1; /* ARCmail Compatibility */
unsigned ARCmailAlpha : 1; /* Allow a..z ARCmail name */
unsigned FNC : 1; /* Node needs 8.3 filenames */
unsigned NoITN : 1; /* Don't use TCP-IP telnet */
unsigned NoIFC : 1; /* Don't use TCP-IP ifcico */
unsigned xNoITN : 1;
unsigned xNoIFC : 1;
char xExtra[94];
time_t StartDate; /* Node start date */