Rebuild for configurable nodelists handling
This commit is contained in:
parent
fbe81bfa68
commit
3dfe32df94
18
ChangeLog
18
ChangeLog
@ -1,10 +1,20 @@
|
|||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||||
|
|
||||||
|
Nodelist processing is under construction, it may be possible that you system
|
||||||
|
won't call if you use this version or if it does not accept calls, cannot
|
||||||
|
route mail or breaks your system.
|
||||||
|
|
||||||
|
DO NOT USE THIS VERSION ON PRODUCTION SYSTEMS, ONLY FOR TESTING.
|
||||||
|
|
||||||
v0.37.00 26-Dec-2002.
|
v0.37.00 26-Dec-2002.
|
||||||
|
|
||||||
general:
|
general:
|
||||||
A new developer joined the team, David Gonzalez.
|
A new developer joined the team, David Gonzalez.
|
||||||
|
The settings to suppres some IP protocols (global and nodes)
|
||||||
|
are removed, this behaviour can be set using nodelist flags
|
||||||
|
configuration.
|
||||||
|
|
||||||
libs:
|
libs:
|
||||||
The nodelist lookup functions are now in a separate library.
|
The nodelist lookup functions are now in a separate library.
|
||||||
@ -17,10 +27,18 @@ v0.37.00 26-Dec-2002.
|
|||||||
With binkp and EMSI sessions double received remote aka's are
|
With binkp and EMSI sessions double received remote aka's are
|
||||||
filtered.
|
filtered.
|
||||||
|
|
||||||
|
mbout:
|
||||||
|
When a poll was removed, the outbound was not rescanned.
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
Prepared for more example translations.
|
Prepared for more example translations.
|
||||||
|
Added German template files made by Joachim Kuwan.
|
||||||
|
|
||||||
|
|
||||||
|
mbsetup:
|
||||||
|
Removed global flags No-IBN, IFC and ITN from the setup.
|
||||||
|
Removed nodes flags No-IBN, IFC and ITN from the setup.
|
||||||
|
|
||||||
|
|
||||||
v0.36.00 26-Dec-2002 - stable release
|
v0.36.00 26-Dec-2002 - stable release
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ SRCS = endian.c
|
|||||||
HDRS = endian.h
|
HDRS = endian.h
|
||||||
OBJS = endian.o
|
OBJS = endian.o
|
||||||
OTHER = Makefile header.txt footer.txt menus-le.tar menus-be.tar \
|
OTHER = Makefile header.txt footer.txt menus-le.tar menus-be.tar \
|
||||||
txtfiles-en.tar templates-en.tar templates-es.tar
|
txtfiles-en.tar templates-en.tar templates-es.tar templates-de.tar
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
|
||||||
@ -36,11 +36,15 @@ install: all
|
|||||||
fi
|
fi
|
||||||
@if [ ! -f ${PREFIX}/english/txtfiles/main.ans ]; then \
|
@if [ ! -f ${PREFIX}/english/txtfiles/main.ans ]; then \
|
||||||
tar xfC txtfiles-en.tar ${PREFIX}/english/txtfiles ; \
|
tar xfC txtfiles-en.tar ${PREFIX}/english/txtfiles ; \
|
||||||
echo "Installed default english txtfiles" ; \
|
echo "Installed default English txtfiles" ; \
|
||||||
fi
|
fi
|
||||||
@if [ ! -f ${PREFIX}/english/macro/html.tic ]; then \
|
@if [ ! -f ${PREFIX}/english/macro/html.tic ]; then \
|
||||||
tar xfC templates-en.tar ${PREFIX}/english/macro ; \
|
tar xfC templates-en.tar ${PREFIX}/english/macro ; \
|
||||||
echo "Installed default english macro files" ; \
|
echo "Installed default English macro files" ; \
|
||||||
|
fi
|
||||||
|
@if [ ! -f ${PREFIX}/german/macro/html.tic ]; then \
|
||||||
|
tar xfC templates-de.tar ${PREFIX}/german/macro ; \
|
||||||
|
echo "Installed default German macro files" ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@ -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
|
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
|
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
|
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
|
ftscprod.o: ../config.h libs.h memwatch.h structs.h common.h
|
||||||
# End of generated dependencies
|
# End of generated dependencies
|
||||||
|
872
lib/nodelist.c
872
lib/nodelist.c
File diff suppressed because it is too large
Load Diff
@ -41,26 +41,6 @@
|
|||||||
# WARNING: This file will replace hardcoded behaviour of several parts of
|
# 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 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.
|
# Online special flags.
|
||||||
@ -71,49 +51,71 @@ online LO 0x00000004
|
|||||||
online MN 0x00000008
|
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
|
# Modem flags, order is important to check the fastest possible connection
|
||||||
# method. This also masks implied modes.
|
# method. This also masks implied modes.
|
||||||
#
|
#
|
||||||
# flag entry implied mask
|
# flag entry implied mask
|
||||||
modem MNP 0x00000001 0x00000001
|
pots MNP 0x00000001 0x00000001
|
||||||
modem V42 0x00000002 0x00000003 # implies MNP
|
pots V42 0x00000002 0x00000003 # implies MNP
|
||||||
modem V42B 0x00000004 0x00000007 # implies MNP and V42
|
pots V42B 0x00000004 0x00000007 # implies MNP and V42
|
||||||
modem V22 0x00000008 0x00000008
|
pots V22 0x00000008 0x00000008
|
||||||
modem V29 0x00000010 0x00000010
|
pots V29 0x00000010 0x00000010
|
||||||
modem V32 0x00000020 0x00000020
|
pots V32 0x00000020 0x00000020
|
||||||
modem H96 0x00000040 0x00000040
|
pots H96 0x00000040 0x00000040
|
||||||
modem HST 0x00000080 0x00000081 # implies MNP
|
pots HST 0x00000080 0x00000081 # implies MNP
|
||||||
modem MAX 0x00000100 0x00000100
|
pots MAX 0x00000100 0x00000100
|
||||||
modem PEP 0x00000200 0x00000200
|
pots PEP 0x00000200 0x00000200
|
||||||
modem CSP 0x00000400 0x00000400
|
pots CSP 0x00000400 0x00000400
|
||||||
modem V32B 0x00000800 0x00000820 # implies V32
|
pots V32B 0x00000800 0x00000820 # implies V32
|
||||||
modem H14 0x00001000 0x00001081 # implies HST and MNP
|
pots H14 0x00001000 0x00001081 # implies HST and MNP
|
||||||
modem V32T 0x00002000 0x00002820 # implies V32B and V32
|
pots V32T 0x00002000 0x00002820 # implies V32B and V32
|
||||||
modem H16 0x00004000 0x00005087 # implies H14, HST, MNP, V42, V42B
|
pots H16 0x00004000 0x00005087 # implies H14, HST, MNP, V42, V42B
|
||||||
modem ZYX 0x00008000 0x00008827 # implies V32B, V32, V42B, V42, MNP
|
pots ZYX 0x00008000 0x00008827 # implies V32B, V32, V42B, V42, MNP
|
||||||
modem Z19 0x00010000 0x00018827 # implies V32B, V32, V42B, V42, MNP, ZYX
|
pots Z19 0x00010000 0x00018827 # implies V32B, V32, V42B, V42, MNP, ZYX
|
||||||
modem VFC 0x00020000 0x00020000
|
pots VFC 0x00020000 0x00020000
|
||||||
modem V34 0x00040000 0x00040000
|
pots V34 0x00040000 0x00040000
|
||||||
modem X2C 0x00080000 0x001B0000 # implies X2S, V34
|
pots X2C 0x00080000 0x001B0000 # implies X2S, V34
|
||||||
modem X2S 0x00100000 0x00140000 # implies V34
|
pots X2S 0x00100000 0x00140000 # implies V34
|
||||||
modem V90C 0x00200000 0x00640000 # implies V90S, V34
|
pots V90C 0x00200000 0x00640000 # implies V90S, V34
|
||||||
modem V90S 0x00400000 0x00440000 # implies V34
|
pots 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
|
|
||||||
|
|
||||||
|
|
||||||
# ISDN flags in order of best speed.
|
# 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.
|
# Supported IP protocols by the mailer in order of preference.
|
||||||
# That need to be changed.
|
# The names must match the service names.
|
||||||
#
|
#
|
||||||
tcpip IBN 0x00000001 0x00000001
|
tcpip ITN 0x00000001 0x00000001
|
||||||
tcpip IFC 0x00000002 0x00000002
|
tcpip IFC 0x00000002 0x00000002
|
||||||
tcpip ITN 0x00000004 0x00000004
|
tcpip IBN 0x00000004 0x00000004
|
||||||
tcpip IVM 0x00000008 0x00000008
|
|
||||||
tcpip IP 0x00000010 0x00000010
|
|
||||||
tcpip IFT 0x00000020 0x00000020
|
|
||||||
|
|
||||||
|
|
||||||
# The following gives the order to search for the
|
# The following gives the order to search for the
|
||||||
# FQDN or IP address of the node. Valid values are:
|
# FQDN or IP address of the node. Valid values are:
|
||||||
# system - Search in the system name field
|
# field3 - Search in the system name field, may have :port suffix.
|
||||||
# phone - Search the phone field for 000- prefix
|
# 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)
|
# firstflag - First IP flag (NOT YET AVAILABLE)
|
||||||
# eslf - Extended St. Louis Format fields (NOT YET AVAILABLE)
|
# eslf - Extended St. Louis Format fields (NOT YET AVAILABLE)
|
||||||
# defdomain - Asume default domain (NOT YET AVAILABLE)
|
# defdomain - Asume default domain (NOT YET AVAILABLE)
|
||||||
#
|
#
|
||||||
# In all cases, the nodes setup overrides everything.
|
# In all cases, the nodes setup overrides everything.
|
||||||
# Order is important
|
# Order is important, defdomain must be the last if used.
|
||||||
#
|
#
|
||||||
search system
|
search field3
|
||||||
search phone
|
search field6
|
||||||
|
|
||||||
# The default searchdomain, will be prefixed with f1.n2 (NOT YET AVAILABLE)
|
# The default searchdomain, will be prefixed with f1.n2 (NOT YET AVAILABLE)
|
||||||
#
|
#
|
||||||
|
155
lib/nodelist.h
155
lib/nodelist.h
@ -5,95 +5,11 @@
|
|||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
|
|
||||||
|
|
||||||
#define MAXNAME 35
|
#define MAXNAME 35
|
||||||
#define MAXUFLAGS 16
|
#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
|
* Nodelist entry
|
||||||
*/
|
*/
|
||||||
@ -117,43 +33,48 @@ typedef struct _node {
|
|||||||
char *uflags[MAXUFLAGS]; /* User flags */
|
char *uflags[MAXUFLAGS]; /* User flags */
|
||||||
int t1; /* T flag, first char */
|
int t1; /* T flag, first char */
|
||||||
int t2; /* T flag, second char */
|
int t2; /* T flag, second char */
|
||||||
|
char *url; /* URL for connection */
|
||||||
} node;
|
} node;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern struct _fkey {
|
/*
|
||||||
char *key;
|
* Memory array structures read from nodelist.conf
|
||||||
unsigned long flag;
|
*/
|
||||||
} fkey[];
|
typedef struct _nodelist_flag {
|
||||||
|
struct _nodelist_flag *next;
|
||||||
|
char *name;
|
||||||
|
unsigned long value;
|
||||||
|
} nodelist_flag;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _nodelist_modem {
|
||||||
extern struct _dkey {
|
struct _nodelist_modem *next;
|
||||||
char *key;
|
char *name;
|
||||||
unsigned long flag;
|
unsigned long mask;
|
||||||
} dkey[];
|
unsigned long value;
|
||||||
|
} nodelist_modem;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _nodelist_array {
|
||||||
extern struct _ikey {
|
struct _nodelist_array *next;
|
||||||
char *key;
|
char *name;
|
||||||
unsigned long flag;
|
} nodelist_array;
|
||||||
} ikey[];
|
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _nodelist_domsuf {
|
||||||
extern struct _okey {
|
struct _nodelist_domsuf *next;
|
||||||
char *key;
|
unsigned short zone;
|
||||||
unsigned long flag;
|
char *name;
|
||||||
} okey[];
|
} nodelist_domsuf;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _nodelist_service {
|
||||||
extern struct _xkey {
|
struct _nodelist_service *next;
|
||||||
char *key;
|
char *flag;
|
||||||
unsigned long flag;
|
char *service;
|
||||||
} xkey[];
|
unsigned long port;
|
||||||
|
} nodelist_service;
|
||||||
|
|
||||||
|
|
||||||
extern struct _nodelist {
|
extern struct _nodelist {
|
||||||
@ -162,7 +83,6 @@ extern struct _nodelist {
|
|||||||
} *nodevector;
|
} *nodevector;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct _ixentry {
|
struct _ixentry {
|
||||||
unsigned short zone;
|
unsigned short zone;
|
||||||
unsigned short net;
|
unsigned short net;
|
||||||
@ -171,7 +91,6 @@ struct _ixentry {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern struct _pkey {
|
extern struct _pkey {
|
||||||
char *key;
|
char *key;
|
||||||
unsigned char type;
|
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
|
* From nodelist.c
|
||||||
*/
|
*/
|
||||||
int initnl(void);
|
int initnl(void);
|
||||||
|
void deinitnl(void);
|
||||||
node *getnlent(faddr *);
|
node *getnlent(faddr *);
|
||||||
void olflags(unsigned long);
|
void olflags(unsigned long);
|
||||||
void rqflags(unsigned long);
|
void rqflags(unsigned long);
|
||||||
void moflags(unsigned long);
|
void moflags(unsigned long);
|
||||||
void diflags(unsigned long);
|
void diflags(unsigned long);
|
||||||
void ipflags(unsigned long);
|
void ipflags(unsigned long);
|
||||||
|
unsigned long getCMmask(void);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -729,9 +729,9 @@ struct sysconfig {
|
|||||||
|
|
||||||
unsigned xNoJanus : 1;
|
unsigned xNoJanus : 1;
|
||||||
unsigned NoHydra : 1; /* Don't do Hydra */
|
unsigned NoHydra : 1; /* Don't do Hydra */
|
||||||
unsigned NoIBN : 1; /* No TCP-IP binkp */
|
unsigned xNoIBN : 1;
|
||||||
unsigned NoITN : 1; /* No TCP-IP telnet */
|
unsigned xNoITN : 1;
|
||||||
unsigned NoIFC : 1; /* No TCP-IP ifcico */
|
unsigned xNoIFC : 1;
|
||||||
|
|
||||||
char Phone[21]; /* Default phonenumber */
|
char Phone[21]; /* Default phonenumber */
|
||||||
unsigned long Speed; /* Default linespeed */
|
unsigned long Speed; /* Default linespeed */
|
||||||
@ -1221,13 +1221,13 @@ struct _nodes {
|
|||||||
unsigned xNoJanus : 1; /* Don't use Janus */
|
unsigned xNoJanus : 1; /* Don't use Janus */
|
||||||
unsigned NoHydra : 1; /* Don't use Hydra */
|
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 PackNetmail : 1; /* Pack netmail */
|
||||||
unsigned ARCmailCompat : 1; /* ARCmail Compatibility */
|
unsigned ARCmailCompat : 1; /* ARCmail Compatibility */
|
||||||
unsigned ARCmailAlpha : 1; /* Allow a..z ARCmail name */
|
unsigned ARCmailAlpha : 1; /* Allow a..z ARCmail name */
|
||||||
unsigned FNC : 1; /* Node needs 8.3 filenames */
|
unsigned FNC : 1; /* Node needs 8.3 filenames */
|
||||||
unsigned NoITN : 1; /* Don't use TCP-IP telnet */
|
unsigned xNoITN : 1;
|
||||||
unsigned NoIFC : 1; /* Don't use TCP-IP ifcico */
|
unsigned xNoIFC : 1;
|
||||||
|
|
||||||
char xExtra[94];
|
char xExtra[94];
|
||||||
time_t StartDate; /* Node start date */
|
time_t StartDate; /* Node start date */
|
||||||
|
@ -104,8 +104,10 @@ int portopen(faddr *addr)
|
|||||||
|
|
||||||
int call(faddr *addr)
|
int call(faddr *addr)
|
||||||
{
|
{
|
||||||
int i, rc = 1;
|
int i, rc = 1, proto = FALSE;
|
||||||
struct hostent *he;
|
struct hostent *he;
|
||||||
|
unsigned long cmmask, ipmask;
|
||||||
|
nodelist_modem **tmpm;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't call points, call their boss instead.
|
* Don't call points, call their boss instead.
|
||||||
@ -134,6 +136,7 @@ int call(faddr *addr)
|
|||||||
*/
|
*/
|
||||||
noderecord(addr);
|
noderecord(addr);
|
||||||
rdoptions(TRUE);
|
rdoptions(TRUE);
|
||||||
|
cmmask = getCMmask();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fill default history info in case we get a FTS0001 session
|
* Fill default history info in case we get a FTS0001 session
|
||||||
@ -152,39 +155,31 @@ int call(faddr *addr)
|
|||||||
* First see if this node can be reached over the internet and
|
* First see if this node can be reached over the internet and
|
||||||
* that internet calls are allowed.
|
* that internet calls are allowed.
|
||||||
*/
|
*/
|
||||||
if (nlent->iflags && ((localoptions & (NOIBN & NOITN & NOIFC)) == 0)) {
|
if (nlent->iflags) {
|
||||||
if (!inetaddr) {
|
if (!inetaddr) {
|
||||||
Syslog('d', "Trying to find IP address...");
|
Syslog('d', "Trying to find IP address...");
|
||||||
/*
|
/*
|
||||||
* There is no fdn or IP address at the commandline.
|
* There is no fdn or IP address at the commandline.
|
||||||
* First check nodesetup for an override in the phone field.
|
* First check nodesetup for an override in the phone field.
|
||||||
|
* Try to find the fdn in several places in the nodelist fields.
|
||||||
*/
|
*/
|
||||||
// if (strlen(nodes.phone[0])) {
|
if ((nlent->phone != NULL) && (strncmp(nlent->phone, (char *)"000-", 4) == 0)) {
|
||||||
// inetaddr = xstrcpy(nodes.phone[0]);
|
inetaddr = xstrcpy(nlent->phone+4);
|
||||||
// } else if (strlen(nodes.phone[1])) {
|
for (i = 0; i < strlen(inetaddr); i++)
|
||||||
// inetaddr = xstrcpy(nodes.phone[1]);
|
if (inetaddr[i] == '-')
|
||||||
// } else {
|
inetaddr[i] = '.';
|
||||||
|
Syslog('d', "Got IP address from phone field");
|
||||||
|
} else if ((he = gethostbyname(nlent->name))) {
|
||||||
|
inetaddr = xstrcpy(nlent->name);
|
||||||
|
Syslog('d', "Got hostname from nodelist system name");
|
||||||
|
} else if ((he = gethostbyname(nlent->location))) {
|
||||||
/*
|
/*
|
||||||
* Try to find the fdn in several places in the nodelist fields.
|
* A fdn at the nodelist location field is not in the specs
|
||||||
|
* but the real world differs from the specs.
|
||||||
*/
|
*/
|
||||||
if ((nlent->phone != NULL) && (strncmp(nlent->phone, (char *)"000-", 4) == 0)) {
|
inetaddr = xstrcpy(nlent->location);
|
||||||
inetaddr = xstrcpy(nlent->phone+4);
|
Syslog('d', "Got hostname from nodelist location");
|
||||||
for (i = 0; i < strlen(inetaddr); i++)
|
}
|
||||||
if (inetaddr[i] == '-')
|
|
||||||
inetaddr[i] = '.';
|
|
||||||
Syslog('d', "Got IP address from phone field");
|
|
||||||
} else if ((he = gethostbyname(nlent->name))) {
|
|
||||||
inetaddr = xstrcpy(nlent->name);
|
|
||||||
Syslog('d', "Got hostname from nodelist system name");
|
|
||||||
} else if ((he = gethostbyname(nlent->location))) {
|
|
||||||
/*
|
|
||||||
* A fdn at the nodelist location field is not in the specs
|
|
||||||
* but the real world differs from the specs.
|
|
||||||
*/
|
|
||||||
inetaddr = xstrcpy(nlent->location);
|
|
||||||
Syslog('d', "Got hostname from nodelist location");
|
|
||||||
}
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -200,16 +195,36 @@ int call(faddr *addr)
|
|||||||
* from the nodelist. If it fails, fallback to dial.
|
* from the nodelist. If it fails, fallback to dial.
|
||||||
* Priority IBN, IFC, ITN.
|
* Priority IBN, IFC, ITN.
|
||||||
*/
|
*/
|
||||||
if ((nlent->iflags & IP_IBN) && ((localoptions & NOIBN) == 0)) {
|
ipmask = 0;
|
||||||
|
for (tmpm = &nl_tcpip; *tmpm; tmpm=&((*tmpm)->next))
|
||||||
|
if (strcmp("IBN", (*tmpm)->name) == 0)
|
||||||
|
ipmask = (*tmpm)->mask;
|
||||||
|
if (nlent->iflags & ipmask) {
|
||||||
tcp_mode = TCPMODE_IBN;
|
tcp_mode = TCPMODE_IBN;
|
||||||
Syslog('d', "TCP/IP mode set to IBN");
|
Syslog('d', "TCP/IP mode set to IBN");
|
||||||
} else if ((nlent->iflags & IP_IFC) && ((localoptions & NOIFC) == 0)) {
|
proto = TRUE;
|
||||||
tcp_mode = TCPMODE_IFC;
|
}
|
||||||
Syslog('d', "TCP/IP mode set to IFC");
|
if (!proto) {
|
||||||
} else if ((nlent->iflags & IP_ITN) && ((localoptions & NOITN) == 0)) {
|
for (tmpm = &nl_tcpip; *tmpm; tmpm=&((*tmpm)->next))
|
||||||
tcp_mode = TCPMODE_ITN;
|
if (strcmp("IFC", (*tmpm)->name) == 0)
|
||||||
Syslog('d', "TCP/IP mode seto to ITN");
|
ipmask = (*tmpm)->mask;
|
||||||
} else {
|
if (nlent->iflags & ipmask) {
|
||||||
|
tcp_mode = TCPMODE_IFC;
|
||||||
|
Syslog('d', "TCP/IP mode set to IFC");
|
||||||
|
proto = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!proto) {
|
||||||
|
for (tmpm = &nl_tcpip; *tmpm; tmpm=&((*tmpm)->next))
|
||||||
|
if (strcmp("ITN", (*tmpm)->name) == 0)
|
||||||
|
ipmask = (*tmpm)->mask;
|
||||||
|
if (nlent->iflags & ipmask) {
|
||||||
|
tcp_mode = TCPMODE_ITN;
|
||||||
|
Syslog('d', "TCP/IP mode seto to ITN");
|
||||||
|
proto = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!proto) {
|
||||||
Syslog('+', "No common TCP/IP protocols for node %s", nlent->name);
|
Syslog('+', "No common TCP/IP protocols for node %s", nlent->name);
|
||||||
free(inetaddr);
|
free(inetaddr);
|
||||||
inetaddr = NULL;
|
inetaddr = NULL;
|
||||||
@ -224,8 +239,8 @@ int call(faddr *addr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((nlent->oflags & OL_CM) == 0) && (!IsZMH())) {
|
if (((nlent->oflags & cmmask) == 0) && (!IsZMH())) {
|
||||||
Syslog('?', "Warning: calling MO system outside ZMH");
|
Syslog('?', "Warning: calling non-CM system outside ZMH");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inbound)
|
if (inbound)
|
||||||
|
@ -93,7 +93,7 @@ int rx_emsi(char *data)
|
|||||||
emsi_local_protos &= ~PROT_JAN;
|
emsi_local_protos &= ~PROT_JAN;
|
||||||
if (localoptions & NOHYDRA)
|
if (localoptions & NOHYDRA)
|
||||||
emsi_local_protos &= ~PROT_HYD;
|
emsi_local_protos &= ~PROT_HYD;
|
||||||
if ((localoptions & NOITN) || (localoptions & NOIFC) || ((session_flags & SESSION_TCP) == 0)) {
|
if ((session_flags & SESSION_TCP) == 0) {
|
||||||
emsi_local_protos &= ~PROT_TCP;
|
emsi_local_protos &= ~PROT_TCP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ int tx_emsi(char *data)
|
|||||||
emsi_local_protos &= ~PROT_JAN;
|
emsi_local_protos &= ~PROT_JAN;
|
||||||
if (localoptions & NOHYDRA)
|
if (localoptions & NOHYDRA)
|
||||||
emsi_local_protos &= ~PROT_HYD;
|
emsi_local_protos &= ~PROT_HYD;
|
||||||
if ((localoptions & NOIFC) || (localoptions & NOITN) || ((session_flags & SESSION_TCP) == 0)) {
|
if ((session_flags & SESSION_TCP) == 0) {
|
||||||
emsi_local_protos &= ~PROT_TCP;
|
emsi_local_protos &= ~PROT_TCP;
|
||||||
}
|
}
|
||||||
emsi_remote_protos=0;
|
emsi_remote_protos=0;
|
||||||
|
@ -77,48 +77,50 @@ void ProgName()
|
|||||||
void die(int);
|
void die(int);
|
||||||
void die(int onsig)
|
void die(int onsig)
|
||||||
{
|
{
|
||||||
|
deinitnl();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* First check if a child is running, if so, kill it.
|
||||||
|
*/
|
||||||
|
if (e_pid) {
|
||||||
|
if ((kill(e_pid, SIGTERM)) == 0)
|
||||||
|
Syslog('+', "SIGTERM to pid %d succeeded", e_pid);
|
||||||
|
else {
|
||||||
|
if ((kill(e_pid, SIGKILL)) == 0)
|
||||||
|
Syslog('+', "SIGKILL to pid %d succeded", e_pid);
|
||||||
|
else
|
||||||
|
WriteError("$Failed to kill pid %d", e_pid);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First check if a child is running, if so, kill it.
|
* In case the child had the tty in raw mode...
|
||||||
*/
|
*/
|
||||||
if (e_pid) {
|
system("stty sane");
|
||||||
if ((kill(e_pid, SIGTERM)) == 0)
|
}
|
||||||
Syslog('+', "SIGTERM to pid %d succeeded", e_pid);
|
|
||||||
else {
|
|
||||||
if ((kill(e_pid, SIGKILL)) == 0)
|
|
||||||
Syslog('+', "SIGKILL to pid %d succeded", e_pid);
|
|
||||||
else
|
|
||||||
WriteError("$Failed to kill pid %d", e_pid);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
signal(onsig, SIG_IGN);
|
||||||
* In case the child had the tty in raw mode...
|
|
||||||
*/
|
|
||||||
system("stty sane");
|
|
||||||
}
|
|
||||||
|
|
||||||
signal(onsig, SIG_IGN);
|
if (show_log)
|
||||||
|
do_quiet = FALSE;
|
||||||
|
|
||||||
if (show_log)
|
if (!do_quiet)
|
||||||
do_quiet = FALSE;
|
colour(3, 0);
|
||||||
|
|
||||||
if (!do_quiet)
|
if (onsig) {
|
||||||
colour(3, 0);
|
if (onsig <= NSIG)
|
||||||
|
WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]);
|
||||||
|
else
|
||||||
|
WriteError("Terminated with error %d", onsig);
|
||||||
|
}
|
||||||
|
|
||||||
if (onsig) {
|
t_end = time(NULL);
|
||||||
if (onsig <= NSIG)
|
Syslog(' ', "MBOUT finished in %s", t_elapsed(t_start, t_end));
|
||||||
WriteError("Terminated on signal %d (%s)", onsig, SigName[onsig]);
|
|
||||||
else
|
|
||||||
WriteError("Terminated with error %d", onsig);
|
|
||||||
}
|
|
||||||
|
|
||||||
t_end = time(NULL);
|
if (!do_quiet) {
|
||||||
Syslog(' ', "MBOUT finished in %s", t_elapsed(t_start, t_end));
|
colour(7, 0);
|
||||||
|
printf("\n");
|
||||||
if (!do_quiet) {
|
}
|
||||||
colour(7, 0);
|
ExitClient(onsig);
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
ExitClient(onsig);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -176,7 +178,8 @@ int main(int argc, char *argv[])
|
|||||||
faddr *addr = NULL;
|
faddr *addr = NULL;
|
||||||
node *nlent;
|
node *nlent;
|
||||||
FILE *fl;
|
FILE *fl;
|
||||||
|
unsigned long cmmask;
|
||||||
|
|
||||||
#ifdef MEMWATCH
|
#ifdef MEMWATCH
|
||||||
mwInit();
|
mwInit();
|
||||||
#endif
|
#endif
|
||||||
@ -312,13 +315,14 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
nlent = getnlent(addr);
|
nlent = getnlent(addr);
|
||||||
|
cmmask = getCMmask();
|
||||||
if (nlent->pflag == NL_DUMMY)
|
if (nlent->pflag == NL_DUMMY)
|
||||||
Fatal((char *)"Node is not in nodelist", MBERR_NODE_NOT_IN_LIST);
|
Fatal((char *)"Node is not in nodelist", MBERR_NODE_NOT_IN_LIST);
|
||||||
if (nlent->pflag == NL_DOWN)
|
if (nlent->pflag == NL_DOWN)
|
||||||
Fatal((char *)"Node has status Down", MBERR_NODE_MAY_NOT_CALL);
|
Fatal((char *)"Node has status Down", MBERR_NODE_MAY_NOT_CALL);
|
||||||
if (nlent->pflag == NL_HOLD)
|
if (nlent->pflag == NL_HOLD)
|
||||||
Fatal((char *)"Node has status Hold", MBERR_NODE_MAY_NOT_CALL);
|
Fatal((char *)"Node has status Hold", MBERR_NODE_MAY_NOT_CALL);
|
||||||
if (((nlent->oflags & OL_CM) == 0) && (flavor == 'c'))
|
if (((nlent->oflags & cmmask) == 0) && (flavor == 'c'))
|
||||||
Fatal((char *)"Node is not CM, must use Immediate, Normal or Hold flavor", MBERR_NODE_MAY_NOT_CALL);
|
Fatal((char *)"Node is not CM, must use Immediate, Normal or Hold flavor", MBERR_NODE_MAY_NOT_CALL);
|
||||||
|
|
||||||
if (argv[4][0] == '-')
|
if (argv[4][0] == '-')
|
||||||
|
182
mbcico/nlinfo.c
182
mbcico/nlinfo.c
@ -41,107 +41,103 @@
|
|||||||
|
|
||||||
int nlinfo(faddr *addr)
|
int nlinfo(faddr *addr)
|
||||||
{
|
{
|
||||||
node *nlent;
|
node *nlent;
|
||||||
int i, t;
|
int i, t;
|
||||||
char flagbuf[256];
|
char flagbuf[256];
|
||||||
|
nodelist_modem **tmpm;
|
||||||
|
nodelist_flag **tmpf;
|
||||||
|
|
||||||
|
if (addr == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (addr == NULL)
|
Syslog('s', "Search nodelist info for %s", ascfnode(addr, 0x1f));
|
||||||
return 0;
|
nlent = getnlent(addr);
|
||||||
|
|
||||||
Syslog('s', "Search nodelist info for %s", ascfnode(addr, 0x1f));
|
if (nlent->pflag != NL_DUMMY) {
|
||||||
nlent = getnlent(addr);
|
colour(3, 0);
|
||||||
|
printf("System : %s\n", nlent->name);
|
||||||
|
printf("Sysop : %s@%s\n", nlent->sysop, ascinode(addr, 0x3f));
|
||||||
|
printf("Location : %s\n", nlent->location);
|
||||||
|
if (nlent->phone)
|
||||||
|
printf("Phone : %s\n", nlent->phone);
|
||||||
|
else
|
||||||
|
printf("Phone : -Unpublished-\n");
|
||||||
|
printf("Speed : %d\n", nlent->speed);
|
||||||
|
|
||||||
if (nlent->pflag != NL_DUMMY) {
|
flagbuf[0] = 0;
|
||||||
colour(3, 0);
|
|
||||||
printf("System : %s\n", nlent->name);
|
|
||||||
printf("Sysop : %s@%s\n", nlent->sysop, ascinode(addr, 0x3f));
|
|
||||||
printf("Location : %s\n", nlent->location);
|
|
||||||
if (nlent->phone)
|
|
||||||
printf("Phone : %s\n", nlent->phone);
|
|
||||||
else
|
|
||||||
printf("Phone : -Unpublished-\n");
|
|
||||||
printf("Speed : %d\n", nlent->speed);
|
|
||||||
|
|
||||||
flagbuf[0] = 0;
|
/*
|
||||||
|
* Get all normal nodelist flags
|
||||||
|
*/
|
||||||
|
for (tmpf = &nl_online; *tmpf; tmpf = &((*tmpf)->next))
|
||||||
|
if ((nlent->oflags & (*tmpf)->value) == (*tmpf)->value)
|
||||||
|
sprintf(flagbuf + strlen(flagbuf), "%s,", (*tmpf)->name);
|
||||||
|
for (tmpf = &nl_request; *tmpf; tmpf = &((*tmpf)->next))
|
||||||
|
if (nlent->xflags == (*tmpf)->value)
|
||||||
|
sprintf(flagbuf + strlen(flagbuf), "%s,", (*tmpf)->name);
|
||||||
|
for (tmpm = &nl_pots; *tmpm; tmpm=&((*tmpm)->next))
|
||||||
|
if ((nlent->mflags & (*tmpm)->mask) == (*tmpm)->mask)
|
||||||
|
sprintf(flagbuf + strlen(flagbuf), "%s,", (*tmpm)->name);
|
||||||
|
for (tmpm = &nl_isdn; *tmpm; tmpm=&((*tmpm)->next))
|
||||||
|
if ((nlent->dflags & (*tmpm)->mask) == (*tmpm)->mask)
|
||||||
|
sprintf(flagbuf + strlen(flagbuf), "%s,", (*tmpm)->name);
|
||||||
|
for (tmpm = &nl_tcpip; *tmpm; tmpm=&((*tmpm)->next))
|
||||||
|
if ((nlent->iflags & (*tmpm)->mask) == (*tmpm)->mask)
|
||||||
|
sprintf(flagbuf + strlen(flagbuf), "%s,", (*tmpm)->name);
|
||||||
|
flagbuf[strlen(flagbuf)-1] = '\0';
|
||||||
|
printf("Flags : %s\n", flagbuf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get all normal nodelist flags
|
* Show User flags
|
||||||
*/
|
*/
|
||||||
for (i = 0; fkey[i].flag != 0; i++)
|
flagbuf[0] = 0;
|
||||||
if ((nlent->mflags & fkey[i].flag) == fkey[i].flag)
|
for (i = 0; nlent->uflags[i]; i++) {
|
||||||
sprintf(flagbuf + strlen(flagbuf), "%s,", fkey[i].key);
|
sprintf(flagbuf + strlen(flagbuf), "%s,", nlent->uflags[i]);
|
||||||
for (i = 0; dkey[i].flag != 0; i++)
|
}
|
||||||
if ((nlent->dflags & dkey[i].flag) == dkey[i].flag)
|
if (strlen(flagbuf)) {
|
||||||
sprintf(flagbuf + strlen(flagbuf), "%s,", dkey[i].key);
|
flagbuf[strlen(flagbuf) - 1] = 0;
|
||||||
for (i = 0; ikey[i].flag != 0; i++)
|
printf("U-Flags : %s\n", flagbuf);
|
||||||
if ((nlent->iflags & ikey[i].flag) == ikey[i].flag)
|
|
||||||
sprintf(flagbuf + strlen(flagbuf), "%s,", ikey[i].key);
|
|
||||||
for (i = 0; okey[i].flag != 0; i++)
|
|
||||||
if ((nlent->oflags & okey[i].flag) == okey[i].flag)
|
|
||||||
sprintf(flagbuf + strlen(flagbuf), "%s,", okey[i].key);
|
|
||||||
|
|
||||||
switch (nlent->xflags) {
|
|
||||||
case RQ_XA: sprintf(flagbuf + strlen(flagbuf), "XA"); break;
|
|
||||||
case RQ_XB: sprintf(flagbuf + strlen(flagbuf), "XB"); break;
|
|
||||||
case RQ_XC: sprintf(flagbuf + strlen(flagbuf), "XC"); break;
|
|
||||||
case RQ_XP: sprintf(flagbuf + strlen(flagbuf), "XP"); break;
|
|
||||||
case RQ_XR: sprintf(flagbuf + strlen(flagbuf), "XR"); break;
|
|
||||||
case RQ_XW: sprintf(flagbuf + strlen(flagbuf), "XW"); break;
|
|
||||||
case RQ_XX: sprintf(flagbuf + strlen(flagbuf), "XX"); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("Flags : %s\n", flagbuf);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Show User flags
|
|
||||||
*/
|
|
||||||
flagbuf[0] = 0;
|
|
||||||
for (i = 0; nlent->uflags[i]; i++) {
|
|
||||||
sprintf(flagbuf + strlen(flagbuf), "%s,", nlent->uflags[i]);
|
|
||||||
}
|
|
||||||
if (strlen(flagbuf)) {
|
|
||||||
flagbuf[strlen(flagbuf) - 1] = 0;
|
|
||||||
printf("U-Flags : %s\n", flagbuf);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Show P flags
|
|
||||||
*/
|
|
||||||
printf("P Flag :");
|
|
||||||
if (nlent->pflag & 0x01)
|
|
||||||
printf(" Down");
|
|
||||||
if (nlent->pflag & 0x02)
|
|
||||||
printf(" Hold");
|
|
||||||
if (nlent->pflag & 0x04)
|
|
||||||
printf(" Pvt");
|
|
||||||
if (nlent->pflag & 0x10)
|
|
||||||
printf(" ISDN");
|
|
||||||
if (nlent->pflag & 0x20)
|
|
||||||
printf(" TCP/IP");
|
|
||||||
printf("\n");
|
|
||||||
if (nlent->t1) {
|
|
||||||
printf("System open : ");
|
|
||||||
t = toupper(nlent->t1);
|
|
||||||
printf("%02d:", t - 65);
|
|
||||||
if (isupper(nlent->t1))
|
|
||||||
printf("00 - ");
|
|
||||||
else
|
|
||||||
printf("30 - ");
|
|
||||||
t = toupper(nlent->t2);
|
|
||||||
printf("%02d:", t - 65);
|
|
||||||
if (isupper(nlent->t2))
|
|
||||||
printf("00\n");
|
|
||||||
else
|
|
||||||
printf("30\n");
|
|
||||||
}
|
|
||||||
printf("Uplink : %u/%u\n", nlent->upnet, nlent->upnode);
|
|
||||||
printf("Region : %u\n", nlent->region);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nlent->addr.domain)
|
/*
|
||||||
free(nlent->addr.domain);
|
* Show P flags
|
||||||
|
*/
|
||||||
|
printf("P Flag :");
|
||||||
|
if (nlent->pflag & 0x01)
|
||||||
|
printf(" Down");
|
||||||
|
if (nlent->pflag & 0x02)
|
||||||
|
printf(" Hold");
|
||||||
|
if (nlent->pflag & 0x04)
|
||||||
|
printf(" Pvt");
|
||||||
|
if (nlent->pflag & 0x10)
|
||||||
|
printf(" ISDN");
|
||||||
|
if (nlent->pflag & 0x20)
|
||||||
|
printf(" TCP/IP");
|
||||||
|
printf("\n");
|
||||||
|
if (nlent->t1) {
|
||||||
|
printf("System open : ");
|
||||||
|
t = toupper(nlent->t1);
|
||||||
|
printf("%02d:", t - 65);
|
||||||
|
if (isupper(nlent->t1))
|
||||||
|
printf("00 - ");
|
||||||
|
else
|
||||||
|
printf("30 - ");
|
||||||
|
t = toupper(nlent->t2);
|
||||||
|
printf("%02d:", t - 65);
|
||||||
|
if (isupper(nlent->t2))
|
||||||
|
printf("00\n");
|
||||||
|
else
|
||||||
|
printf("30\n");
|
||||||
|
}
|
||||||
|
printf("Uplink : %u/%u\n", nlent->upnet, nlent->upnode);
|
||||||
|
printf("Region : %u\n", nlent->region);
|
||||||
|
printf("URL : %s\n", printable(nlent->url, 0));
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
if (nlent->addr.domain)
|
||||||
|
free(nlent->addr.domain);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
146
mbcico/outstat.c
146
mbcico/outstat.c
@ -364,78 +364,82 @@ int IsZMH()
|
|||||||
|
|
||||||
int poll(faddr *addr, int stop)
|
int poll(faddr *addr, int stop)
|
||||||
{
|
{
|
||||||
char *pol;
|
char *pol;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
FILE *fp;
|
unsigned long cmmask;
|
||||||
callstat *cst;
|
FILE *fp;
|
||||||
node *nlent;
|
callstat *cst;
|
||||||
|
node *nlent;
|
||||||
if (addr == NULL)
|
|
||||||
return 0;
|
if (addr == NULL)
|
||||||
|
|
||||||
pol = polname(addr);
|
|
||||||
|
|
||||||
if (stop) {
|
|
||||||
if (access(pol, R_OK) == 0) {
|
|
||||||
rc = unlink(pol);
|
|
||||||
if (rc == 0) {
|
|
||||||
Syslog('+', "Removed poll for %s", ascfnode(addr, 0x1f));
|
|
||||||
if (!do_quiet)
|
|
||||||
printf("Removed poll for %s\n", ascfnode(addr, 0x1f));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Syslog('+', "No poll found for %s", ascfnode(addr, 0x1f));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
nlent = getnlent(addr);
|
|
||||||
if (nlent->pflag == NL_DUMMY) {
|
|
||||||
Syslog('+', "Node %s not in nodelist", ascfnode(addr, 0x1f));
|
|
||||||
if (!do_quiet)
|
|
||||||
printf("Node %s not in nodelist", ascfnode(addr, 0x1f));
|
|
||||||
return MBERR_NODE_NOT_IN_LIST;
|
|
||||||
}
|
|
||||||
if (nlent->pflag == NL_DOWN) {
|
|
||||||
Syslog('+', "Node %s has status Down", ascfnode(addr, 0x1f));
|
|
||||||
if (!do_quiet)
|
|
||||||
printf("Node %s has status Down", ascfnode(addr, 0x1f));
|
|
||||||
return MBERR_NODE_MAY_NOT_CALL;
|
|
||||||
}
|
|
||||||
if (nlent->pflag == NL_HOLD) {
|
|
||||||
Syslog('+', "Node %s has status Hold", ascfnode(addr, 0x1f));
|
|
||||||
if (!do_quiet)
|
|
||||||
printf("Node %s has status Hold", ascfnode(addr, 0x1f));
|
|
||||||
return MBERR_NODE_MAY_NOT_CALL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((fp = fopen(pol, "w+")) == NULL) {
|
|
||||||
WriteError("$Can't create poll for %s", ascfnode(addr, 0x1f));
|
|
||||||
rc = MBERR_CANNOT_MAKE_POLL;
|
|
||||||
} else {
|
|
||||||
fclose(fp);
|
|
||||||
if (((nlent->oflags & OL_CM) == 0) && (!IsZMH())) {
|
|
||||||
Syslog('+', "Created poll for %s, non-CM node outside ZMH", ascfnode(addr, 0x1f));
|
|
||||||
if (!do_quiet)
|
|
||||||
printf("Created poll for %s, non-CM node outside ZMH\n", ascfnode(addr, 0x1f));
|
|
||||||
} else {
|
|
||||||
Syslog('+', "Created poll for %s", ascfnode(addr, 0x1f));
|
|
||||||
if (!do_quiet)
|
|
||||||
printf("Created poll for %s\n", ascfnode(addr, 0x1f));
|
|
||||||
}
|
|
||||||
cst = getstatus(addr);
|
|
||||||
if ((cst->trystat == MBERR_NODE_LOCKED) ||
|
|
||||||
(cst->trystat == MBERR_NOT_ZMH) ||
|
|
||||||
(cst->trystat == MBERR_NO_CONNECTION) ||
|
|
||||||
(cst->trystat == MBERR_SESSION_ERROR) ||
|
|
||||||
(cst->trystat == MBERR_UNKNOWN_SESSION) ||
|
|
||||||
(cst->trystat == MBERR_NO_PORT_AVAILABLE) ||
|
|
||||||
(cst->trystat == MBERR_MODEM_ERROR)) {
|
|
||||||
putstatus(addr, 0, 0);
|
|
||||||
}
|
|
||||||
CreateSema((char *)"scanout");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
pol = polname(addr);
|
||||||
|
|
||||||
|
if (stop) {
|
||||||
|
if (access(pol, R_OK) == 0) {
|
||||||
|
rc = unlink(pol);
|
||||||
|
if (rc == 0) {
|
||||||
|
Syslog('+', "Removed poll for %s", ascfnode(addr, 0x1f));
|
||||||
|
if (!do_quiet)
|
||||||
|
printf("Removed poll for %s\n", ascfnode(addr, 0x1f));
|
||||||
|
}
|
||||||
|
CreateSema((char *)"scanout");
|
||||||
|
} else {
|
||||||
|
Syslog('+', "No poll found for %s", ascfnode(addr, 0x1f));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
nlent = getnlent(addr);
|
||||||
|
if (nlent->pflag == NL_DUMMY) {
|
||||||
|
Syslog('+', "Node %s not in nodelist", ascfnode(addr, 0x1f));
|
||||||
|
if (!do_quiet)
|
||||||
|
printf("Node %s not in nodelist", ascfnode(addr, 0x1f));
|
||||||
|
return MBERR_NODE_NOT_IN_LIST;
|
||||||
|
}
|
||||||
|
if (nlent->pflag == NL_DOWN) {
|
||||||
|
Syslog('+', "Node %s has status Down", ascfnode(addr, 0x1f));
|
||||||
|
if (!do_quiet)
|
||||||
|
printf("Node %s has status Down", ascfnode(addr, 0x1f));
|
||||||
|
return MBERR_NODE_MAY_NOT_CALL;
|
||||||
|
}
|
||||||
|
if (nlent->pflag == NL_HOLD) {
|
||||||
|
Syslog('+', "Node %s has status Hold", ascfnode(addr, 0x1f));
|
||||||
|
if (!do_quiet)
|
||||||
|
printf("Node %s has status Hold", ascfnode(addr, 0x1f));
|
||||||
|
return MBERR_NODE_MAY_NOT_CALL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((fp = fopen(pol, "w+")) == NULL) {
|
||||||
|
WriteError("$Can't create poll for %s", ascfnode(addr, 0x1f));
|
||||||
|
rc = MBERR_CANNOT_MAKE_POLL;
|
||||||
|
} else {
|
||||||
|
fclose(fp);
|
||||||
|
cmmask = getCMmask();
|
||||||
|
Syslog('s', "oflags %08x cmmask %08x", nlent->oflags, cmmask);
|
||||||
|
if (((nlent->oflags & cmmask) == 0) && (!IsZMH())) {
|
||||||
|
Syslog('+', "Created poll for %s, non-CM node outside ZMH", ascfnode(addr, 0x1f));
|
||||||
|
if (!do_quiet)
|
||||||
|
printf("Created poll for %s, non-CM node outside ZMH\n", ascfnode(addr, 0x1f));
|
||||||
|
} else {
|
||||||
|
Syslog('+', "Created poll for %s", ascfnode(addr, 0x1f));
|
||||||
|
if (!do_quiet)
|
||||||
|
printf("Created poll for %s\n", ascfnode(addr, 0x1f));
|
||||||
|
}
|
||||||
|
cst = getstatus(addr);
|
||||||
|
if ((cst->trystat == MBERR_NODE_LOCKED) ||
|
||||||
|
(cst->trystat == MBERR_NOT_ZMH) ||
|
||||||
|
(cst->trystat == MBERR_NO_CONNECTION) ||
|
||||||
|
(cst->trystat == MBERR_SESSION_ERROR) ||
|
||||||
|
(cst->trystat == MBERR_UNKNOWN_SESSION) ||
|
||||||
|
(cst->trystat == MBERR_NO_PORT_AVAILABLE) ||
|
||||||
|
(cst->trystat == MBERR_MODEM_ERROR)) {
|
||||||
|
putstatus(addr, 0, 0);
|
||||||
|
}
|
||||||
|
CreateSema((char *)"scanout");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,9 +55,6 @@ static struct _ktab {
|
|||||||
{(char *)"Zmodem", NOZMODEM},
|
{(char *)"Zmodem", NOZMODEM},
|
||||||
{(char *)"ZedZap", NOZEDZAP},
|
{(char *)"ZedZap", NOZEDZAP},
|
||||||
{(char *)"Hydra", NOHYDRA},
|
{(char *)"Hydra", NOHYDRA},
|
||||||
{(char *)"IBN", NOIBN},
|
|
||||||
{(char *)"ITN", NOITN},
|
|
||||||
{(char *)"IFC", NOIFC},
|
|
||||||
{NULL, 0}
|
{NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -98,12 +95,6 @@ void rdoptions(int Loaded)
|
|||||||
localoptions |= NOZEDZAP;
|
localoptions |= NOZEDZAP;
|
||||||
if (CFG.NoHydra)
|
if (CFG.NoHydra)
|
||||||
localoptions |= NOHYDRA;
|
localoptions |= NOHYDRA;
|
||||||
if (CFG.NoIBN)
|
|
||||||
localoptions |= NOIBN;
|
|
||||||
if (CFG.NoITN)
|
|
||||||
localoptions |= NOITN;
|
|
||||||
if (CFG.NoIFC)
|
|
||||||
localoptions |= NOIFC;
|
|
||||||
|
|
||||||
if (nodes.Aka[0].zone == 0) {
|
if (nodes.Aka[0].zone == 0) {
|
||||||
if (Loaded)
|
if (Loaded)
|
||||||
@ -128,13 +119,6 @@ void rdoptions(int Loaded)
|
|||||||
localoptions |= NOZEDZAP;
|
localoptions |= NOZEDZAP;
|
||||||
if (nodes.NoHydra)
|
if (nodes.NoHydra)
|
||||||
localoptions |= NOHYDRA;
|
localoptions |= NOHYDRA;
|
||||||
if (nodes.NoIBN)
|
|
||||||
localoptions |= NOIBN;
|
|
||||||
if (nodes.NoITN)
|
|
||||||
localoptions |= NOITN;
|
|
||||||
if (nodes.NoIFC)
|
|
||||||
localoptions |= NOIFC;
|
|
||||||
|
|
||||||
logoptions();
|
logoptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,9 +60,6 @@ extern int localoptions;
|
|||||||
#define NOZEDZAP 0x0080
|
#define NOZEDZAP 0x0080
|
||||||
#define NOJANUS 0x0100
|
#define NOJANUS 0x0100
|
||||||
#define NOHYDRA 0x0200
|
#define NOHYDRA 0x0200
|
||||||
#define NOIBN 0x0400
|
|
||||||
#define NOITN 0x0800
|
|
||||||
#define NOIFC 0x1000
|
|
||||||
|
|
||||||
|
|
||||||
struct _history history; /* History record for sessions */
|
struct _history history; /* History record for sessions */
|
||||||
|
@ -188,45 +188,47 @@ int Alias_Option(void)
|
|||||||
int Crash_Option(faddr *);
|
int Crash_Option(faddr *);
|
||||||
int Crash_Option(faddr *Dest)
|
int Crash_Option(faddr *Dest)
|
||||||
{
|
{
|
||||||
node *Nlent;
|
node *Nlent;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
unsigned short point;
|
unsigned short point;
|
||||||
|
unsigned long cmmask;
|
||||||
|
|
||||||
if (exitinfo.Security.level < CFG.iCrashLevel)
|
if (exitinfo.Security.level < CFG.iCrashLevel)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
point = Dest->point;
|
cmmask = getCMmask();
|
||||||
Dest->point = 0;
|
point = Dest->point;
|
||||||
|
Dest->point = 0;
|
||||||
|
|
||||||
if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) {
|
if (((Nlent = getnlent(Dest)) != NULL) && (Nlent->addr.zone)) {
|
||||||
if (Nlent->oflags & OL_CM) {
|
if (Nlent->oflags & cmmask) {
|
||||||
/* Crash [y/N]: */
|
/* Crash [y/N]: */
|
||||||
pout(CYAN, BLACK, (char *)Language(461));
|
pout(CYAN, BLACK, (char *)Language(461));
|
||||||
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
|
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
alarm_on();
|
alarm_on();
|
||||||
if (toupper(Getone()) == Keystroke(461, 0)) {
|
if (toupper(Getone()) == Keystroke(461, 0)) {
|
||||||
rc = 1;
|
rc = 1;
|
||||||
printf("%c", Keystroke(461, 0));
|
printf("%c", Keystroke(461, 0));
|
||||||
} else
|
} else
|
||||||
printf("%c", Keystroke(461, 1));
|
printf("%c", Keystroke(461, 1));
|
||||||
} else {
|
} else {
|
||||||
/* Warning: node is not CM, send Immediate [y/N]: */
|
/* Warning: node is not CM, send Immediate [y/N]: */
|
||||||
pout(CYAN, BLACK, (char *)Language(462));
|
pout(CYAN, BLACK, (char *)Language(462));
|
||||||
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
|
colour(CFG.MsgInputColourF, CFG.MsgInputColourB);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
alarm_on();
|
alarm_on();
|
||||||
if (toupper(Getone()) == Keystroke(462, 0)) {
|
if (toupper(Getone()) == Keystroke(462, 0)) {
|
||||||
rc = 2;
|
rc = 2;
|
||||||
printf("%c", Keystroke(462, 0));
|
printf("%c", Keystroke(462, 0));
|
||||||
} else
|
} else
|
||||||
printf("%c", Keystroke(462, 1));
|
printf("%c", Keystroke(462, 1));
|
||||||
}
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
}
|
||||||
|
fflush(stdout);
|
||||||
|
}
|
||||||
|
|
||||||
Dest->point = point;
|
Dest->point = point;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1351,9 +1351,6 @@ void s_mailer(void)
|
|||||||
mvprintw(12,31, "12. No Zmodem");
|
mvprintw(12,31, "12. No Zmodem");
|
||||||
mvprintw(13,31, "13. No Zedzap");
|
mvprintw(13,31, "13. No Zedzap");
|
||||||
mvprintw(14,31, "14. No Hydra");
|
mvprintw(14,31, "14. No Hydra");
|
||||||
mvprintw(15,31, "15. No IBN binkp");
|
|
||||||
mvprintw(16,31, "16. No IFC ifcico");
|
|
||||||
mvprintw(17,31, "17. No ITN telnet");
|
|
||||||
|
|
||||||
mvprintw(12,59, "18. Phonetrans 1-10");
|
mvprintw(12,59, "18. Phonetrans 1-10");
|
||||||
mvprintw(13,59, "19. Phonetrans 11-20");
|
mvprintw(13,59, "19. Phonetrans 11-20");
|
||||||
@ -1418,9 +1415,6 @@ void e_mailer(void)
|
|||||||
show_bool(12,52, CFG.NoZmodem);
|
show_bool(12,52, CFG.NoZmodem);
|
||||||
show_bool(13,52, CFG.NoZedzap);
|
show_bool(13,52, CFG.NoZedzap);
|
||||||
show_bool(14,52, CFG.NoHydra);
|
show_bool(14,52, CFG.NoHydra);
|
||||||
show_bool(15,52, CFG.NoIBN);
|
|
||||||
show_bool(16,52, CFG.NoIFC);
|
|
||||||
show_bool(17,52, CFG.NoITN);
|
|
||||||
|
|
||||||
show_int( 16,75, CFG.Req_Files);
|
show_int( 16,75, CFG.Req_Files);
|
||||||
show_int( 17,75, CFG.Req_MBytes);
|
show_int( 17,75, CFG.Req_MBytes);
|
||||||
@ -1442,9 +1436,6 @@ void e_mailer(void)
|
|||||||
case 12:E_BOOL(12,52, CFG.NoZmodem, "If set then the ^Zmodem^ protocol is disabled")
|
case 12:E_BOOL(12,52, CFG.NoZmodem, "If set then the ^Zmodem^ protocol is disabled")
|
||||||
case 13:E_BOOL(13,52, CFG.NoZedzap, "If set then the ^Zedzap^ protocol is disabled")
|
case 13:E_BOOL(13,52, CFG.NoZedzap, "If set then the ^Zedzap^ protocol is disabled")
|
||||||
case 14:E_BOOL(14,52, CFG.NoHydra, "If set then the ^Hydra^ protocol is disabled")
|
case 14:E_BOOL(14,52, CFG.NoHydra, "If set then the ^Hydra^ protocol is disabled")
|
||||||
case 15:E_BOOL(15,52, CFG.NoIBN, "If set then the ^TCP/IP IBN binkp^ protocol is disabled")
|
|
||||||
case 16:E_BOOL(16,52, CFG.NoIFC, "If set then the ^TCP/IP IFC ifcico^ protocol is disabled")
|
|
||||||
case 17:E_BOOL(17,52, CFG.NoITN, "If set then the ^TCP/IP ITN telnet^ protocol is disabled")
|
|
||||||
|
|
||||||
case 18:e_trans(0);
|
case 18:e_trans(0);
|
||||||
break;
|
break;
|
||||||
@ -2106,9 +2097,6 @@ int global_doc(FILE *fp, FILE *toc, int page)
|
|||||||
fprintf(fp, " No Zmodem %s\n", getboolean(CFG.NoZmodem));
|
fprintf(fp, " No Zmodem %s\n", getboolean(CFG.NoZmodem));
|
||||||
fprintf(fp, " No Zedzap %s\n", getboolean(CFG.NoZedzap));
|
fprintf(fp, " No Zedzap %s\n", getboolean(CFG.NoZedzap));
|
||||||
fprintf(fp, " No Hydra %s\n", getboolean(CFG.NoHydra));
|
fprintf(fp, " No Hydra %s\n", getboolean(CFG.NoHydra));
|
||||||
fprintf(fp, " No TCP/IP IBN %s\n", getboolean(CFG.NoIBN));
|
|
||||||
fprintf(fp, " No TCP/IP IFC %s\n", getboolean(CFG.NoIFC));
|
|
||||||
fprintf(fp, " No TCP/IP ITN %s\n", getboolean(CFG.NoITN));
|
|
||||||
fprintf(fp, " Max request files %d\n", CFG.Req_Files);
|
fprintf(fp, " Max request files %d\n", CFG.Req_Files);
|
||||||
fprintf(fp, " Max request MBytes %d\n", CFG.Req_MBytes);
|
fprintf(fp, " Max request MBytes %d\n", CFG.Req_MBytes);
|
||||||
|
|
||||||
|
@ -802,9 +802,6 @@ void SessionScreen(void)
|
|||||||
mvprintw(14,41, "14. No Zmodem");
|
mvprintw(14,41, "14. No Zmodem");
|
||||||
mvprintw(15,41, "15. No Zedzap");
|
mvprintw(15,41, "15. No Zedzap");
|
||||||
mvprintw(16,41, "16. No Hydra");
|
mvprintw(16,41, "16. No Hydra");
|
||||||
mvprintw(17,41, "17. No TCP/IP IBN");
|
|
||||||
mvprintw(18,41, "18. No TCP/IP IFC");
|
|
||||||
mvprintw(19,41, "19. No TCP/IP ITN");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -833,11 +830,8 @@ void SessionEdit(void)
|
|||||||
show_bool(14,61, nodes.NoZmodem);
|
show_bool(14,61, nodes.NoZmodem);
|
||||||
show_bool(15,61, nodes.NoZedzap);
|
show_bool(15,61, nodes.NoZedzap);
|
||||||
show_bool(16,61, nodes.NoHydra);
|
show_bool(16,61, nodes.NoHydra);
|
||||||
show_bool(17,61, nodes.NoIBN);
|
|
||||||
show_bool(18,61, nodes.NoIFC);
|
|
||||||
show_bool(19,61, nodes.NoITN);
|
|
||||||
|
|
||||||
switch(select_menu(19)) {
|
switch(select_menu(16)) {
|
||||||
case 0: return;
|
case 0: return;
|
||||||
case 1: E_STR( 7,26,15, nodes.Spasswd, "The ^Session password^ for this node")
|
case 1: E_STR( 7,26,15, nodes.Spasswd, "The ^Session password^ for this node")
|
||||||
case 2: E_STR( 8,26,40, nodes.dial, "If needed, give a special modem ^dial command^ for this node")
|
case 2: E_STR( 8,26,40, nodes.dial, "If needed, give a special modem ^dial command^ for this node")
|
||||||
@ -858,9 +852,6 @@ void SessionEdit(void)
|
|||||||
case 14:E_BOOL(14,61, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
|
case 14:E_BOOL(14,61, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
|
||||||
case 15:E_BOOL(15,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
|
case 15:E_BOOL(15,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
|
||||||
case 16:E_BOOL(16,61, nodes.NoHydra, "Disable ^Hydra^ protocol with this node")
|
case 16:E_BOOL(16,61, nodes.NoHydra, "Disable ^Hydra^ protocol with this node")
|
||||||
case 17:E_BOOL(17,61, nodes.NoIBN, "Disable ^TCP/IP IBN binkp^ protocol with this node")
|
|
||||||
case 18:E_BOOL(18,61, nodes.NoIFC, "Disable ^TCP/IP IFC ifcico^ protocol with this node")
|
|
||||||
case 19:E_BOOL(19,61, nodes.NoITN, "Disable ^TCP/IP ITN telnet^ protocol with this node")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1483,9 +1474,6 @@ int node_doc(FILE *fp, FILE *toc, int page)
|
|||||||
fprintf(fp, " No Zmodem %s\n", getboolean(nodes.NoZmodem));
|
fprintf(fp, " No Zmodem %s\n", getboolean(nodes.NoZmodem));
|
||||||
fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap));
|
fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap));
|
||||||
fprintf(fp, " No Hydra %s", getboolean(nodes.NoHydra));
|
fprintf(fp, " No Hydra %s", getboolean(nodes.NoHydra));
|
||||||
fprintf(fp, " No TCP/IP IBN %s\n", getboolean(nodes.NoIBN));
|
|
||||||
fprintf(fp, " No TCP/IP IFC %s", getboolean(nodes.NoIFC));
|
|
||||||
fprintf(fp, " No TCP/IP ITN %s", getboolean(nodes.NoITN));
|
|
||||||
fprintf(fp, " Mail forward %s\n", getboolean(nodes.MailFwd));
|
fprintf(fp, " Mail forward %s\n", getboolean(nodes.MailFwd));
|
||||||
fprintf(fp, " Check mailpwd %s", getboolean(nodes.MailPwdCheck));
|
fprintf(fp, " Check mailpwd %s", getboolean(nodes.MailPwdCheck));
|
||||||
fprintf(fp, " ARCmail comp. %s", getboolean(nodes.ARCmailCompat));
|
fprintf(fp, " ARCmail comp. %s", getboolean(nodes.ARCmailCompat));
|
||||||
|
@ -591,6 +591,13 @@ int checktasks(int onsig)
|
|||||||
if (task[i].tasktype == CM_POTS || task[i].tasktype == CM_ISDN || task[i].tasktype == CM_INET)
|
if (task[i].tasktype == CM_POTS || task[i].tasktype == CM_ISDN || task[i].tasktype == CM_INET)
|
||||||
rescan = TRUE;
|
rescan = TRUE;
|
||||||
ptimer = PAUSETIME;
|
ptimer = PAUSETIME;
|
||||||
|
/*
|
||||||
|
* If a nodelist compiler is ready, reload the nodelists configuration
|
||||||
|
*/
|
||||||
|
if (task[i].tasktype == MBINDEX) {
|
||||||
|
deinitnl();
|
||||||
|
initnl();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first && task[i].rc) {
|
if (first && task[i].rc) {
|
||||||
@ -699,6 +706,7 @@ void die(int onsig)
|
|||||||
else
|
else
|
||||||
Syslog('+', "Good, no more tasks running");
|
Syslog('+', "Good, no more tasks running");
|
||||||
|
|
||||||
|
deinitnl();
|
||||||
ulocktask();
|
ulocktask();
|
||||||
if (sock != -1)
|
if (sock != -1)
|
||||||
close(sock);
|
close(sock);
|
||||||
@ -1034,6 +1042,8 @@ void scheduler(void)
|
|||||||
Syslog('+', "Ports configuration changed, reloading");
|
Syslog('+', "Ports configuration changed, reloading");
|
||||||
load_ports();
|
load_ports();
|
||||||
check_ports();
|
check_ports();
|
||||||
|
deinitnl();
|
||||||
|
initnl();
|
||||||
sem_set((char *)"scanout", TRUE);
|
sem_set((char *)"scanout", TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1305,8 +1315,8 @@ int main(int argc, char **argv)
|
|||||||
memset(®info, 0, sizeof(reginfo));
|
memset(®info, 0, sizeof(reginfo));
|
||||||
memset(&calllist, 0, sizeof(calllist));
|
memset(&calllist, 0, sizeof(calllist));
|
||||||
sprintf(spath, "%s/tmp/mbtask", getenv("MBSE_ROOT"));
|
sprintf(spath, "%s/tmp/mbtask", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
sprintf(ttyfn, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
|
sprintf(ttyfn, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
|
||||||
|
initnl();
|
||||||
load_ports();
|
load_ports();
|
||||||
check_ports();
|
check_ports();
|
||||||
|
|
||||||
|
@ -202,7 +202,18 @@ int outstat()
|
|||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
unsigned long cmmask, ibnmask = 0, ifcmask = 0, itnmask = 0;
|
||||||
|
nodelist_modem **tmpm;
|
||||||
|
|
||||||
|
cmmask = getCMmask();
|
||||||
|
for (tmpm = &nl_tcpip; *tmpm; tmpm=&((*tmpm)->next)) {
|
||||||
|
if (strcmp((*tmpm)->name, "IBN") == 0)
|
||||||
|
ibnmask = (*tmpm)->mask;
|
||||||
|
if (strcmp((*tmpm)->name, "IFC") == 0)
|
||||||
|
ifcmask = (*tmpm)->mask;
|
||||||
|
if (strcmp((*tmpm)->name, "ITN") == 0)
|
||||||
|
itnmask = (*tmpm)->mask;
|
||||||
|
}
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
tm = gmtime(&now); /* UTC time */
|
tm = gmtime(&now); /* UTC time */
|
||||||
uhour = tm->tm_hour;
|
uhour = tm->tm_hour;
|
||||||
@ -406,9 +417,9 @@ int outstat()
|
|||||||
* If the node has internet and we have internet configured,
|
* If the node has internet and we have internet configured,
|
||||||
* check if we can send immediatly.
|
* check if we can send immediatly.
|
||||||
*/
|
*/
|
||||||
if (TCFG.max_tcp && (tmp->olflags & OL_CM) &&
|
if (TCFG.max_tcp && (tmp->olflags & cmmask) &&
|
||||||
(((tmp->flavors) & F_IMM) || ((tmp->flavors) & F_CRASH) || ((tmp->flavors) & F_NORMAL)) &&
|
(((tmp->flavors) & F_IMM) || ((tmp->flavors) & F_CRASH) || ((tmp->flavors) & F_NORMAL)) &&
|
||||||
((tmp->ipflags & IP_IBN) || (tmp->ipflags & IP_IFC) || (tmp->ipflags & IP_ITN))) {
|
((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) {
|
||||||
tmp->flavors |= F_CALL;
|
tmp->flavors |= F_CALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -417,7 +428,7 @@ int outstat()
|
|||||||
/*
|
/*
|
||||||
* Immediate mail, send if node is CM or is in a Txx window or is in ZMH.
|
* Immediate mail, send if node is CM or is in a Txx window or is in ZMH.
|
||||||
*/
|
*/
|
||||||
if ((tmp->olflags & OL_CM) || T_window || iszmh) {
|
if ((tmp->olflags & cmmask) || T_window || iszmh) {
|
||||||
tmp->flavors |= F_CALL;
|
tmp->flavors |= F_CALL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -427,7 +438,7 @@ int outstat()
|
|||||||
/*
|
/*
|
||||||
* Crash mail, send if node is CM or is in a Txx window or is in ZMH.
|
* Crash mail, send if node is CM or is in a Txx window or is in ZMH.
|
||||||
*/
|
*/
|
||||||
if ((tmp->olflags & OL_CM) || T_window || iszmh) {
|
if ((tmp->olflags & cmmask) || T_window || iszmh) {
|
||||||
tmp->flavors |= F_CALL;
|
tmp->flavors |= F_CALL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -480,8 +491,7 @@ int outstat()
|
|||||||
if ((tmp->flavors) & F_CALL) {
|
if ((tmp->flavors) & F_CALL) {
|
||||||
tmp->callmode = CM_NONE;
|
tmp->callmode = CM_NONE;
|
||||||
|
|
||||||
if (TCFG.max_tcp && !(nodes.NoIBN && nodes.NoIFC && nodes.NoITN) &&
|
if (TCFG.max_tcp && ((tmp->ipflags & ibnmask) || (tmp->ipflags & ifcmask) || (tmp->ipflags & itnmask))) {
|
||||||
((tmp->ipflags & IP_IBN) || (tmp->ipflags & IP_IFC) || (tmp->ipflags & IP_ITN))) {
|
|
||||||
inet_calls++;
|
inet_calls++;
|
||||||
tmp->callmode = CM_INET;
|
tmp->callmode = CM_INET;
|
||||||
}
|
}
|
||||||
|
@ -109,11 +109,12 @@ void fill_portlist(pp_list **fdp, pp_list *new)
|
|||||||
*/
|
*/
|
||||||
void load_ports()
|
void load_ports()
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
pp_list new;
|
pp_list new;
|
||||||
int j, stdflag;
|
int stdflag;
|
||||||
char *p, *q;
|
char *p, *q;
|
||||||
|
nodelist_modem **tmpm;
|
||||||
|
|
||||||
tidy_portlist(&pl);
|
tidy_portlist(&pl);
|
||||||
if ((fp = fopen(ttyfn, "r")) == NULL) {
|
if ((fp = fopen(ttyfn, "r")) == NULL) {
|
||||||
Syslog('?', "$Can't open %s", ttyfn);
|
Syslog('?', "$Can't open %s", ttyfn);
|
||||||
@ -142,12 +143,12 @@ void load_ports()
|
|||||||
if ((strncasecmp(p, "U", 1) == 0) && (strlen(p) == 1)) {
|
if ((strncasecmp(p, "U", 1) == 0) && (strlen(p) == 1)) {
|
||||||
stdflag = FALSE;
|
stdflag = FALSE;
|
||||||
} else {
|
} else {
|
||||||
for (j = 0; fkey[j].key; j++)
|
for (tmpm = &nl_pots; *tmpm; tmpm=&((*tmpm)->next))
|
||||||
if (strcasecmp(p, fkey[j].key) == 0)
|
if (strcasecmp(p, (*tmpm)->name) == 0)
|
||||||
new.mflags |= fkey[j].flag;
|
new.mflags |= (*tmpm)->value;
|
||||||
for (j = 0; dkey[j].key; j++)
|
for (tmpm = &nl_isdn; *tmpm; tmpm=&((*tmpm)->next))
|
||||||
if (strcasecmp(p, dkey[j].key) == 0)
|
if (strcasecmp(p, (*tmpm)->name) == 0)
|
||||||
new.dflags |= dkey[j].flag;
|
new.dflags |= (*tmpm)->value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user