Fixed nodelist index for root zone nodes, added support for IBN:port

master^2
Alexey Khromov 5 months ago
parent 46312ebc1b
commit 3f9d10e467

@ -268,3 +268,5 @@ Alexey Khromov (zx@zxalexis.ru)
+ Added systemd and xinetd service files to contrib folder + Added systemd and xinetd service files to contrib folder
+ Fixed flag files creation + Fixed flag files creation
+ Added flags for TIC files (inctic_flag) and files (incfile_flag) + Added flags for TIC files (inctic_flag) and files (incfile_flag)
+ Fixed nodelist index creation
+ Added support for TCP port description in IBN/IFC/ITN flags

@ -1,10 +1,26 @@
BinkleyForce FTN mailer BinkleyForce FTN mailer
----------------------- -----------------------
BinkleyForce is a simple ifcico like FTN mailer. It can works via BinkleyForce is a simple ifcico like FTN mailer. It can work via
TCP/IP as well as on modem links. Look sample configs for more TCP/IP as well as on modem links. Look sample configs for more
information. information.
Supported Features
------------------
- PSTN dial-out with EMSI-II/EMSI/YooHoo handshake
- PSTN protocols: Hydra, ZedZap, ZModem
- PSTN dial-in through mgetty
- TCP/IP dial-out through IPv4 and IPv6 networks
- TCP/IP protocols - ifcico / BinkP 1.1
- TCP/IP dial-in through xinetd/inetd
- Daemon mode for outbound queue managing
Linux 2.4.11+, FreeBSD (6+ AFAIR) compatible.
Licence
-------
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
@ -12,8 +28,9 @@ any later version. See the COPYING file for further information.
Known Bugs Known Bugs
---------- ----------
- BinkD use and expect local file time at BinkP sessions, but - BinkleyForce has no support (yet) for multiple INA: addresses
BinkleyForce always use UTC time (?) - Can not rotate hidden lines
- Can not rotate supported IP protocols in case of failure
Bug Reports Bug Reports
----------- -----------

@ -0,0 +1,92 @@
#!/bin/sh
# Directories and static values
DEFZONE=2
# Default outbound
# OUTBOUND="."
# Our AKA
# AKA="2:5030/723@fidonet"
# FLO Extension
FLOEXT="dlo"
# BFCONFIG=/opt/fidonms/etc/bforce.conf
if [ "${BFCONFIG}" == "" ]; then
BFCONF="/etc/bforce/bforce.conf"
else
BFCONF=${BFCONFIG}
fi
if [ "$1" == "" ]; then
echo "No FTN provided. Usage: mkpoll <address>"
exit 1
fi
# Address to create poll
FTNA=$1
# Outbound address
OUTB=""
if [ -f "${BFCONF}" ]; then
# We have config!
OUTB=$(grep -E "^outbound_directory" ${BFCONF} | awk '{print $2}')
else
OUTB=${OUTBOUND}
fi
#echo "FTNA: ${FTNA} OUTB: ${OUTB}"
FZONE=$(echo -n ${FTNA}| awk -F':' '{print $1}')
FNET=$(echo -n ${FTNA} | awk -F':' '{print $2}' | awk -F'/' '{ print $1 }')
FNODE=$(echo -n ${FTNA}| awk -F'/' '{print $2}' | awk -F'@' '{ print $1 }'| awk -F'.' '{ print $1 }')
FPNT=$(echo -n ${FTNA} | awk -F'/' '{print $2}' | awk -F'@' '{ print $1 }'| awk -F'.' '{ print $2 }')
FDOM=$(echo -n ${FTNA} | awk -F'@' '{print $2}')
# echo "Dest ZONE: ${FZONE}, NET: ${FNET}, NODE: ${FNODE}, PNT: ${FPNT} DOM: ${FDOM}"
# Our AKA
FAKA=""
if [ -f "${BFCONF}" ]; then
# We have config!
FAKA=$(grep -E "^address" ${BFCONF} | awk '{print $2}')
else
FAKA=${AKA}
fi
AZONE=$(echo -n ${FAKA}| awk -F':' '{print $1}')
ANET=$(echo -n ${FAKA} | awk -F':' '{print $2}' | awk -F'/' '{ print $1 }')
ANODE=$(echo -n ${FAKA}| awk -F'/' '{print $2}' | awk -F'@' '{ print $1 }'| awk -F'.' '{ print $1 }')
APNT=$(echo -n ${FAKA} | awk -F'/' '{print $2}' | awk -F'@' '{ print $1 }'| awk -F'.' '{ print $2 }')
ADOM=$(echo -n ${FAKA} | awk -F'@' '{print $2}')
# echo "Our ZONE: ${AZONE}, NET: ${ANET}, NODE: ${ANODE}, PNT: ${APNT} DOM: ${ADOM}"
FTNB=$( printf "%04x%04x" ${FNET} ${FNODE} )
if [ "${FPNT}" == "" ]; then
FPNT="0"
fi
FFLO=""
if [ "${AZONE}" == "${FZONE}" ] && [ "${FNET}" == "${ANET}" ] && [ "${FNODE}" == "${ANODE}" ] && [ ! "${FPNT}" == "0" ]; then
# echo "Point operations!"
FLOFIL=$( printf "%08x.${FLOEXT}" ${FPNT} )
PNTDIR=$( echo -n "${OUTB}/${FTNB}.pnt")
FFLO=$( echo -n "${PNTDIR}/${FLOFIL}" )
elif [ ! "${DEFZONE}" == "${FZONE}" ]; then
# Interzonal poll
FLOFIL=$( echo -n "${FTNB}.${FLOEXT}" )
FDIR=$( printf "%03x" ${FZONE} )
FFLO=$( echo -n "${OUTB}.${FDIR}/${FLOFIL}" )
else
# Normal in-zone poll
FLOFIL=$( echo -n "${FTNB}.${FLOEXT}" )
FFLO=$( echo -n "${OUTB}/${FLOFIL}" )
fi
# echo "FloFile: ${FFLO}"
if [ ! -f "${FFLO}" ]; then
touch "${FFLO}"
fi

