diff --git a/CHANGES b/CHANGES index b28e76e..fc46fa0 100644 --- a/CHANGES +++ b/CHANGES @@ -268,3 +268,5 @@ Alexey Khromov (zx@zxalexis.ru) + Added systemd and xinetd service files to contrib folder + Fixed flag files creation + 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 diff --git a/README.md b/README.md index 8365b06..b639c34 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,26 @@ 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 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 it under the terms of the GNU General Public License as published by 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 ---------- - - BinkD use and expect local file time at BinkP sessions, but - BinkleyForce always use UTC time (?) + - BinkleyForce has no support (yet) for multiple INA: addresses + - Can not rotate hidden lines + - Can not rotate supported IP protocols in case of failure Bug Reports ----------- diff --git a/contrib/mkpoll.sh b/contrib/mkpoll.sh new file mode 100755 index 0000000..8f3e73a --- /dev/null +++ b/contrib/mkpoll.sh @@ -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
" + 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 + diff --git a/examples/bforce.conf b/examples/bforce.conf index c613b43..6c54a58 100644 --- a/examples/bforce.conf +++ b/examples/bforce.conf @@ -103,6 +103,11 @@ nodial_flag /etc/nodial #incnet_flag /var/spool/fido/flags/mail # Arcmail: #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 diff --git a/source/bforce/sess_call.c b/source/bforce/sess_call.c index dea5fa5..1217183 100644 --- a/source/bforce/sess_call.c +++ b/source/bforce/sess_call.c @@ -480,10 +480,15 @@ int call_system_tcpip(int callwith) // only TCPIP values { char abuf[BF_MAXADDRSTR+1]; int rc = BFERR_NOERROR; - + char * pbuf; + char * target; + int resflg; /* * 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.inet = TRUE; @@ -502,14 +507,17 @@ int call_system_tcpip(int callwith) // only TCPIP values case CALL_TCPIP_BINKP: state.tcpmode = TCPMODE_BINKP; state.session = SESSION_BINKP; + target = xstrcpy("IBN"); break; case CALL_TCPIP_IFCICO: state.tcpmode = TCPMODE_RAW; state.session = SESSION_UNKNOWN; + target = xstrcpy("IFC"); break; case CALL_TCPIP_TELNET: state.tcpmode = TCPMODE_TELNET; state.session = SESSION_UNKNOWN; + target = xstrcpy("ITN"); break; defalt: log("invalid protocol for TCP/IP module"); @@ -520,8 +528,45 @@ defalt: ftn_addrstr(abuf, state.node.addr), (state.node.name && *state.node.name ) ? state.node.name : "