@ -103,6 +103,11 @@ nodial_flag /etc/nodial
#incnet_flag /var/spool/fido/flags/mail #incnet_flag /var/spool/fido/flags/mail
# Arcmail: # Arcmail:
#incarc_flag /var/spool/fido/flags/echo #incarc_flag /var/spool/fido/flags/echo
# FileEcho TIC
#inctic_flag /var/spool/fido/flags/tick
# Regular file recieve
#incfile_flag /var/spool/fido/flags/alert
# #
# Inbound directories # Inbound directories

@ -480,10 +480,15 @@ int call_system_tcpip(int callwith) // only TCPIP values
{ {
char abuf[BF_MAXADDRSTR+1]; char abuf[BF_MAXADDRSTR+1];
int rc = BFERR_NOERROR; int rc = BFERR_NOERROR;
char * pbuf;
char * target;
int resflg;
/* /*
* Set verbal line name to "tcpip" value * Set verbal line name to "tcpip" value
*/ */
memset(abuf, '\0', BF_MAXADDRSTR+1);
target = xmalloc(1024);
memset(target, '\0', 1024);
state.linename = xstrcpy("tcpip"); state.linename = xstrcpy("tcpip");
state.inet = TRUE; state.inet = TRUE;
@ -502,14 +507,17 @@ int call_system_tcpip(int callwith) // only TCPIP values
case CALL_TCPIP_BINKP: case CALL_TCPIP_BINKP:
state.tcpmode = TCPMODE_BINKP; state.tcpmode = TCPMODE_BINKP;
state.session = SESSION_BINKP; state.session = SESSION_BINKP;
target = xstrcpy("IBN");
break; break;
case CALL_TCPIP_IFCICO: case CALL_TCPIP_IFCICO:
state.tcpmode = TCPMODE_RAW; state.tcpmode = TCPMODE_RAW;
state.session = SESSION_UNKNOWN; state.session = SESSION_UNKNOWN;
target = xstrcpy("IFC");
break; break;
case CALL_TCPIP_TELNET: case CALL_TCPIP_TELNET:
state.tcpmode = TCPMODE_TELNET; state.tcpmode = TCPMODE_TELNET;
state.session = SESSION_UNKNOWN; state.session = SESSION_UNKNOWN;
target = xstrcpy("ITN");
break; break;
defalt: defalt:
log("invalid protocol for TCP/IP module"); log("invalid protocol for TCP/IP module");
@ -520,8 +528,45 @@ defalt:
ftn_addrstr(abuf, state.node.addr), ftn_addrstr(abuf, state.node.addr),
(state.node.name && *state.node.name ) ? state.node.name : "<none>", (state.node.name && *state.node.name ) ? state.node.name : "<none>",
(state.node.host && *state.node.host) ? state.node.host : "<none>"); (state.node.host && *state.node.host) ? state.node.host : "<none>");
memset(abuf, '\0', BF_MAXADDRSTR+1);
pbuf = xmalloc(1024);
resflg = nodelist_lookup_string(pbuf, 1024, state.node.addr);
if ( ! resflg )
{
char *p = strcasestr(pbuf, target);
if( (rc = tcpip_connect(state.node.host, state.tcpmode)) == 0 if ( p )
{
target = strrchr(p, ',');
if ( target ) target[0] = '\0';
target = strrchr(p, ':');
if ( target ) {
target++;
strcpy(abuf,target);
}
}
}
free(pbuf);
pbuf = xstrcpy(state.node.host);
if ( ! resflg )
{
if ( abuf[0] != '\0' )
{
// port not empty
DEB((D_EVENT, "Modifying host address %s with port %s", pbuf, abuf));
pbuf = xstrcat(pbuf, ":");
pbuf = xstrcat(pbuf, abuf);
}
}
if( (rc = tcpip_connect(pbuf, state.tcpmode)) == 0
&& (rc = tcpip_init() == 0) ) && (rc = tcpip_init() == 0) )
{ {
TTYSTATUS(1); TTYSTATUS(1);
@ -532,7 +577,7 @@ defalt:
{ {
rc = BFERR_CANT_CONNECT10; rc = BFERR_CANT_CONNECT10;
} }
free(pbuf);
return rc; return rc;
} }

@ -127,7 +127,7 @@ static int nodelist_makeindex(s_nodelist *nlp, s_faddr addr)
switch(keyword) { switch(keyword) {
case KEYWORD_ZONE: case KEYWORD_ZONE:
bni.zone = value; bni.zone = value;
bni.net = 0; bni.net = value; // zxalexis
bni.node = 0; bni.node = 0;
bni.point = 0; bni.point = 0;
bni.hub = 0; bni.hub = 0;

Loading…
Cancel
Save