88 Commits
Author SHA1 Message Date
zx b14e52133d Marged lint and automation fixes
Archlinux build / build-arch (push) Successful in 3m5s
Debian build / build-ubuntu (push) Successful in 3m47s
2025-04-15 00:36:39 +03:00
zx 07edf66b72 Fixed some lint errors from cppcheck
Debian build / build-ubuntu (push) Successful in 3m39s
Archlinux build / build-arch (push) Successful in 3m1s
2025-04-15 00:25:59 +03:00
zx 8261016c7e README.md fix
Archlinux build / build-arch (push) Successful in 3m0s
Debian build / build-ubuntu (push) Successful in 3m41s
2025-04-14 21:28:49 +03:00
zx 4d48c2abe9 fx version.h for years
Debian build / build-ubuntu (push) Has been cancelled
Archlinux build / build-arch (push) Has been cancelled
2025-04-14 21:26:17 +03:00
zx 7f7e420b13 Fix arch workflow to download only master version of PKGBUILD.ci
Debian build / build-ubuntu (push) Successful in 3m42s
Archlinux build / build-arch (push) Successful in 2m56s
2025-04-13 23:01:37 +03:00
zx 52b3b230b9 Fix PKGBUILD.ci - reverse naming, artifact collection
Archlinux build / build-arch (push) Successful in 4m3s
Debian build / build-ubuntu (push) Successful in 3m41s
2025-04-13 22:44:38 +03:00
zx 416795159f Fix PKGBUILD.ci - if-fi
Archlinux build / build-arch (push) Failing after 2m48s
Debian build / build-ubuntu (push) Successful in 3m39s
2025-04-13 22:30:27 +03:00
zx 04f62c7725 Fix PKGBUILD.ci for CI workflow, added manual action start
Debian build / build-ubuntu (push) Has been cancelled
Archlinux build / build-arch (push) Successful in 2m52s
2025-04-13 22:26:47 +03:00
zx ddf8f3f9e0 Fixed changelist to represent changes
Debian build / build-ubuntu (push) Successful in 3m39s
Archlinux build / build-arch (push) Failing after 55s
2025-04-13 21:41:43 +03:00
zx 6245ad3e10 CI fx workflow 40
Archlinux build / build-arch (push) Successful in 2m51s
Debian build / build-ubuntu (push) Successful in 3m40s
2025-04-13 20:54:59 +03:00
zx e3a1f7e52e CI fx workflow 39
Archlinux build / build (push) Successful in 3m8s
Debian build / build (push) Successful in 3m40s
2025-04-13 20:10:36 +03:00
zx e94fffb110 CI fx workflow 38
Debian build / build (push) Successful in 3m58s
2025-04-13 19:51:32 +03:00
zx a7cda5b70f CI fx workflow 37
Debian build / build (push) Failing after 5m4s
2025-04-13 19:19:34 +03:00
zx 0d4a4945fe CI fx workflow 36
Debian build / build (push) Successful in 3m36s
2025-04-13 18:41:22 +03:00
zx c658e03af5 CI fx workflow 35
Debian build / build (push) Failing after 3m39s
2025-04-13 18:32:15 +03:00
zx 57e5e00ca3 CI fx workflow 34 and cstd error for var decl after label
Debian build / build (push) Successful in 3m38s
2025-04-13 18:21:43 +03:00
zx 1f7d70b755 CI fx workflow 33 and some lint warnings
Debian build / build (push) Failing after 2m57s
2025-04-13 18:14:04 +03:00
zx 3c60f8de01 CI fx workflow 32
Debian build / build (push) Failing after 2m57s
2025-04-13 17:48:39 +03:00
zx c47397c800 CI fx workflow 31
Debian build / build (push) Failing after 2m12s
2025-04-13 17:45:32 +03:00
zx 224115fffe CI fx workflow 30
Debian build / build (push) Failing after 2m1s
2025-04-13 17:39:35 +03:00
zx 875ea3505f CI fx workflow 29
Debian build / build (push) Failing after 1m37s
2025-04-13 17:07:52 +03:00
zx d581b113c8 CI fx workflow 28
Archlinux build / build (push) Successful in 2m52s
Debian build / build (push) Failing after 29s
2025-04-13 16:49:37 +03:00
zx a296d43987 CI fx workflow 27
Archlinux build / build (push) Successful in 2m58s
Debian build / build (push) Failing after 14s
2025-04-13 16:43:35 +03:00
zx aa32dac10e CI fx workflow 26
Archlinux build / build (push) Successful in 2m57s
Debian build / build (push) Failing after 19s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 15s
2025-04-13 16:33:02 +03:00
zx 6a1a0a6838 CI fx workflow 25
Archlinux build / build (push) Successful in 3m2s
Debian build / build (push) Failing after 19s
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
2025-04-13 16:24:01 +03:00
zx 83ce06579c Debianized again, fixed debuild, CI fx workflow
Archlinux build / build (push) Successful in 2m57s
Debian build / build (push) Successful in 1m8s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
2025-04-13 16:14:26 +03:00
zx 8339af8eac fx workflow 24
Archlinux build / build (push) Successful in 3m19s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
2025-04-13 00:41:01 +03:00
zx 2477709da4 fx workflow 23
Archlinux build / build (push) Successful in 3m21s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 18s
2025-04-13 00:25:24 +03:00
zx 136eca95f1 fx workflow 22
Archlinux build / build (push) Successful in 4m30s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 18s
2025-04-12 23:57:11 +03:00
zx 030322225f fx workflow 21
Archlinux build / build (push) Failing after 3m27s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
2025-04-12 23:46:27 +03:00
zx 92bd4cae56 fx workflow 20
Archlinux build / build (push) Failing after 3m27s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
2025-04-12 23:38:39 +03:00
zx 1837ebd57c fx workflow 19
Archlinux build / build (push) Failing after 3m19s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
2025-04-12 23:31:20 +03:00
zx 2eb30b7644 fx workflow 18
Archlinux build / build (push) Failing after 4m29s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
2025-04-12 23:12:44 +03:00
zx 7733d5d663 fx workflow 17
Archlinux build / build (push) Successful in 3m13s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
2025-04-12 22:13:05 +03:00
zx 6a2320d922 fx workflow 16 2025-04-12 22:12:42 +03:00
zx 5f10b52c77 fx workflow 15
Archlinux build / build (push) Successful in 3m18s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
2025-04-12 21:49:23 +03:00
zx 55fc94a95b fx workflow 14
Archlinux build / build (push) Failing after 24s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
2025-04-12 21:40:39 +03:00
zx 1667d8a800 fx workflow 13
Archlinux build / build (push) Failing after 8s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
2025-04-12 21:35:56 +03:00
zx 5eced105c8 fx workflow 12
Archlinux build / build (push) Failing after 38s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 19s
2025-04-12 21:32:20 +03:00
zx 7486b9c141 fx workflow 11
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 30s
2025-04-12 21:22:49 +03:00
zx 2fbe1d3e54 fx workflow 10
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 18s
2025-04-12 21:16:51 +03:00
zx fa8e081584 fx workflow 9
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
2025-04-12 21:09:10 +03:00
zx 981d4f00b3 fx workflow 8 2025-04-12 21:07:19 +03:00
zx 26ecb8b64c fx actions 7
Archlinux build / build (push) Failing after 1m17s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 18s
2025-04-12 15:49:58 +03:00
zx 526338f720 fx actions 6
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 23s
Archlinux build / build (push) Failing after 42s
2025-04-12 15:45:35 +03:00
zx 06f48fe1c1 fx actions 5
Archlinux build / build (push) Failing after 15s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 18s
2025-04-12 15:37:10 +03:00
zx 4767b57ec9 fx actions 4
Archlinux build / build (push) Failing after 16s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 21s
2025-04-12 15:32:47 +03:00
zx 8892e3f740 fx actions 3
Archlinux build / build (push) Failing after 9s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 20s
2025-04-12 15:30:13 +03:00
zx 21eeae69cc fx actions 2
Archlinux build / build (push) Failing after 7s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 0s
2025-04-12 15:26:21 +03:00
zx 9799f977b9 fx actions
Archlinux build / build (push) Failing after 4m46s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
2025-04-12 15:13:29 +03:00
zx 727f7cfdf3 Testing arch workflow 2
Archlinux build / build (push) Failing after 2s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m58s
2025-04-12 15:01:26 +03:00
zx 36747d9071 Testing arch workflow 2025-04-12 15:00:46 +03:00
zx 9fa59cacca fx demo workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 23s
2025-04-12 11:16:47 +03:00
zx b66dd2156c fx demo workflow 2025-04-12 11:14:05 +03:00
zx 80275d30d3 fx demo workflow 2025-04-12 11:11:51 +03:00
zx a62ae3afca fx demo workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3s
2025-04-12 11:08:28 +03:00
zx a9f98cdee9 fx demo workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m28s
2025-04-12 10:44:21 +03:00
zx 10d30223d1 Added demo workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 4m51s
2025-04-12 10:25:35 +03:00
zx c5fc6e9245 added .gitea folder 2025-04-11 12:28:15 +03:00
zx 29000cfdd7 Fixes 2025-04-08 20:45:32 +03:00
zx de6ef3936b small fix checknodefalgs 2025-03-23 20:36:07 +03:00
zx 8db2ee4260 confread diag 2025-03-23 20:21:50 +03:00
zx 25081b1bae . 2025-03-22 22:50:53 +03:00
zx deaa8140f5 Fix binkp overrides 2025-03-22 21:52:08 +03:00
zx 7fb8e32a9b Ver 0.26 changelog 2025-03-20 21:28:39 +03:00
zx 235a6a3072 Ver 0.26 2025-03-20 18:40:08 +03:00
zx 4da486264b Fix unprotected handshake options 2025-03-20 18:37:19 +03:00
zx 25cfb143dc fix typo 2025-03-20 12:32:11 +03:00
zx 4e86852c41 Debug for decryption in passwordless transfer 2025-03-20 12:28:07 +03:00
zx 324b11aad7 test fix for binkp sz and call entry 2025-03-19 21:17:28 +03:00
zx 7fd0d85557 Larger debug of binkp state 2025-03-19 18:56:32 +03:00
zx 0cb9a2b2cf Added Archlinux PKGBUILD 2025-03-18 23:53:39 +03:00
zx 9bc3a14dd0 Version 0.25.3 Fixes for daemon mode, flags, nodelist index 2024-07-05 11:13:12 +03:00
zx abb1153cf3 small fix 2024-07-05 09:16:24 +03:00
zx 3f9d10e467 Fixed nodelist index for root zone nodes, added support for IBN:port 2024-07-04 23:05:23 +03:00
zx 46312ebc1b Fixed flag creation, added flags inctic_flag incfile_flag 2024-07-03 22:42:20 +03:00
zx 5ef2b09861 Added systemd and xinetd service files 2024-07-02 23:28:00 +03:00
zx f72259cfe3 mFix aarch64 binkp FSM 2024-07-02 23:17:07 +03:00
zx 73a3376a3d Fixed outgoing proto detection and order - as Direct, BinkP, Ifcico, Telnet, Modem first allowed to connect. You may change this order individually by override flags 2024-07-02 21:51:58 +03:00
zx 983440fc29 Changed version up to 0.25.3 2024-07-01 00:11:18 +03:00
zx 5a7bac039a Changed daemon mode tcpip priority (to be first in outbound calls), fixed daemon_call creating opts record, fixed working time for tcp nodes 2024-07-01 00:10:20 +03:00
zx bba77edecd mFix ipv6 2024-06-25 23:42:52 +03:00
zx 9aed37b92e IPv6 fixes for incoming inetd calls, minors from lint 2024-06-25 23:05:07 +03:00
zx 3526bc5ece Minor debug improvement 2024-06-24 23:23:24 +03:00
zx a1c93b8016 Fixed binkp read deadlock #2 on some arches (aarch64) 2024-06-22 22:56:49 +03:00
zx e6266e8eab Fixed another annoying binkp errors on aarch64 2024-06-22 21:59:22 +03:00
zx 34daba8a0e Fixed binkp deadlock on some arches (aarch64) 2024-06-22 21:28:07 +03:00
zx ea4e8c806f Fixes for binkp on aarch64 platform 2024-06-22 21:18:01 +03:00
57 changed files with 1014 additions and 328 deletions
View File
+42
View File
@@ -0,0 +1,42 @@
name: Archlinux build
run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }} 🚀
on:
- push
- workflow_dispatch
if: ${{ github.ref }} == 'refs/head/master'
jobs:
build-arch:
runs-on: arch-latest
branches:
- 'master'
steps:
- name: Checking environment
continue-on-error: true
run: printenv
- name: Installing prerequisites - update pacman
run: pacman -Sy
- name: Installing prerequisites - install nodejs for actions & git
run: pacman --disable-sandbox --noconfirm -v -S git nodejs
- name: Adding user builder
continue-on-error: true
run: useradd -d /builder -g users -m builder
- name: Downloading PKGBUILD
run: |
su - builder -c "curl -O http://zxprj:3001/zx/bforce/raw/branch/master/archlinux/bforce.install"
su - builder -c "curl -o PKGBUILD http://zxprj:3001/zx/bforce/raw/branch/master/archlinux/PKGBUILD.ci"
- name: Building archlinux package
run: |
su -w GITHUB_SHA,GITHUB_REF_NAME,GITHUB_REF_TYPE - builder -c makepkg
su - builder -c "ls -la"
- name: Constructing artifact name and version
run: |
echo "BFORCE_VER=$(cat /builder/src/bforce/source/.version)-$(date +%Y%M%d)" >> $GITHUB_ENV
- name: Retrieving artifact files
run: mkdir bforce && cp /builder/bforce-*.pkg.tar.zst bforce
- name: Try to upload artifacts
uses: actions/upload-artifact@v3
with:
name: bforce-${{ env.BFORCE_VER }}-Arch
path: bforce
+52
View File
@@ -0,0 +1,52 @@
name: Debian build
run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }} 🚀
on:
- push
- workflow_dispatch
jobs:
build-ubuntu:
runs-on: ubuntu-latest
branches:
- 'master'
- 'zx'
steps:
- name: Checking environment
continue-on-error: true
run: printenv
- name: Installing build-essentials
continue-on-error: false
run: |
apt update
apt install -y build-essential fakeroot devscripts debhelper pkg-config --no-install-recommends
- name: Installing dependencies
continue-on-error: false
run: |
echo '---- bison ----'
apt install -y bison
echo '---- tcl ------'
apt install -y tcl
- name: Cloning source
uses: actions/checkout@v4
- name: Getting version info
run: |
echo "BFORCE_VER=$(cat ${{ env.GITHUB_WORKSPACE }}/source/.version)-$(date +%Y%M%d)" >> $GITHUB_ENV
- name: Building package
continue-on-error: false
run: |
pwd
echo '---------------------'
cd ${GITHUB_WORKSPACE}/debian
ls -l
debuild -us -uc -b
echo '---build complete---'
ls -l ${{ env.GITHUB_WORKSPACE }}/../
- name: Collecting artifacts
run: |
mkdir -pv ${{ env.GITHUB_WORKSPACE }}/artifacts
mv -v ${{ env.GITHUB_WORKSPACE }}/../*.deb ${{ env.GITHUB_WORKSPACE }}/artifacts/
- name: Try to upload artifacts
uses: actions/upload-artifact@v3
with:
name: bforce-${{ env.BFORCE_VER }}-Ubuntu
path: ${{ env.GITHUB_WORKSPACE }}/artifacts/bforce*.deb
- run: echo "This job's over"
-3
View File
@@ -7,6 +7,3 @@ source/config.log
source/config.status source/config.status
source/include/config.h source/include/config.h
bforce.geany bforce.geany
+22
View File
@@ -257,3 +257,25 @@ Alexey Khromov (zx@zxalexis.ru)
0.25.2 0.25.2
+ Adopted for outgoing IPv6 communication + Adopted for outgoing IPv6 communication
0.25.3
+ Fixed IPv6 address logging in inetd connections
+ Fixed outgoing proto detection and order - as Direct, BinkP, Ifcico,
Telnet, Modem first allowed to connect. You may change this order
individually by override flags.
+ Daemon mode now tries to make outgoing tcp calls prior to modem
+ Daemon mode - fixed working time for tcp nodes (CM)
+ Fixed some x64 errors in comparisons to integers
+ 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
0.26
+ Fixed incorrect binkp protocol realization in unprotected sessions.
+ Fixed binkp override appliance in incoming handshake
0.26.1
+ Fixed binkp stuck on overrides in config
+ ReDebianized
+ Added CI automation: builds for Archlinux and Ubuntu
+28 -4
View File
@@ -1,10 +1,29 @@
![master branch](https://prj.zxalexis.ru/gitea/zx/bforce/actions/workflows/debpkg.yaml/badge.svg?branch=master)
![master branch](https://prj.zxalexis.ru/gitea/zx/bforce/actions/workflows/arch.yaml/badge.svg?branch=master)
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 +31,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
----------- -----------
@@ -26,6 +46,10 @@ New Versions
https://prj.zxalexis.ru/gitea/zx/bforce https://prj.zxalexis.ru/gitea/zx/bforce
SAST Tools
----------
[PVS-Studio](https://pvs-studio.com/pvs-studio/?utm_source=website&utm_medium=github&utm_campaign=open_source) - static analyzer for C, C++, C#, and Java code.
Older Sources Older Sources
------------- -------------
https://github.com/zotrix/binkleyforce/ https://github.com/zotrix/binkleyforce/
@@ -39,4 +63,4 @@ Copyright <br>
> (c) 2007-2008 Sergey Babitch<br> > (c) 2007-2008 Sergey Babitch<br>
> (c) 2011-2014 Sergey Dorofeev<br> > (c) 2011-2014 Sergey Dorofeev<br>
> (c) 2014 Alexander Skovpen<br> > (c) 2014 Alexander Skovpen<br>
> (c) 2024 Alexey Khromov<br> > (c) 2024-2025 Alexey Khromov<br>
+59
View File
@@ -0,0 +1,59 @@
pkgname=bforce
pkgver=r235.a1c93b8
pkgrel=1
pkgdesc="binkleyforce FTN mailer"
arch=('i686' 'x86_64' 'aarch64')
url="https://prj.zxalexis.ru/gitea/zx/bforce/"
license=('GPL2')
source=(
"${pkgname}::git+https://prj.zxalexis.ru/gitea/zx/bforce.git"
)
makedepends=('git' 'gcc' 'make' 'glibc')
provides=('bforce')
build() {
cd "${srcdir}/${pkgname}/source"
./configure --prefix=/ --disable-syslog --with-owner=fido --with-group=uucp
make
}
prepare() {
cd "${pkgname}"
printf "$( pwd )\n"
}
pkgver() {
cd "$pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd ${pkgdir}
mkdir -p ${pkgdir}/etc
mkdir -p ${pkgdir}/usr/bin
mkdir -p ${pkgdir}/usr/local/bin
mkdir -p ${pkgdir}/usr/share/doc/bforce
mkdir -p ${pkgdir}/usr/share/man/man1
mkdir -p ${pkgdir}/var/log/bforce
mkdir -p ${pkgdir}/var/spool/bforce
mkdir -p ${pkgdir}/var/spool/bforce/bt/in
mkdir -p ${pkgdir}/var/spool/bforce/bt/pin
mkdir -p ${pkgdir}/var/spool/bforce/bt/out
mkdir -p ${pkgdir}/var/spool/bforce/ndl
mkdir -p ${pkgdir}/var/spool/bforce/bforce
/usr/bin/install -c ${srcdir}/${pkgname}/source/bin/bforce ${pkgdir}/usr/bin/bforce
/usr/bin/install -c ${srcdir}/${pkgname}/source/bin/bfindex ${pkgdir}/usr/bin/bfindex
/usr/bin/install -c ${srcdir}/${pkgname}/source/bin/bfstat ${pkgdir}/usr/bin/bfstat
/usr/bin/install -c ${srcdir}/${pkgname}/source/bin/nlookup ${pkgdir}/usr/bin/nlookup
/usr/bin/install -c ${srcdir}/${pkgname}/man/*.1 ${pkgdir}/usr/share/man/man1/
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/bforce.conf ${pkgdir}/etc/bforce.conf.sample
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/bforce.subst ${pkgdir}/etc/bforce.subst.sample
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/bforce.passwd ${pkgdir}/etc/bforce.passwd.sample
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/freq.aliases ${pkgdir}/etc/freq.aliases.sample
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/freq.dirs ${pkgdir}/etc/freq.dirs.sample
/usr/bin/install -c ${srcdir}/${pkgname}/contrib/outman ${pkgdir}/usr/local/bin/outman
echo "Please, edit /usr/local/bin/outman"
cp ${srcdir}/${pkgname}/docs/* ${pkgdir}/usr/share/doc/bforce/
}
sha256sums=('SKIP')
+64
View File
@@ -0,0 +1,64 @@
pkgname=bforce
pkgver=r235.a1c93b8
pkgrel=1
pkgdesc="binkleyforce FTN mailer"
arch=('i686' 'x86_64' 'aarch64')
url="https://prj.zxalexis.ru/gitea/zx/bforce/"
license=('GPL2')
source=(
"${pkgname}::git+https://prj.zxalexis.ru/gitea/zx/bforce.git"
)
makedepends=('git' 'gcc' 'make' 'glibc')
provides=('bforce')
build() {
cd "${srcdir}/${pkgname}/source"
./configure --prefix=/ --disable-syslog --with-owner=fido --with-group=uucp
make
}
prepare() {
cd "${pkgname}"
git checkout "${GITHUB_SHA}"
printf "$( pwd )\n"
}
pkgver() {
cd "$pkgname"
if [ "${GITHUB_REF_TYPE}" = "tags" ]; then
printf "v%s" "${GITHUB_REF_NAME}"
else
printf "r%s.%s.%s" "$(git rev-list --count ${GITHUB_SHA})" "$(git rev-parse --short ${GITHUB_SHA})" "${GITHUB_REF_NAME}"
fi
}
package() {
cd ${pkgdir}
mkdir -p ${pkgdir}/etc
mkdir -p ${pkgdir}/usr/bin
mkdir -p ${pkgdir}/usr/local/bin
mkdir -p ${pkgdir}/usr/share/doc/bforce
mkdir -p ${pkgdir}/usr/share/man/man1
mkdir -p ${pkgdir}/var/log/bforce
mkdir -p ${pkgdir}/var/spool/bforce
mkdir -p ${pkgdir}/var/spool/bforce/bt/in
mkdir -p ${pkgdir}/var/spool/bforce/bt/pin
mkdir -p ${pkgdir}/var/spool/bforce/bt/out
mkdir -p ${pkgdir}/var/spool/bforce/ndl
mkdir -p ${pkgdir}/var/spool/bforce/bforce
/usr/bin/install -c ${srcdir}/${pkgname}/source/bin/bforce ${pkgdir}/usr/bin/bforce
/usr/bin/install -c ${srcdir}/${pkgname}/source/bin/bfindex ${pkgdir}/usr/bin/bfindex
/usr/bin/install -c ${srcdir}/${pkgname}/source/bin/bfstat ${pkgdir}/usr/bin/bfstat
/usr/bin/install -c ${srcdir}/${pkgname}/source/bin/nlookup ${pkgdir}/usr/bin/nlookup
/usr/bin/install -c ${srcdir}/${pkgname}/man/*.1 ${pkgdir}/usr/share/man/man1/
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/bforce.conf ${pkgdir}/etc/bforce.conf.sample
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/bforce.subst ${pkgdir}/etc/bforce.subst.sample
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/bforce.passwd ${pkgdir}/etc/bforce.passwd.sample
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/freq.aliases ${pkgdir}/etc/freq.aliases.sample
/usr/bin/install -c -m 644 ${srcdir}/${pkgname}/examples/freq.dirs ${pkgdir}/etc/freq.dirs.sample
/usr/bin/install -c ${srcdir}/${pkgname}/contrib/outman ${pkgdir}/usr/local/bin/outman
echo "Please, edit /usr/local/bin/outman"
cp ${srcdir}/${pkgname}/docs/* ${pkgdir}/usr/share/doc/bforce/
}
sha256sums=('SKIP')
+7
View File
@@ -0,0 +1,7 @@
post_install() {
chmod
}
post_upgrade() {
post_install
}
+3 -3
View File
@@ -10,10 +10,10 @@
# These files are considered legacy and are unnecessary on legacy-free # These files are considered legacy and are unnecessary on legacy-free
# systems. # systems.
d /run/lock 0777 root lock - z /run/lock 0777 root lock -
L /var/lock - - - - ../run/lock z /var/lock 0777 root lock - ../run/lock
# /run/lock/subsys is used for serializing SysV service execution, and # /run/lock/subsys is used for serializing SysV service execution, and
# hence without use on SysV-less systems. # hence without use on SysV-less systems.
d /run/lock/subsys 0775 root lock - z /run/lock/subsys 0775 root lock -
+92
View File
@@ -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
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Binkleyforce Outbound server
[Service]
Type=forking
PIDFile=/tmp/bforce.pid
User=fido
Group=fido
ExecStart=/usr/bin/bforce -d -C /opt/fidonms/etc/bforce.conf
ExecStop=/usr/bin/bforce -q
[Install]
WantedBy=multi-user.target
+13
View File
@@ -0,0 +1,13 @@
#binkleyforce ifc (port 60179) EMSI-over-ip
service binkp
{
disable = no
socket_type = stream
# flags = IPv4
protocol = tcp
port = 24554
wait = no
user = fido
server = /usr/bin/bforce
server_args = -C /opt/fidonms/etc/bforce.conf -i binkp
}
+13
View File
@@ -0,0 +1,13 @@
#binkleyforce ifc (port 60179) EMSI-over-ip
service ifc
{
disable = no
socket_type = stream
# flags = IPv4
protocol = tcp
port = 60179
wait = no
user = fido
server = /usr/bin/bforce
server_args = -C /opt/fidonms/etc/bforce.conf -i auto
}
+12
View File
@@ -1,3 +1,15 @@
bforce (0.26.1) UNRELEASED; urgency=medium
* Fixed for ubuntu/debian builds and CI actions
-- Alexey Khromov <zx@zxalexis.ru> Sun, 13 Apr 2025 20:06:54 +0300
bforce (0.26) UNRELEASED; urgency=medium
* Fixed for IPv6 and build on amd64 and aarch64 platforms
-- Alexey Khromov <zx@zxalexis.ru> Sun, 13 Apr 2025 12:53:54 +0000
bforce (0.22.9-3) unstable; urgency=low bforce (0.22.9-3) unstable; urgency=low
* fixes in init.d script * fixes in init.d script
+1 -1
View File
@@ -1 +1 @@
4 3
-6
View File
@@ -1,6 +0,0 @@
/etc/bforce/bforce.conf
/etc/bforce/bforce.subst
/etc/bforce/bforce.passwd
/etc/bforce/freq.dirs
/etc/bforce/freq.aliases
+2 -2
View File
@@ -1,13 +1,13 @@
Source: bforce Source: bforce
Section: net Section: net
Priority: optional Priority: optional
Maintainer: Evgeniy Kozhuhovskiy <e.kozhuhovskiy@gmail.com> Maintainer: Alexey Khromov <zx@zxalexis.ru>
Build-Depends: debhelper (>> 3.0.0), bison (>> 1.0.0) Build-Depends: debhelper (>> 3.0.0), bison (>> 1.0.0)
Standards-Version: 3.5.10 Standards-Version: 3.5.10
Package: bforce Package: bforce
Architecture: any Architecture: any
Depends: ${shlibs:Depends} Depends: ${shlibs:Depends}, tclsh:any
Description: Binkey Force FTN mailer Description: Binkey Force FTN mailer
FTN mailer is a program that transmit files (netmail and echomail) FTN mailer is a program that transmit files (netmail and echomail)
between your FTN node and other. between your FTN node and other.
Vendored
+1
View File
@@ -1,5 +1,6 @@
usr/bin usr/bin
usr/lib/bforce usr/lib/bforce
usr/lib/systemd/system
etc/bforce etc/bforce
etc/default etc/default
etc/default/bforce etc/default/bforce
Vendored
+2 -6
View File
@@ -1,9 +1,5 @@
README README.md
README.kst
README.ugenk
TODO TODO
CHANGES
CHANGES.kst
CHANGES.ugenk
INSTALL INSTALL
INSTALL.ru INSTALL.ru
SYSLOG
+9 -9
View File
@@ -26,15 +26,15 @@ set -e
case "$1" in case "$1" in
configure) configure)
if ! grep -s news /etc/group >/dev/null 2>&1; then # if ! grep -s news /etc/group >/dev/null 2>&1; then
addgroup --system news # addgroup --system news
fi # fi
#
if ! id uucp >/dev/null 2>&1; then # if ! id uucp >/dev/null 2>&1; then
adduser --system --disabled-password uucp # adduser --system --disabled-password uucp
chsh -s /bin/sh uucp # chsh -s /bin/sh uucp
adduser uucp dialout # adduser uucp dialout
fi # fi
;; ;;
abort-upgrade|abort-remove|abort-deconfigure) abort-upgrade|abort-remove|abort-deconfigure)
+6 -7
View File
@@ -6,8 +6,7 @@
#export DH_VERBOSE=1 #export DH_VERBOSE=1
# This is the debhelper compatibility version to use. # This is the debhelper compatibility version to use.
export DH_COMPAT=3 export DH_COMPAT=11
PACKAGE = bforce PACKAGE = bforce
@@ -49,7 +48,7 @@ clean:
rm -f build-stamp configure-stamp rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process. # Add here commands to clean up after the build process.
-$(MAKE) -C source clean # -$(MAKE) -C source clean
dh_clean dh_clean
rm -f source/config.cache source/include/config.h source/config.log\ rm -f source/config.cache source/include/config.h source/config.log\
source/config.status source/Makefile source/config.status source/Makefile
@@ -57,7 +56,7 @@ clean:
install: build install: build
dh_testdir dh_testdir
dh_testroot dh_testroot
dh_clean -k dh_prep
dh_installdirs dh_installdirs
# Add here commands to install the package into debian/bforce. # Add here commands to install the package into debian/bforce.
@@ -74,7 +73,7 @@ install: build
/usr/bin/install -c -m 600 -o $(USER) -g $(GROUP) examples/bforce.passwd $(CURDIR)/debian/bforce/etc/bforce/bforce.passwd /usr/bin/install -c -m 600 -o $(USER) -g $(GROUP) examples/bforce.passwd $(CURDIR)/debian/bforce/etc/bforce/bforce.passwd
/usr/bin/install -c -m 644 -o $(USER) -g $(GROUP) examples/freq.aliases $(CURDIR)/debian/bforce/etc/bforce/freq.aliases /usr/bin/install -c -m 644 -o $(USER) -g $(GROUP) examples/freq.aliases $(CURDIR)/debian/bforce/etc/bforce/freq.aliases
/usr/bin/install -c -m 644 -o $(USER) -g $(GROUP) examples/freq.dirs $(CURDIR)/debian/bforce/etc/bforce/freq.dirs /usr/bin/install -c -m 644 -o $(USER) -g $(GROUP) examples/freq.dirs $(CURDIR)/debian/bforce/etc/bforce/freq.dirs
/usr/bin/install -c -m 660 contrib/systemd/bforce.service $(CURDIR)/debian/bforce/usr/lib/systemd/system/bforce.service
/usr/bin/install $(CURDIR)/debian/bfha.def $(CURDIR)/debian/bforce/etc/default/bforce/bfha /usr/bin/install $(CURDIR)/debian/bfha.def $(CURDIR)/debian/bforce/etc/default/bforce/bfha
/usr/bin/install $(CURDIR)/contrib/bfha/bfha-debian.pl $(CURDIR)/debian/bforce/usr/lib/bforce/bfha.pl /usr/bin/install $(CURDIR)/contrib/bfha/bfha-debian.pl $(CURDIR)/debian/bforce/usr/lib/bforce/bfha.pl
@@ -92,8 +91,8 @@ binary-arch: build install
# dh_installlogrotate # dh_installlogrotate
dh_installinit dh_installinit
# dh_installcron # dh_installcron
dh_installman $(CURDIR)/debian/bfindex.1 $(CURDIR)/debian/bforce.1 \ dh_installman $(CURDIR)/man/bfindex.1 $(CURDIR)/man/bforce.1 \
$(CURDIR)/debian/bfstat.1 $(CURDIR)/debian/nlookup.1 $(CURDIR)/man/bfstat.1 $(CURDIR)/man/nlookup.1 $(CURDIR)/man/outman.1
# dh_installinfo # dh_installinfo
dh_installchangelogs CHANGES dh_installchangelogs CHANGES
dh_link dh_link
+5
View File
@@ -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
View File
View File
View File
View File
View File
+3 -3
View File
@@ -1,7 +1,7 @@
Summary: Bforce, Fidonet mailer Summary: Bforce, Fidonet mailer
Name: bforce Name: bforce
Version: 0.22.8 Version: 0.26.1
Release: ugenk4 Release: 0
Copyright: GPL Copyright: GPL
Group: Fidonet/mailer Group: Fidonet/mailer
Source0: bforce-%{version}.%{release}.tar.gz Source0: bforce-%{version}.%{release}.tar.gz
@@ -56,7 +56,7 @@ rm -rf $RPM_BUILD_ROOT
%attr(550,uucp,news) /usr/bin/bfstat %attr(550,uucp,news) /usr/bin/bfstat
%attr(550,uucp,news) /usr/bin/nlookup %attr(550,uucp,news) /usr/bin/nlookup
%attr(550,uucp,news) /usr/bin/outman %attr(550,uucp,news) /usr/bin/outman
%attr(644,root,root) /usr/share/doc/bforce-0.22.8/* %attr(644,root,root) /usr/share/doc/bforce/*
%dir %attr(770,uucp,news) /var/log/bforce %dir %attr(770,uucp,news) /var/log/bforce
%dir %attr(770,uucp,news) /var/spool/fido/ndl %dir %attr(770,uucp,news) /var/spool/fido/ndl
%attr(775,uucp,news) /var/spool/fido/bt %attr(775,uucp,news) /var/spool/fido/bt
+1 -1
View File
@@ -1 +1 @@
0.25.2 0.26.1
+12 -6
View File
@@ -20,10 +20,14 @@ s_cval_entry *conf_first(bforce_config_keyword keyword)
{ {
s_cval_entry *ptrl; s_cval_entry *ptrl;
for( ptrl = bforce_config[keyword].data; ptrl; ptrl = ptrl->next ) DEB((D_CONFIG, "conf_first entry nr %d",(int16_t)keyword));
if( !ptrl->expr.expr || eventexpr(&ptrl->expr) )
return ptrl;
for( ptrl = bforce_config[keyword].data; ptrl; ptrl = ptrl->next )
if( !ptrl->expr.expr || eventexpr(&ptrl->expr) ) {
DEB((D_CONFIG, "conf_first ptrl found"));
return ptrl;
}
DEB((D_CONFIG, "conf_first ptrl not found"));
return NULL; return NULL;
} }
@@ -32,9 +36,11 @@ s_cval_entry *conf_next(s_cval_entry *ptrl)
ASSERT(ptrl); ASSERT(ptrl);
for( ptrl = ptrl->next; ptrl; ptrl = ptrl->next ) for( ptrl = ptrl->next; ptrl; ptrl = ptrl->next )
if( !ptrl->expr.expr || eventexpr(&ptrl->expr) ) if( !ptrl->expr.expr || eventexpr(&ptrl->expr) ) {
DEB((D_CONFIG, "conf_next ptrl found"));
return ptrl; return ptrl;
}
DEB((D_CONFIG, "conf_next ptrl not found"));
return NULL; return NULL;
} }
@@ -91,7 +97,7 @@ long conf_number(bforce_config_keyword keyword)
s_override *conf_override(bforce_config_keyword keyword, s_faddr addr) s_override *conf_override(bforce_config_keyword keyword, s_faddr addr)
{ {
s_cval_entry *ptrl; s_cval_entry *ptrl;
DEB((D_CONFIG, "conf_override entry"));
for( ptrl = conf_first(keyword); ptrl; ptrl = conf_next(ptrl) ) for( ptrl = conf_first(keyword); ptrl; ptrl = conf_next(ptrl) )
if( !ftn_addrcomp(ptrl->d.override.addr, addr) ) if( !ftn_addrcomp(ptrl->d.override.addr, addr) )
return &ptrl->d.override; return &ptrl->d.override;
+2
View File
@@ -100,6 +100,8 @@ s_conf_entry bforce_config[BFORCE_NUMBER_OF_KEYWORDS+1] = {
CONF_KEY(freq_srif_command, CT_STRING), CONF_KEY(freq_srif_command, CT_STRING),
CONF_KEY(incnet_flag, CT_STRING), CONF_KEY(incnet_flag, CT_STRING),
CONF_KEY(incarc_flag, CT_STRING), CONF_KEY(incarc_flag, CT_STRING),
CONF_KEY(inctic_flag, CT_STRING),
CONF_KEY(incfile_flag, CT_STRING),
CONF_KEY(hide_our_aka, CT_ADDRESS), CONF_KEY(hide_our_aka, CT_ADDRESS),
CONF_KEY(history_file, CT_STRING), CONF_KEY(history_file, CT_STRING),
CONF_KEY(hydra_options, CT_OPTIONS), CONF_KEY(hydra_options, CT_OPTIONS),
+49 -4
View File
@@ -178,7 +178,7 @@ static int daemon_sysentry_deinit(s_sysentry *sysent)
return 0; return 0;
} }
static bool daemon_node_cancall_line(const s_node *node, const s_override *ovrd) static int daemon_node_cancall_line(const s_node *node, const s_override *ovrd)
{ {
bool good_phone = FALSE; bool good_phone = FALSE;
bool good_host = FALSE; bool good_host = FALSE;
@@ -208,6 +208,11 @@ static bool daemon_node_cancall_line(const s_node *node, const s_override *ovrd)
if( tcpip_isgood_host(ovrd->sIpaddr) ) if( tcpip_isgood_host(ovrd->sIpaddr) )
good_host = TRUE; good_host = TRUE;
} }
else if ( node && *node->host )
{
if( tcpip_isgood_host(node->host) )
good_host = TRUE;
}
/* /*
* Check work time * Check work time
@@ -231,6 +236,16 @@ static bool daemon_node_cancall_line(const s_node *node, const s_override *ovrd)
good_time = TRUE; good_time = TRUE;
} }
// Must be more complicated, i.e. call to IP even if modem is not good time
if ( good_host )
{
good_time = TRUE;
}
DEB((D_DAEMON, "daemon: node_cancall_line good_phone: %d, good_time:%d, good_host:%d",
good_phone, good_time, good_host));
if( good_time ) if( good_time )
{ {
if( good_host ) if( good_host )
@@ -323,9 +338,23 @@ static bool daemon_node_cancall(s_sysentry *syst, bool ign_wtime, bool tcpip)
return FALSE; return FALSE;
} }
/* Make check for tcpip out */
if ( tcpip )
{
rc = daemon_node_cancall_line(&syst->node, NULL);
DEB((D_DAEMON, "daemon tcpip: node_cancall rc=%d", rc));
if ( rc == 2 )
{
syst->tcpip = TRUE;
return TRUE;
}
}
/* Make checks for all lines */ /* Make checks for all lines */
if( syst->overrides ) if( syst->overrides )
{ {
DEB((D_DAEMON, "daemon: node_cancall OVR-IN"));
if( syst->lineptr && syst->lineptr->hidden ) if( syst->lineptr && syst->lineptr->hidden )
{ {
line = syst->line + 1; line = syst->line + 1;
@@ -363,11 +392,18 @@ static bool daemon_node_cancall(s_sysentry *syst, bool ign_wtime, bool tcpip)
} }
line++; line++;
} }
} }
else /* Node without overriden parameters */ else /* Node without overriden parameters */
{ {
syst->line = line = 0; syst->line = line = 0;
return daemon_node_cancall_line(&syst->node, NULL); rc = daemon_node_cancall_line(&syst->node, NULL);
DEB((D_DAEMON, "daemon: node_cancall rc=%d", rc));
if ( rc )
{
syst->tcpip = (rc == 2) ? TRUE : FALSE;
return TRUE;
}
} }
return FALSE; return FALSE;
@@ -687,6 +723,8 @@ int daemon_rescan_sysqueue(s_sysqueue *q, s_daemon_queue dqs[])
#ifdef DEBUG #ifdef DEBUG
log_sysqueue(q); log_sysqueue(q);
DEB((D_DAEMON, "daemon rescan_sysqueue daemon queue: MODEM: %d, %d; TCPIP: %d, %d",
dqs[MODEM_QUEUE].circle, dqs[MODEM_QUEUE].current, dqs[TCPIP_QUEUE].circle, dqs[TCPIP_QUEUE].current));
#endif #endif
return 0; return 0;
@@ -1010,10 +1048,17 @@ int daemon_run(const char *confname, const char *incname, bool quit)
timer_set(&timer_alive, DAEMON_ALIVE_TIMER); timer_set(&timer_alive, DAEMON_ALIVE_TIMER);
} }
if( max_modem > 0 )
daemon_queue_do(&daemon_queues[MODEM_QUEUE]);
if( max_tcpip > 0 ) if( max_tcpip > 0 )
{
DEB((D_DAEMON,"daemon: daemon_tcpip_queue"));
daemon_queue_do(&daemon_queues[TCPIP_QUEUE]); daemon_queue_do(&daemon_queues[TCPIP_QUEUE]);
}
if( max_modem > 0 )
{
DEB((D_DAEMON,"daemon: daemon_modem_queue"));
daemon_queue_do(&daemon_queues[MODEM_QUEUE]);
}
(void)sleep(DAEMON_IDLE_SLEEP); (void)sleep(DAEMON_IDLE_SLEEP);
break; break;
+15 -3
View File
@@ -54,7 +54,12 @@ static int daemon_call_branch(s_sysentry *syst, const char *lockdir, s_modemport
s_bforce_opts opts; s_bforce_opts opts;
// TODO: add hiddenline round-robin // TODO: add hiddenline round-robin
opts.hiddline=0; memset(&opts, '\0', sizeof(s_bforce_opts));
opts.hiddline = 0;
if ( syst->tcpip )
opts.runmode = MODE_CALL_IP;
else
opts.runmode = MODE_CALL_DEFAULT; opts.runmode = MODE_CALL_DEFAULT;
opts.ipproto = NULL; opts.ipproto = NULL;
opts.phone = NULL; opts.phone = NULL;
@@ -62,7 +67,7 @@ static int daemon_call_branch(s_sysentry *syst, const char *lockdir, s_modemport
opts.inetd = 0; opts.inetd = 0;
opts.connect = NULL; opts.connect = NULL;
opts.device = NULL; opts.device = NULL;
DEB((D_DAEMON, "daemon_call: calling call_system from branch"));
// log("doing call_system"); // log("doing call_system");
return call_system(syst->node.addr, &opts); return call_system(syst->node.addr, &opts);
} }
@@ -88,7 +93,10 @@ int daemon_call(s_sysentry *syst)
* Check whether this node is allready locked * Check whether this node is allready locked
*/ */
if( out_bsy_check(syst->node.addr) ) if( out_bsy_check(syst->node.addr) )
{
DEB((D_DAEMON, "daemon_call: node locked by .bsy file"));
return 0; return 0;
}
/* /*
* Set state structure to make expressions works properly now * Set state structure to make expressions works properly now
@@ -101,6 +109,7 @@ int daemon_call(s_sysentry *syst)
if( syst->tcpip == FALSE ) if( syst->tcpip == FALSE )
{ {
DEB((D_DAEMON, "daemon_call: tcpip false - prep modem line"));
if( (p_lockdir = conf_string(cf_uucp_lock_directory)) == NULL ) if( (p_lockdir = conf_string(cf_uucp_lock_directory)) == NULL )
p_lockdir = BFORCE_LOCK_DIR; p_lockdir = BFORCE_LOCK_DIR;
@@ -110,6 +119,9 @@ int daemon_call(s_sysentry *syst)
return 1; return 1;
} }
} }
DEB((D_DAEMON, "call %s line %d via %s",
ftn_addrstr(abuf, syst->node.addr), syst->line,
syst->tcpip ? "TCP/IP" : modemport->name));
log("call %s line %d via %s", log("call %s line %d via %s",
ftn_addrstr(abuf, syst->node.addr), syst->line, ftn_addrstr(abuf, syst->node.addr), syst->line,
@@ -138,7 +150,7 @@ int daemon_call(s_sysentry *syst)
} }
/* Now we are in child process */ /* Now we are in child process */
DEB((D_DAEMON, "daemon_call: fork success - calling..."));
exit(daemon_call_branch(syst, p_lockdir, modemport)); exit(daemon_call_branch(syst, p_lockdir, modemport));
} }
+4 -1
View File
@@ -950,7 +950,7 @@ int yydebug;
`-----------------------------------------------*/ `-----------------------------------------------*/
static void static void
yydestruct (const char *yymsg, yydestruct (char *yymsg,
yysymbol_kind_t yykind, YYSTYPE *yyvaluep) yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
{ {
YY_USE (yyvaluep); YY_USE (yyvaluep);
@@ -1059,6 +1059,7 @@ yysetstate:
/* Give user a chance to reallocate the stack. Use copies of /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into these so that the &'s don't force the real ones into
memory. */ memory. */
YYSTYPE *yyls1 = yyls;
yy_state_t *yyss1 = yyss; yy_state_t *yyss1 = yyss;
YYSTYPE *yyvs1 = yyvs; YYSTYPE *yyvs1 = yyvs;
@@ -1069,7 +1070,9 @@ yysetstate:
yyoverflow (YY_("memory exhausted"), yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * YYSIZEOF (*yyssp), &yyss1, yysize * YYSIZEOF (*yyssp),
&yyvs1, yysize * YYSIZEOF (*yyvsp), &yyvs1, yysize * YYSIZEOF (*yyvsp),
&yyls1, yysize * YYSIZEOF (*yylsp),
&yystacksize); &yystacksize);
yyls = yyls1;
yyss = yyss1; yyss = yyss1;
yyvs = yyvs1; yyvs = yyvs1;
} }
+3 -1
View File
@@ -360,7 +360,8 @@ static int expr_check_mailer(const char *str)
static int expr_check_addr(const char *str) static int expr_check_addr(const char *str)
{ {
s_faddr addr; s_faddr addr = { 0, 0, 0, 0, 0, '\0' };
#ifdef DEBUG #ifdef DEBUG
char abuf1[BF_MAXADDRSTR+1]; char abuf1[BF_MAXADDRSTR+1];
char abuf2[BF_MAXADDRSTR+1]; char abuf2[BF_MAXADDRSTR+1];
@@ -368,6 +369,7 @@ static int expr_check_addr(const char *str)
DEB((D_EVENT, "[yacc] addr: \"%s\" (session with \"%s\")", DEB((D_EVENT, "[yacc] addr: \"%s\" (session with \"%s\")",
ftn_addrstr(abuf1, addr), ftn_addrstr(abuf1, addr),
ftn_addrstr(abuf2, state.node.addr))); ftn_addrstr(abuf2, state.node.addr)));
#endif #endif
if( !state.valid ) if( !state.valid )
-1
View File
@@ -54,7 +54,6 @@ static int tcpip_connect2(struct addrinfo *ai)
if ( fd == -1 ) if ( fd == -1 )
{ {
DEB((D_INFO, "tcpip_connect2: socket error")); DEB((D_INFO, "tcpip_connect2: socket error"));
continue;
} }
else break; else break;
+7 -1
View File
@@ -118,6 +118,9 @@ int tio_get(int fd, TIO *tio)
{ {
#ifdef HAVE_TERMIOS_H #ifdef HAVE_TERMIOS_H
return tcgetattr(fd, tio); return tcgetattr(fd, tio);
#else
DEB(("io_unix_tio: TERMIOS not supported!"));
return -1;
#endif #endif
} }
@@ -127,6 +130,9 @@ int tio_set(int fd, TIO *tio)
{ {
#ifdef HAVE_TERMIOS_H #ifdef HAVE_TERMIOS_H
return tcsetattr(fd, TCSANOW, tio); return tcsetattr(fd, TCSANOW, tio);
#else
DEB(("io_unix_tio: TERMIOS not supported!"));
return -1;
#endif #endif
} }
@@ -177,7 +183,7 @@ int tio_get_speed(TIO *tio)
return speedtab[i].nspeed; return speedtab[i].nspeed;
} }
return-1; return -1;
} }
int tio_set_flow_control(int fd, TIO *tio, int flow) int tio_set_flow_control(int fd, TIO *tio, int flow)
+18 -12
View File
@@ -106,11 +106,15 @@ int log_open(const char *logname, const char *ext, const char *tty)
if( logname ) if( logname )
{ {
DEB((D_INFO,"log_open: Opening log file %s", logname));
strnxcpy(log_name, logname, sizeof(log_name)); strnxcpy(log_name, logname, sizeof(log_name));
// May be NULL, so check both
if( tty && *tty ) if( tty && *tty )
strnxcpy(log_ttyname, tty, sizeof(log_ttyname)); strnxcpy(log_ttyname, tty, sizeof(log_ttyname));
// May be NULL, so check both
if( ext && *ext ) if( ext && *ext )
{ {
strnxcpy(log_extension, ext, sizeof(log_extension)); strnxcpy(log_extension, ext, sizeof(log_extension));
@@ -142,7 +146,9 @@ int log_close(void)
if( log_fp ) if( log_fp )
{ {
rc = fclose(log_fp); log_fp = NULL; rc = fclose(log_fp);
DEB((D_INFO,"Closing log file."));
log_fp = NULL;
} }
return rc; return rc;
@@ -166,7 +172,7 @@ int log_reopen(const char *logname, const char *ext, const char *tty)
} }
int log(const char *s, ...) void log(const char *s, ...)
{ {
char timestr[40]; char timestr[40];
@@ -206,10 +212,10 @@ int log(const char *s, ...)
va_end(args); va_end(args);
return 0; //return 0;
} }
int logerr(const char *s, ...) void logerr(const char *s, ...)
{ {
char timestr[40]; char timestr[40];
va_list args; va_list args;
@@ -275,7 +281,7 @@ int logerr(const char *s, ...)
va_end(args); va_end(args);
return 0; //return 0;
} }
#endif /* USE_SYSLOG */ #endif /* USE_SYSLOG */
@@ -302,7 +308,7 @@ int log_open(const char *logname, const char *ext, const char *tty)
p = xstrcat(p, BF_VERSION); p = xstrcat(p, BF_VERSION);
int fac = conf_number(cf_syslog_facility); int fac = conf_number(cf_syslog_facility);
if( tty && *tty ) if( tty && *tty )
strncpy(p, tty, sizeof(p)); strncpy(p, tty, strlen(p));
openlog(p, LOG_PID, fac); openlog(p, LOG_PID, fac);
slog_active = TRUE; slog_active = TRUE;
return 0; return 0;
@@ -324,7 +330,7 @@ int log_close(void)
} }
int log(const char *s, ...) void log(const char *s, ...)
{ {
char timestr[40]; char timestr[40];
@@ -351,10 +357,10 @@ int log(const char *s, ...)
va_end(args); va_end(args);
return 0; //return 0;
} }
int logerr(const char *s, ...) void logerr(const char *s, ...)
{ {
char timestr[40]; char timestr[40];
@@ -373,7 +379,7 @@ int logerr(const char *s, ...)
va_end(args); va_end(args);
return 0; // return 0;
} }
#endif /* USE_SYSLOG */ #endif /* USE_SYSLOG */
@@ -524,7 +530,7 @@ int debug_close(void)
return rc; return rc;
} }
int debug(unsigned long what, const char *str, ...) void debug(unsigned long what, const char *str, ...)
{ {
char buf[40]; char buf[40];
va_list args; va_list args;
@@ -548,7 +554,7 @@ int debug(unsigned long what, const char *str, ...)
} }
} }
return 0; //return 0;
} }
#endif /* DEBUG */ #endif /* DEBUG */
+15 -5
View File
@@ -56,18 +56,25 @@ int nodelist_checkflag(const char *nodeflags, const char *flag)
const char *searchbase = nodeflags; const char *searchbase = nodeflags;
char *q; char *q;
while( p = strstr(searchbase, flag) ) DEB((D_NODELIST, "nodelist: checking flag \"%s\" in flags \"%s\"", flag, nodeflags));
if ( nodeflags ) {
while( p = strcasestr(searchbase, flag) ) // p - found flag
{ {
if( p == searchbase || *(p-1) == ',' ) if( (p == searchbase) || (p != searchbase && *(p-1) == ',') )
{ {
if( (q = strchr(p, ',')) == NULL || (q - p) == strlen(flag) ) if( (q = strchr(p, ',')) == NULL || (q - p) == strlen(flag) ) {
DEB((D_NODELIST, "nodelist: found flag %s", flag));
return 0; return 0;
if( (strchrnul(p, ':') - p) == strlen(flag) ) }
if( (strchrnul(p, ':') - p) == strlen(flag) ) {
DEB((D_NODELIST, "nodelist: found flag %s", flag));
return 0; return 0;
} }
}
searchbase = p + 1; // avoid finding again the same searchbase = p + 1; // avoid finding again the same
} }
}
return 1; return 1;
} }
@@ -243,7 +250,7 @@ int nodelist_parsestring(s_node *node, char *str)
strnxcpy(node->phone, argv[NODELIST_POSPHONE], sizeof(node->phone)); strnxcpy(node->phone, argv[NODELIST_POSPHONE], sizeof(node->phone));
strnxcpy(node->flags, argv[NODELIST_POSFLAGS], sizeof(node->flags)); strnxcpy(node->flags, argv[NODELIST_POSFLAGS], sizeof(node->flags));
node->speed = atoi(argv[NODELIST_POSSPEED]); node->speed = atoi(argv[NODELIST_POSSPEED]);
DEB((D_NODELIST, "nodelist: Parsed common values SYS: %s, ZYZ: %s, LOC: %s, PHONE: %s", node->name, node->sysop, node->location, node->phone));
/* /*
* Replace all '_' by space character * Replace all '_' by space character
*/ */
@@ -291,8 +298,11 @@ int nodelist_parsestring(s_node *node, char *str)
node->do_ifcico = nodelist_checkflag(node->flags, "IFC") == 0; node->do_ifcico = nodelist_checkflag(node->flags, "IFC") == 0;
node->do_telnet = nodelist_checkflag(node->flags, "ITN") == 0; node->do_telnet = nodelist_checkflag(node->flags, "ITN") == 0;
//TODO: Add more INA flags to array
nodelist_flagvalue(node->flags, "INA", node->host); nodelist_flagvalue(node->flags, "INA", node->host);
DEB((D_NODELIST, "nodelist: Parsed inet values IBN: %d, IFC: %d, ITN: %d, INA: %s", node->do_binkp, node->do_ifcico, node->do_telnet, node->host));
return 0; return 0;
} }
+11 -3
View File
@@ -152,6 +152,7 @@ int exec_redirect_descriptor(int desc, const char *fname, int flags)
{ {
log("exec error: cannot open \"%s\" <--> %d (got %d)", log("exec error: cannot open \"%s\" <--> %d (got %d)",
fname, desc, fd); fname, desc, fd);
close(fd);
return -1; return -1;
} }
@@ -329,6 +330,7 @@ int xsystem(const char *command, const char *p_input, const char *p_output)
{ {
pid_t pid; pid_t pid;
int status; int status;
int fd;
ASSERT(command != NULL); ASSERT(command != NULL);
@@ -342,27 +344,33 @@ int xsystem(const char *command, const char *p_input, const char *p_output)
if( p_input ) if( p_input )
{ {
close(0); close(0);
if( open(p_input, O_RDONLY) != 0 ) fd = open(p_input, O_RDONLY);
if( fd != 0 )
{ {
logerr("can't open stdin \"%s\"", p_input); logerr("can't open stdin \"%s\"", p_input);
close(fd);
exit(-1); exit(-1);
} }
} }
if( p_output ) if( p_output )
{ {
close(1); close(1);
if( open(p_output, O_WRONLY|O_APPEND|O_CREAT, 0600) != 1 ) fd = open(p_output, O_WRONLY|O_APPEND|O_CREAT, 0600);
if( fd != 1 )
{ {
logerr("can't open stdout \"%s\"", p_output); logerr("can't open stdout \"%s\"", p_output);
close(fd);
exit(-1); exit(-1);
} }
} }
if( p_output ) if( p_output )
{ {
close(2); close(2);
if( open(p_output, O_WRONLY|O_APPEND|O_CREAT, 0600) != 2 ) fd = open(p_output, O_WRONLY|O_APPEND|O_CREAT, 0600);
if( fd != 2 )
{ {
logerr("can't open stderr \"%s\"", p_output); logerr("can't open stderr \"%s\"", p_output);
close(fd);
exit(-1); exit(-1);
} }
} }
+8
View File
@@ -31,6 +31,7 @@ int out_filetype(const char *fname)
else else
p_nam = fname; p_nam = fname;
DEB((D_EVENT, "outb_fsqueue: getting type of file %s", p_nam));
/* /*
* Get file name extension * Get file name extension
*/ */
@@ -39,12 +40,19 @@ int out_filetype(const char *fname)
for( i = 0; outtab[i].ext; i++ ) for( i = 0; outtab[i].ext; i++ )
if( strcasemask(p_ext, outtab[i].ext) == 0 ) if( strcasemask(p_ext, outtab[i].ext) == 0 )
{
DEB((D_EVENT, "outb_fsqueue: got type %d from outtab ext %s", outtab[i].type, p_ext ));
return outtab[i].type; return outtab[i].type;
}
for( i = 0; exttab[i].ext; i++ ) for( i = 0; exttab[i].ext; i++ )
if( strcasemask(p_ext, exttab[i].ext) == 0 ) if( strcasemask(p_ext, exttab[i].ext) == 0 )
{
DEB((D_EVENT, "outb_fsqueue: got type %d from exttab ext %s", exttab[i].type, p_ext ));
return exttab[i].type; return exttab[i].type;
}
DEB((D_EVENT, "outb_fsqueue: got type UNKNOWN", exttab[i].type, p_ext ));
return TYPE_UNKNOWN; return TYPE_UNKNOWN;
} }
+81 -36
View File
@@ -95,12 +95,12 @@ int binkp_loop(s_binkp_state *bstate) {
bstate->emptyloop = 0; bstate->emptyloop = 0;
bstate->continuesend = false; bstate->continuesend = false;
unsigned short read_pos=0; uint16_t read_pos=0;
unsigned short read_blklen=0; uint16_t read_blklen=0;
unsigned short want_read=BINKP_HEADER; uint16_t want_read=BINKP_HEADER;
unsigned short write_pos=0; uint16_t write_pos=0;
unsigned short have_to_write=0; uint16_t have_to_write=0;
int n, m; int n, m;
bool no_more_to_send = false; bool no_more_to_send = false;
@@ -124,7 +124,7 @@ int binkp_loop(s_binkp_state *bstate) {
bstate->continuesend = false; bstate->continuesend = false;
} }
if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=-1)) { if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=(char)-1)) {
m = binkp_getforsend(bstate, writebuf+BINKP_HEADER, &block_type, &block_length); m = binkp_getforsend(bstate, writebuf+BINKP_HEADER, &block_type, &block_length);
if(m==1 || m==3) { if(m==1 || m==3) {
//DEB((D_24554, "got block for sending %d %hu", block_type, block_length)); //DEB((D_24554, "got block for sending %d %hu", block_type, block_length));
@@ -140,6 +140,7 @@ int binkp_loop(s_binkp_state *bstate) {
return PRC_ERROR; return PRC_ERROR;
} }
writebuf[1] = block_length&0xff; writebuf[1] = block_length&0xff;
// TODO: FIX unprotected mode
if (bstate->mode==bmode_transfer && bstate->remote_data->options&BINKP_OPT_CRYPT) if (bstate->mode==bmode_transfer && bstate->remote_data->options&BINKP_OPT_CRYPT)
encrypt_buf(writebuf, have_to_write, bstate->remote_data->keys_out); encrypt_buf(writebuf, have_to_write, bstate->remote_data->keys_out);
} }
@@ -209,15 +210,19 @@ int binkp_loop(s_binkp_state *bstate) {
log("read: remote socket shutdown"); log("read: remote socket shutdown");
return PRC_REMOTEABORTED; return PRC_REMOTEABORTED;
} }
if (bstate->mode==bmode_transfer && bstate->remote_data->options & BINKP_OPT_CRYPT) // TODO: FIX unprotected mode
if (bstate->mode==bmode_transfer && bstate->remote_data->options & BINKP_OPT_CRYPT) {
decrypt_buf(readbuf+read_pos, n, bstate->remote_data->keys_in); decrypt_buf(readbuf+read_pos, n, bstate->remote_data->keys_in);
} else {
DEB((D_24554,"binkp: not encripted transfer"));
};
DEB((D_24554, "got %d bytes", n)); DEB((D_24554, "got %d bytes", n));
want_read -= n; want_read -= n;
read_pos += n; read_pos += n;
if (read_pos == BINKP_HEADER) { if (read_pos == BINKP_HEADER) {
// have read header, want read body // have read header, want read body
DEB((D_24554, "it should be 0: %d", want_read)); DEB((D_24554, "it should be 0: %d", want_read));
want_read = ((unsigned short)(readbuf[0]&0x7F)<<8) | readbuf[1]; want_read = ((uint16_t)(readbuf[0]&0x7F)<<8) | (uint16_t)readbuf[1];
DEB((D_24554, "got block header, block length %u", want_read)); DEB((D_24554, "got block header, block length %u", want_read));
} // no else here: if want_read may be zero here for zero length block } // no else here: if want_read may be zero here for zero length block
} }
@@ -228,6 +233,7 @@ int binkp_loop(s_binkp_state *bstate) {
block_length = read_pos - BINKP_HEADER; block_length = read_pos - BINKP_HEADER;
DEB((D_24554, "binkp: complete block is received %d %hu", block_type, block_length)); DEB((D_24554, "binkp: complete block is received %d %hu", block_type, block_length));
m = binkp_doreceiveblock(bstate, readbuf+BINKP_HEADER, block_type, block_length); m = binkp_doreceiveblock(bstate, readbuf+BINKP_HEADER, block_type, block_length);
DEB((D_24554, "binkp: dorecieveblock result is %d", m));
if(m==1) { if(m==1) {
DEB((D_24554, "block is successfully accepted")); DEB((D_24554, "block is successfully accepted"));
read_pos = 0; read_pos = 0;
@@ -340,7 +346,7 @@ int binkp_getforsend(s_binkp_state *bstate, char *buf, int *block_type, unsigned
{ {
int my_sf, wr_pos; int my_sf, wr_pos;
int n; // read file int n; // read file
if (bstate->extracmd[0]!=-1) { if (bstate->extracmd[0]!=(char)-1) {
DEB((D_24554, "Send cmd to remote %d %s", bstate->extracmd[0], bstate->extracmd+1)); DEB((D_24554, "Send cmd to remote %d %s", bstate->extracmd[0], bstate->extracmd+1));
buf[0] = bstate->extracmd[0]; buf[0] = bstate->extracmd[0];
strcpy(buf+1, bstate->extracmd+1); strcpy(buf+1, bstate->extracmd+1);
@@ -419,6 +425,7 @@ case 7:
// seems not to remove files from inbound until successful session end is enough to eliminate dupes // seems not to remove files from inbound until successful session end is enough to eliminate dupes
// if (!nodelist_checkflag (state.node.flags, "ND")) // if (!nodelist_checkflag (state.node.flags, "ND"))
// strcat(buf+1, " ND"); // strcat(buf+1, " ND");
// TODO: add GZ BZ2 and maybe EXTCMD
*block_length = 1 + strlen(buf+1); *block_length = 1 + strlen(buf+1);
DEB((D_24554, "send M_NUL %s", buf+1)); DEB((D_24554, "send M_NUL %s", buf+1));
return 1; return 1;
@@ -516,27 +523,48 @@ case 3: // send password on outgoing or pw confirmation on incoming
case 4: case 4:
;
char pbuf[32];
int pwset = 0;
if (bstate->mode==bmode_incoming_handshake) { if (bstate->mode==bmode_incoming_handshake) {
char * p;
DEB((D_24554, "incoming handshake is complete")); DEB((D_24554, "incoming handshake is complete"));
bstate->complete = true; bstate->complete = true;
char *p;
char pbuf[32];
for (i=0;i<state.n_remoteaddr;i++) for (i=0;i<state.n_remoteaddr;i++)
if( !session_get_password(state.remoteaddrs[i].addr, pbuf, sizeof(pbuf)) ){ if( !session_get_password(state.remoteaddrs[i].addr, pbuf, sizeof(pbuf)) ){
init_keys(bstate->remote_data->keys_in, pbuf?pbuf:"-"); pwset = 1;
init_keys(bstate->remote_data->keys_in, pbuf[0]?pbuf:"-");
init_keys(bstate->remote_data->keys_out, "-"); init_keys(bstate->remote_data->keys_out, "-");
for (p=pbuf?pbuf:"-"; *p; p++) for (p=pbuf[0]?pbuf:"-"; *p; p++)
update_keys(bstate->remote_data->keys_out, (int)*p); update_keys(bstate->remote_data->keys_out, (int)*p);
} }
//TODO: FIX incoming options
} }
else { else {
//TODO: Fix outgoing options
DEB((D_24554, "outgoing handshake: everything is sent")); DEB((D_24554, "outgoing handshake: everything is sent"));
for (i=0;i<state.n_remoteaddr;i++)
if( !session_get_password(state.remoteaddrs[i].addr, pbuf, sizeof(pbuf)) ){
pwset = 1;
}
}
// We have password-protected link. Remote options are already set,
// Now we determine how to CRYPT or not to CRYPT our file transfer
// Our CRYPT flag is always sent, so if the other side have CRYPT
// and link is password is set - The CRYPT must be
// Literally: if we have no pass -> drop the CRYPT flag
if ( !pwset ) {
DEB((D_24554, "binkp handshake: password NOT set, dropping CRYPT"));
bstate->remote_data->options &= !BINKP_OPT_CRYPT;
} }
return 2; return 2;
} }
} }
else if (bstate->mode == bmode_transfer) { else if (bstate->mode == bmode_transfer) {
switch (bstate->phase) { switch (bstate->phase) {
send_next_file: send_next_file:
@@ -651,7 +679,10 @@ bstate->extracmd[0] = BPMSG_ERR; strcpy(bstate->extracmd+1, msg); bstate->extrai
int binkp_doreceiveblock(s_binkp_state *bstate, char *buf, int block_type, unsigned short block_length) int binkp_doreceiveblock(s_binkp_state *bstate, char *buf, int block_type, unsigned short block_length)
{ {
DEB((D_24554, "dorecieveblock_type: %d", block_type));
DEB((D_24554, "dorecieveblock_bytes: %x %x %x %x", buf[0], buf[1], buf[2], buf[3]));
switch (block_type) { switch (block_type) {
case BINKP_BLK_CMD: case BINKP_BLK_CMD:
if (block_length<1) { if (block_length<1) {
PROTO_ERROR("Zero length command received") PROTO_ERROR("Zero length command received")
@@ -668,12 +699,12 @@ case BPMSG_ADR: /* List of addresses */
if (bstate->address_established) { if (bstate->address_established) {
PROTO_ERROR("remote tries to change address"); PROTO_ERROR("remote tries to change address");
} }
if( bstate->extracmd[0] !=-1 ) return 0; // suspend !!! if( bstate->extracmd[0] != (char)-1 ) return 0; // suspend !!!
binkp_process_ADR(buf+1); binkp_process_ADR(buf+1);
if( !state.n_remoteaddr ) { if( !state.n_remoteaddr ) {
log("error: remote did not supplied any addresses"); log("error: remote did not supplied any addresses");
if( bstate->extracmd[0] !=-1 ) return 0; // suspend if( bstate->extracmd[0] != (char)-1 ) return 0; // suspend
bstate->extracmd[0] = BPMSG_BSY; bstate->extracmd[0] = BPMSG_BSY;
strcpy(bstate->extracmd+1, "No addresses was presented"); strcpy(bstate->extracmd+1, "No addresses was presented");
bstate->extraislast = true; bstate->extraislast = true;
@@ -687,14 +718,17 @@ case BPMSG_ADR: /* List of addresses */
bstate->extraislast = false; bstate->extraislast = false;
sprintf(bstate->extracmd+1,"OPT MB CRYPT"); sprintf(bstate->extracmd+1,"OPT MB CRYPT");
s_override ovr; s_override ovr;
DEB((D_24554, "process adr overrides"));
for(i = 0; i < state.n_remoteaddr; i++) { for(i = 0; i < state.n_remoteaddr; i++) {
ovr.sFlags = ""; ovr.sFlags = "";
override_get (&ovr, state.remoteaddrs[i].addr, 0); override_get (&ovr, state.remoteaddrs[i].addr, 0);
DEB((D_24554, "got adr overrides"));
if (nodelist_checkflag (ovr.sFlags, "NR")==0) { if (nodelist_checkflag (ovr.sFlags, "NR")==0) {
strcat (bstate->extracmd+1, " NR"); strcat (bstate->extracmd+1, " NR");
break; break;
} }
} }
DEB((D_24554, "process adr overrides"));
} }
// further use extracmd only for errors // further use extracmd only for errors
@@ -740,7 +774,7 @@ case BPMSG_PWD: /* Session password */
/* Do authorization */ /* Do authorization */
if( binkp_auth_incoming(bstate->remote_data) ) { if( binkp_auth_incoming(bstate->remote_data) ) {
log("error: invalid password"); log("error: invalid password");
if( bstate->extracmd[0] !=-1 ) return 0; // suspend if extra is occupied if( bstate->extracmd[0] != (char)-1 ) return 0; // suspend if extra is occupied
bstate->extracmd[0] = BPMSG_ERR; bstate->extracmd[0] = BPMSG_ERR;
strcpy(bstate->extracmd+1, "Security violation"); strcpy(bstate->extracmd+1, "Security violation");
bstate->extraislast = true; bstate->extraislast = true;
@@ -749,7 +783,7 @@ case BPMSG_PWD: /* Session password */
// lock addresses // lock addresses
if( session_addrs_lock(state.remoteaddrs, state.n_remoteaddr) ) { if( session_addrs_lock(state.remoteaddrs, state.n_remoteaddr) ) {
log("error locking addresses of the remote"); log("error locking addresses of the remote");
if( bstate->extracmd[0] !=-1 ) return 0; // suspend if extra is occupied if( bstate->extracmd[0] != (char)-1 ) return 0; // suspend if extra is occupied
bstate->extracmd[0] = BPMSG_BSY; bstate->extracmd[0] = BPMSG_BSY;
strcpy(bstate->extracmd+1, "All addresses are busy"); strcpy(bstate->extracmd+1, "All addresses are busy");
bstate->extraislast = true; bstate->extraislast = true;
@@ -770,6 +804,7 @@ case BPMSG_FILE: /* File information */
s_bpfinfo recvfi; s_bpfinfo recvfi;
if( binkp_parsfinfo(buf+1, &recvfi, true) ) { if( binkp_parsfinfo(buf+1, &recvfi, true) ) {
log ("M_FILE parse error: %s", buf + 1); log ("M_FILE parse error: %s", buf + 1);
DEB((D_24554, "M_FILE parse error: %s", buf + 1 ));
PROTO_ERROR("invalid M_FILE"); PROTO_ERROR("invalid M_FILE");
} }
bstate->batch_recv_count += 1; bstate->batch_recv_count += 1;
@@ -786,9 +821,9 @@ case BPMSG_FILE: /* File information */
return 1; return 1;
} }
DEB((D_24554, "no, skipping; TODO: accept it")); DEB((D_24554, "no, skipping; TODO: accept it"));
if( bstate->extracmd[0] != -1 ) return 0; if( bstate->extracmd[0] != (char)-1 ) return 0;
bstate->extracmd[0] = BPMSG_SKIP; bstate->extracmd[0] = BPMSG_SKIP;
sprintf(bstate->extracmd+1, "%s %ld %ld %ld", recvfi.fn, recvfi.sz, recvfi.tm); sprintf(bstate->extracmd+1, "%s %ld %ld %ld", recvfi.fn, recvfi.sz, recvfi.tm, recvfi.offs);
bstate->extraislast = false; bstate->extraislast = false;
return 1; return 1;
} }
@@ -798,7 +833,7 @@ case BPMSG_FILE: /* File information */
PROTO_ERROR("invalid mode for M_FILE"); PROTO_ERROR("invalid mode for M_FILE");
} }
if( bstate->extracmd[0] != -1 ) return 0; if( bstate->extracmd[0] != (char)-1 ) return 0;
switch(p_rx_fopen(bstate->pi, recvfi.fn, recvfi.sz, recvfi.tm, 0)) { switch(p_rx_fopen(bstate->pi, recvfi.fn, recvfi.sz, recvfi.tm, 0)) {
case 0: case 0:
if (bstate->pi->recv->bytes_skipped == recvfi.offs) { if (bstate->pi->recv->bytes_skipped == recvfi.offs) {
@@ -844,7 +879,7 @@ case BPMSG_OK: /* Password was acknowleged (data ignored) */
} }
if (session_addrs_lock(state.remoteaddrs, state.n_remoteaddr)) { if (session_addrs_lock(state.remoteaddrs, state.n_remoteaddr)) {
log("error: unable to lock"); log("error: unable to lock");
if (bstate->extracmd[0]!=-1) return 0; if (bstate->extracmd[0]!= (char)-1) return 0;
bstate->extracmd[0] = BPMSG_BSY; bstate->extracmd[0] = BPMSG_BSY;
strcpy(bstate->extracmd+1, "All addresses are busy"); strcpy(bstate->extracmd+1, "All addresses are busy");
bstate->extraislast = true; bstate->extraislast = true;
@@ -920,10 +955,10 @@ got_skip:
check_that_all_files_are_confirmed: check_that_all_files_are_confirmed:
{ {
int i; int j;
for (i = 0; i < bstate->pi->n_sentfiles; i++) { for (j = 0; j < bstate->pi->n_sentfiles; j++) {
if (bstate->pi->sentfiles[i].status == FSTAT_WAITACK) { if (bstate->pi->sentfiles[i].status == FSTAT_WAITACK) {
DEB((D_24554, "sent file %d waits for acknowlede", i)); DEB((D_24554, "sent file %d waits for acknowlede", j));
return 1; return 1;
} }
} }
@@ -954,7 +989,7 @@ case BPMSG_GET: /* Get a file from offset */
} }
DEB((D_24554, "M_GET file %s size %d time %d offset %d", getfi.fn, getfi.sz, getfi.tm, getfi.offs)); DEB((D_24554, "M_GET file %s size %d time %d offset %d", getfi.fn, getfi.sz, getfi.tm, getfi.offs));
if (bstate->extracmd[0] != -1) return 0; if (bstate->extracmd[0] != (char)-1) return 0;
if (bstate->pi->send) if (p_compfinfo(bstate->pi->send, getfi.fn, getfi.sz, getfi.tm)==0) { if (bstate->pi->send) if (p_compfinfo(bstate->pi->send, getfi.fn, getfi.sz, getfi.tm)==0) {
DEB((D_24554, "M_GET for currently transmitted file")); DEB((D_24554, "M_GET for currently transmitted file"));
@@ -1044,14 +1079,14 @@ case BINKP_BLK_DATA:
return 1; return 1;
} }
if (bstate->extracmd[0] != -1) return 0; if (bstate->extracmd[0] != (char)-1) return 0;
long int n; long int n;
n = p_rx_writefile(buf, block_length, bstate->pi); n = p_rx_writefile(buf, block_length, bstate->pi);
if( n < 0 ) { if( n < 0 ) {
log("error writing local file"); log("error writing local file");
if( n == -2 ) { if( n == (long int)-2 ) {
bstate->extracmd[0] = BPMSG_GOT; bstate->extracmd[0] = BPMSG_GOT;
sprintf(bstate->extracmd+1, "%s %ld %ld", bstate->pi->recv->net_name, (long)bstate->pi->recv->bytes_total, sprintf(bstate->extracmd+1, "%s %ld %ld", bstate->pi->recv->net_name, (long)bstate->pi->recv->bytes_total,
(long)bstate->pi->recv->mod_time); (long)bstate->pi->recv->mod_time);
@@ -1080,11 +1115,13 @@ case BINKP_BLK_DATA:
p_rx_fclose(bstate->pi); p_rx_fclose(bstate->pi);
PROTO_ERROR("extra data for file") PROTO_ERROR("extra data for file")
} }
else if( bstate->pi->recv->bytes_received == bstate->pi->recv->bytes_total ) { else if( bstate->pi->recv->bytes_received == bstate->pi->recv->bytes_total )
{
DEB((D_24554, "receive completed")); DEB((D_24554, "receive completed"));
bstate->frs = frs_nothing; bstate->frs = frs_nothing;
bstate->pi->recv->status = FSTAT_SUCCESS; bstate->pi->recv->status = FSTAT_SUCCESS;
if( !p_rx_fclose(bstate->pi) ) { if( !p_rx_fclose(bstate->pi) )
{
bstate->extracmd[0] = BPMSG_GOT; bstate->extracmd[0] = BPMSG_GOT;
sprintf(bstate->extracmd+1, "%s %ld %ld", sprintf(bstate->extracmd+1, "%s %ld %ld",
bstate->pi->recv->net_name, (long)bstate->pi->recv->bytes_total, bstate->pi->recv->net_name, (long)bstate->pi->recv->bytes_total,
@@ -1092,7 +1129,8 @@ case BINKP_BLK_DATA:
bstate->extraislast = false; bstate->extraislast = false;
return 1; return 1;
} }
else { else
{
DEB((D_24554, "some error committing file")); DEB((D_24554, "some error committing file"));
bstate->extracmd[0] = BPMSG_SKIP; bstate->extracmd[0] = BPMSG_SKIP;
sprintf(bstate->extracmd+1, "%s %ld %ld", sprintf(bstate->extracmd+1, "%s %ld %ld",
@@ -1101,7 +1139,9 @@ case BINKP_BLK_DATA:
bstate->extraislast = false; bstate->extraislast = false;
return 1; return 1;
} }
} else { }
else
{
DEB((D_24554, "data block accepted")); DEB((D_24554, "data block accepted"));
return 1; return 1;
} }
@@ -1117,7 +1157,7 @@ default:
void binkp_process_NUL(s_binkp_sysinfo *remote_data, char *buffer) void binkp_process_NUL(s_binkp_sysinfo *remote_data, char *buffer)
{ {
char *p, *q;
if( strncmp(buffer, "SYS ", 4) == 0 ) if( strncmp(buffer, "SYS ", 4) == 0 )
strnxcpy(remote_data->systname, buffer+4, sizeof(remote_data->systname)); strnxcpy(remote_data->systname, buffer+4, sizeof(remote_data->systname));
@@ -1140,14 +1180,16 @@ void binkp_process_NUL(s_binkp_sysinfo *remote_data, char *buffer)
} }
else else
strnxcpy(remote_data->opt, buffer+4, sizeof(remote_data->opt)); strnxcpy(remote_data->opt, buffer+4, sizeof(remote_data->opt));
DEB((D_24554,"Process OPT"));
binkp_parse_options(remote_data, buffer+4); binkp_parse_options(remote_data, buffer+4);
} }
else if( strncmp(buffer, "VER ", 4) == 0 ) else if( strncmp(buffer, "VER ", 4) == 0 )
{ {
char *p;
/* <mailer> [<protocol>/<vermaj>.<vermin>] */ /* <mailer> [<protocol>/<vermaj>.<vermin>] */
if( (p = strchr(buffer+4, ' ')) ) if( (p = strchr(buffer+4, ' ')) )
{ {
char *q;
strnxcpy(remote_data->progname, buffer+4, strnxcpy(remote_data->progname, buffer+4,
MIN(sizeof(remote_data->progname), p - (buffer+4) + 1)); MIN(sizeof(remote_data->progname), p - (buffer+4) + 1));
++p; ++p;
@@ -1181,13 +1223,16 @@ void binkp_process_ADR(char *buffer)
{ {
s_faddr addr; s_faddr addr;
char *p, *q; char *p, *q;
DEB((D_24554, "process ADR: %s", buffer));
for( p = string_token(buffer, &q, NULL, 0); p; p = string_token(NULL, &q, NULL, 0) ) for( p = string_token(buffer, &q, NULL, 0); p; p = string_token(NULL, &q, NULL, 0) )
{ {
DEB((D_24554, "binkp_process_ADR got token \"%s\" ",p ));
if( ftn_addrparse(&addr, p, FALSE) ) if( ftn_addrparse(&addr, p, FALSE) )
log("BinkP got unparsable address \"%s\"", string_printable(p)); log("BinkP got unparsable address \"%s\"", string_printable(p));
else else {
session_addrs_add(&state.remoteaddrs, &state.n_remoteaddr, addr); session_addrs_add(&state.remoteaddrs, &state.n_remoteaddr, addr);
DEB((D_24554, "process ADR complete"));
}
} }
} }
+1 -1
View File
@@ -304,7 +304,7 @@ void binkp_set_sysinfo(s_binkp_sysinfo *binkp, s_faddr *remote_addr, bool caller
void binkp_parse_options(s_binkp_sysinfo *binkp, char *options) void binkp_parse_options(s_binkp_sysinfo *binkp, char *options)
{ {
char *p, *n; char *p, *n;
DEB((D_24554,"binkp: parse_options: %s", options));
for( p = string_token(options, &n, NULL, 0); p; for( p = string_token(options, &n, NULL, 0); p;
p = string_token(NULL, &n, NULL, 0) ) p = string_token(NULL, &n, NULL, 0) )
{ {
+5
View File
@@ -415,6 +415,7 @@ int p_tx_rewind(s_protinfo *pi, size_t pos)
void prot_traffic_update(s_traffic *traf, size_t size, int xtime, int type) void prot_traffic_update(s_traffic *traf, size_t size, int xtime, int type)
{ {
DEB((D_EVENT, "prot_common: Adding type %d with size %ld to stats", type, size));
if( type & TYPE_REQANSW ) if( type & TYPE_REQANSW )
{ {
traf->freqed_size += size; traf->freqed_size += size;
@@ -433,6 +434,10 @@ void prot_traffic_update(s_traffic *traf, size_t size, int xtime, int type)
traf->arcmail_time += xtime; traf->arcmail_time += xtime;
traf->arcmail_num++; traf->arcmail_num++;
} }
else if( type & TYPE_TICFILE )
{
traf->ticfile_num++;
}
else else
{ {
traf->files_size += size; traf->files_size += size;
+21 -11
View File
@@ -22,8 +22,16 @@
int answ_system(e_session type, char *connstr, int inetd) int answ_system(e_session type, char *connstr, int inetd)
{ {
TIO oldtio; TIO oldtio;
struct sockaddr_in client; union {
struct sockaddr a;
struct sockaddr_in in;
struct sockaddr_in6 in6;
} client;
//struct sockaddr_storage client;
int clientlen = sizeof(client); int clientlen = sizeof(client);
char clienthost[NI_MAXHOST];
char clientport[NI_MAXSERV];
int clientres = 0;
int rc = 0; int rc = 0;
char *p; char *p;
@@ -74,18 +82,20 @@ int answ_system(e_session type, char *connstr, int inetd)
log("Answering TCPIP call..."); log("Answering TCPIP call...");
if( connstr && *connstr ) if( connstr && *connstr )
state.connstr = (char*)xstrcpy(connstr); state.connstr = (char*)xstrcpy(connstr);
else if( getpeername(0, (struct sockaddr*)&client, &clientlen) == -1 )
logerr("can't get client address");
else else
{ {
#ifdef IPV6 if(getpeername(0, &client.a, &clientlen))
>char addr_str[INET6_ADDRSTRLEN+1]; log("sess_answ: can't detrmine socket client");
state.peername = (char*)xstrcpy(inet_ntop(AF_INET6, client.sin6_addr, addr_str, INET6_ADDRSTRLEN)); clientres = getnameinfo( &client.a, clientlen,
state.peerport = (long)ntohs(client.sin6_port); clienthost, sizeof(clienthost), clientport,
#else sizeof(clientport), NI_NUMERICHOST | NI_NUMERICSERV);
state.peername = (char*)xstrcpy(inet_ntoa(client.sin_addr)); if ( clientres == 0 )
state.peerport = (long)ntohs(client.sin_port); {
#endif state.peername = (char*)xstrcpy(clienthost);
state.peerport = (long)atol(clientport);
}
else
log("sess_answ: can't get client address: ", gai_strerror(clientres));
} }
} }
+102 -32
View File
@@ -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 = 0;
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");
@@ -521,7 +529,45 @@ defalt:
(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>");
if( (rc = tcpip_connect(state.node.host, state.tcpmode)) == 0 memset(abuf, '\0', BF_MAXADDRSTR+1);
pbuf = xmalloc(1024);
resflg = nodelist_lookup_string(pbuf, 1024, state.node.addr);
if ( ! resflg )
{
char *p = string_casestr(pbuf, target);
if ( p )
{
target = strchr(p, ',');
if ( target ) target[0] = '\0';
target = 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 +578,7 @@ defalt:
{ {
rc = BFERR_CANT_CONNECT10; rc = BFERR_CANT_CONNECT10;
} }
free(pbuf);
return rc; return rc;
} }
@@ -543,7 +589,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
char s[300]; char s[300];
snprintf(s, 299, "bforce calling system %d:%d/%d.%d", addr.zone, addr.net, addr.node, addr.point ); snprintf(s, 299, "bforce calling system %d:%d/%d.%d", addr.zone, addr.net, addr.node, addr.point );
log(s); log(s);
DEB((D_EVENT, s));
// find suitable way of connection and try to make session // find suitable way of connection and try to make session
int rc = 0; int rc = 0;
@@ -568,12 +614,13 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
} }
state.listed = state.node.listed; state.listed = state.node.listed;
//DEB((D_EVENT, "Calling init, listed=%d", state.listed));
state.node.addr.domain[0] = '\0'; /* Discard domain for node address */ state.node.addr.domain[0] = '\0'; /* Discard domain for node address */
// 1. If call method specified in cmdline, do use it // 1. If call method specified in cmdline, do use it
// 2. If not, use nodelist data and overrides and call all available methods // 2. If not, use nodelist data and overrides and call all available methods
// If override contains Phone or IP flags, ignore nodelist connect methods (but save INA if not overrided) // If override contains Phone or IP flags, ignore nodelist connect methods (but save INA if not overrided)
DEB((D_EVENT, "Calling init, runmode=%d", opts->runmode));
// 1st - get all allowed call ways // 1st - get all allowed call ways
// 2nd - gather information reqired to call and remove unavailable ways (no info, node does not support) // 2nd - gather information reqired to call and remove unavailable ways (no info, node does not support)
@@ -581,7 +628,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
if( opts->runmode == MODE_CALL_DEFAULT ) if( opts->runmode == MODE_CALL_DEFAULT )
{ {
call_mayuse = CALL_MODEM | CALL_TCPIP_ANY; call_mustuse = CALL_MODEM | CALL_TCPIP_ANY;
} }
else if( opts->runmode == MODE_CALL_STDIO ) else if( opts->runmode == MODE_CALL_STDIO )
{ {
@@ -593,7 +640,14 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
} }
else if( opts->runmode == MODE_CALL_IP ) else if( opts->runmode == MODE_CALL_IP )
{ {
if( strcasecmp(opts->ipproto, "binkp") == 0 ) DEB((D_EVENT, "Calling init, MODE_CALL_IP"));
if( !(opts->ipproto) ) // determine from nodelist/override
{
DEB((D_EVENT, "ipproto not set"));
call_mayuse = CALL_TCPIP_ANY;
call_mustuse = 0;
}
else if( strcasecmp(opts->ipproto, "binkp") == 0 )
{ {
call_mustuse = CALL_TCPIP_BINKP; call_mustuse = CALL_TCPIP_BINKP;
} }
@@ -605,20 +659,17 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
{ {
call_mustuse = CALL_TCPIP_TELNET; call_mustuse = CALL_TCPIP_TELNET;
} }
else if( opts->ipproto == NULL ) // determine from nodelist/override
{
call_mayuse = CALL_TCPIP_ANY;
call_mustuse = 0;
}
else else
{ {
DEB((D_EVENT, "Unknown protocol %s", opts->ipproto));
log("Unknown protocol"); log("Unknown protocol");
return -1; return -1;
} }
} }
else else
{ {
log("Unknown protocol"); DEB((D_EVENT, "Unknown runmode %d", opts->runmode));
log("Unknown runmode");
return -1; return -1;
} }
@@ -627,9 +678,10 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
//char s[300]; //char s[300];
//snprintf(s, 299, "initial: may use %d must use %d", call_mayuse, call_mustuse); //snprintf(s, 299, "initial: may use %d must use %d", call_mayuse, call_mustuse);
//log(s); //log(s);
//DEB((D_EVENT, s));
if( call_mayuse & CALL_MODEM ) if( (call_mayuse & CALL_MODEM) )
{ {
// 1. use phone from opts // 1. use phone from opts
// 2. use overrides // 2. use overrides
@@ -650,7 +702,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
{ {
log("bad phone, excluding modem"); log("bad phone, excluding modem");
call_mayuse &= ~CALL_MODEM; call_mayuse &= ~CALL_MODEM;
if( call_mustuse & CALL_MODEM ) if( !(call_mayuse) )
{ {
errmsg = "don't know phone number"; errmsg = "don't know phone number";
gotoexit(BFERR_PHONE_UNKNOWN); gotoexit(BFERR_PHONE_UNKNOWN);
@@ -684,7 +736,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
{ {
call_mayuse &= ~CALL_MODEM; call_mayuse &= ~CALL_MODEM;
log("bad worktime, excluding modem"); log("bad worktime, excluding modem");
if( call_mustuse & CALL_MODEM ) if( !(call_mayuse) )
{ {
errmsg = "not works now, try later"; errmsg = "not works now, try later";
gotoexit(BFERR_NOTWORKING); gotoexit(BFERR_NOTWORKING);
@@ -693,9 +745,9 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
} }
} }
// snprintf(s, 299, "after phone check: may use %d must use %d", call_mayuse, call_mustuse); //snprintf(s, 299, "after phone check: may use %d must use %d", call_mayuse, call_mustuse);
// log(s); //log(s);
//DEB((D_EVENT, s));
/* /*
* Apply overrides to the node information * Apply overrides to the node information
*/ */
@@ -714,7 +766,8 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
if( !(call_mustuse & CALL_TCPIP_BINKP) && (call_mayuse & CALL_TCPIP_BINKP) ) if( !(call_mustuse & CALL_TCPIP_BINKP) && (call_mayuse & CALL_TCPIP_BINKP) )
{ {
if( nodelist_checkflag(state.node.flags, "BINKP") != 0 && nodelist_checkflag(state.node.flags, "IBN") != 0 ) //if( nodelist_checkflag(state.node.flags, "BINKP") != 0 && nodelist_checkflag(state.node.flags, "IBN") != 0 )
if( state.node.do_binkp == 0 )
{ {
call_mayuse &= ~CALL_TCPIP_BINKP; call_mayuse &= ~CALL_TCPIP_BINKP;
} }
@@ -722,7 +775,8 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
if( !(call_mustuse & CALL_TCPIP_IFCICO) && (call_mayuse & CALL_TCPIP_IFCICO) ) if( !(call_mustuse & CALL_TCPIP_IFCICO) && (call_mayuse & CALL_TCPIP_IFCICO) )
{ {
if( nodelist_checkflag(state.node.flags, "IFC") != 0 && nodelist_checkflag(state.node.flags, "IFC") != 0 ) //if( nodelist_checkflag(state.node.flags, "IFC") != 0 && nodelist_checkflag(state.node.flags, "IFC") != 0 )
if( state.node.do_ifcico == 0 )
{ {
call_mayuse &= ~CALL_TCPIP_IFCICO; call_mayuse &= ~CALL_TCPIP_IFCICO;
} }
@@ -730,7 +784,8 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
if( !(call_mustuse & CALL_TCPIP_TELNET) && (call_mayuse & CALL_TCPIP_TELNET) ) if( !(call_mustuse & CALL_TCPIP_TELNET) && (call_mayuse & CALL_TCPIP_TELNET) )
{ {
if( nodelist_checkflag(state.node.flags, "TELN") != 0 && nodelist_checkflag(state.node.flags, "TLN") != 0 ) //if( nodelist_checkflag(state.node.flags, "TELN") != 0 && nodelist_checkflag(state.node.flags, "TLN") != 0 )
if( state.node.do_telnet == 0 )
{ {
call_mayuse &= ~CALL_TCPIP_TELNET; call_mayuse &= ~CALL_TCPIP_TELNET;
} }
@@ -746,7 +801,12 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
state.override.sIpaddr, sizeof(state.node.host)); state.override.sIpaddr, sizeof(state.node.host));
} }
if( call_mayuse & CALL_TCPIP_ANY && !tcpip_isgood_host(state.node.host) ) { //DEB((D_EVENT, "Calling init, IPHOST", state.node.host));
// We have at least one protocol and not valid address - try to
// find INA with through Fidonet DNS
if( (call_mayuse & CALL_TCPIP_ANY) && !tcpip_isgood_host(state.node.host) )
{
char *fidodnszone = conf_string(cf_fidodnszone); char *fidodnszone = conf_string(cf_fidodnszone);
if (fidodnszone) { if (fidodnszone) {
if (addr.point) { if (addr.point) {
@@ -761,17 +821,21 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
} }
} }
if( call_mayuse & CALL_TCPIP_ANY && !tcpip_isgood_host(state.node.host) ) // We have no valid tcpip protocols OR not valid address
if( !(call_mayuse & CALL_TCPIP_ANY) || !tcpip_isgood_host(state.node.host) )
{ {
call_mayuse &= ~CALL_TCPIP_ANY; call_mayuse &= ~CALL_TCPIP_ANY;
log("bad host, exclude IP"); log("bad host, exclude IP");
if( call_mustuse & CALL_TCPIP_ANY ) DEB((D_EVENT, "bad host or proto -> exclude IP, mayuse=%d", call_mayuse));
// If we had ONLY tcpip command - go out with error
if( !(call_mayuse) )
{ {
errmsg = "don't know host name"; errmsg = "Aborting, don't know host name";
gotoexit(BFERR_PHONE_UNKNOWN); gotoexit(BFERR_PHONE_UNKNOWN);
} }
} }
DEB((D_EVENT,"sess_call: may use %d must use %d", call_mayuse, call_mustuse));
// snprintf(s, 299, "after IP check: may use %d must use %d", call_mayuse, call_mustuse); // snprintf(s, 299, "after IP check: may use %d must use %d", call_mayuse, call_mustuse);
// log(s); // log(s);
@@ -808,28 +872,33 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
// try allowed methods and break if rc == 0 // try allowed methods and break if rc == 0
rc = -1; rc = -1;
if( rc && call_mayuse & CALL_STDIO ) if( rc && (call_mayuse & CALL_STDIO) )
{ {
DEB((D_EVENT,"sess_call: calling stdio"));
rc = call_system_quiet(opts->connect, opts->inetd); rc = call_system_quiet(opts->connect, opts->inetd);
} }
if( rc && call_mayuse & CALL_TCPIP_BINKP ) if( rc && (call_mayuse & CALL_TCPIP_BINKP) )
{ {
DEB((D_EVENT,"sess_call: calling binkp"));
rc = call_system_tcpip(CALL_TCPIP_BINKP); rc = call_system_tcpip(CALL_TCPIP_BINKP);
} }
if( rc && call_mayuse & CALL_TCPIP_IFCICO ) if( rc && (call_mayuse & CALL_TCPIP_IFCICO) )
{ {
DEB((D_EVENT,"sess_call: calling ifcico"));
rc = call_system_tcpip(CALL_TCPIP_IFCICO); rc = call_system_tcpip(CALL_TCPIP_IFCICO);
} }
if( rc && call_mayuse & CALL_TCPIP_TELNET ) if( rc && (call_mayuse & CALL_TCPIP_TELNET) )
{ {
DEB((D_EVENT,"sess_call: calling telnet"));
rc = call_system_tcpip(CALL_TCPIP_TELNET); rc = call_system_tcpip(CALL_TCPIP_TELNET);
} }
if( rc && call_mayuse & CALL_MODEM ) if( rc && (call_mayuse & CALL_MODEM) )
{ {
DEB((D_EVENT,"sess_call: calling MODEM"));
setproctitle("bforce calling %.32s, %.32s", setproctitle("bforce calling %.32s, %.32s",
ftn_addrstr(abuf, state.node.addr), state.node.phone); ftn_addrstr(abuf, state.node.addr), state.node.phone);
rc = -1; rc = -1;
@@ -850,6 +919,7 @@ int call_system(s_faddr addr, const s_bforce_opts *opts)
if( port_lock(p_lockdir, state.modemport) == 0 ) /* Successfuly locked port */ if( port_lock(p_lockdir, state.modemport) == 0 ) /* Successfuly locked port */
{ {
DEB((D_EVENT,"sess_call: call_system_modem running"));
rc = call_system_modem(); rc = call_system_modem();
port_unlock(p_lockdir, state.modemport); port_unlock(p_lockdir, state.modemport);
} }
+3 -1
View File
@@ -135,15 +135,17 @@ int override_get(s_override *dest, s_faddr addr, int line)
{ {
s_override *p; s_override *p;
int curline = 0; int curline = 0;
p = conf_override(cf_override, addr); p = conf_override(cf_override, addr);
curline = 0; curline = 0;
if (line > 0)
{
while( p && curline < line ) while( p && curline < line )
{ {
p = p->hidden; p = p->hidden;
++curline; ++curline;
} }
}
if( p && curline == line ) if( p && curline == line )
{ {
+39 -3
View File
@@ -264,7 +264,7 @@ int session_check_addr(s_faddr addr)
int session_get_password(s_faddr addr, char *buffer, size_t buflen) int session_get_password(s_faddr addr, char *buffer, size_t buflen)
{ {
s_cval_entry *pwd_ptr; s_cval_entry *pwd_ptr;
buffer[0]='\0';
for( pwd_ptr = conf_first(cf_password); pwd_ptr; for( pwd_ptr = conf_first(cf_password); pwd_ptr;
pwd_ptr = conf_next(pwd_ptr) ) pwd_ptr = conf_next(pwd_ptr) )
{ {
@@ -897,11 +897,20 @@ int session(void)
p_log_txrxstat(&pi); p_log_txrxstat(&pi);
// Protocol info - real info from protocol
DEB((D_EVENT,"sess_main: Pi stats> Net: %d, Arc: %d, Fil: %d, Tic: %d",
pi.traffic_rcvd.netmail_num, pi.traffic_rcvd.arcmail_num,
pi.traffic_rcvd.files_num, pi.traffic_rcvd.ticfile_num));
// Session info - HANDSHAKE info for traffic
DEB((D_EVENT,"sess_main: Sess stats> Net: %d, Arc: %d, Fil: %d, Tic: %d",
state.traff_recv.netmail_num, state.traff_recv.arcmail_num,
state.traff_recv.files_num, state.traff_recv.ticfile_num));
/* /*
* Raise flags if session incoming traffic was not empty * Raise flags if session incoming traffic was not empty
*/ */
if ( (p = conf_string(cf_incnet_flag)) ) if ( (p = conf_string(cf_incnet_flag)) )
if (state.traff_recv.netmail_size > 0) { if (pi.traffic_rcvd.netmail_size > 0) {
DEB((D_EVENT, "Incoming netmail > 0, raising flag")); DEB((D_EVENT, "Incoming netmail > 0, raising flag"));
log("Raising flag for netmail in %s", p); log("Raising flag for netmail in %s", p);
fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP ); fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP );
@@ -915,7 +924,7 @@ int session(void)
} }
if ( (p = conf_string(cf_incarc_flag)) ) if ( (p = conf_string(cf_incarc_flag)) )
if (state.traff_recv.arcmail_size > 0) { if (pi.traffic_rcvd.arcmail_size > 0) {
DEB((D_EVENT, "Incoming arcmail > 0, raising flag")); DEB((D_EVENT, "Incoming arcmail > 0, raising flag"));
log("Raising flag for arcmail in %s", p); log("Raising flag for arcmail in %s", p);
fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
@@ -928,6 +937,33 @@ int session(void)
} }
} }
if ( (p = conf_string(cf_inctic_flag)) )
if (pi.traffic_rcvd.ticfile_num > 0) {
DEB((D_EVENT, "Incoming TIC files > 0, raising flag"));
log("Raising flag for TIC in %s", p);
fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (fd == -1) {
DEB((D_EVENT, "Error raising ticfiles flag"));
log("Error creating flag for ticfiles in %s", p);
} else {
/* all ok - closing file */
close(fd);
}
}
if ( (p = conf_string(cf_incfile_flag)) )
if (pi.traffic_rcvd.files_size > 0) {
DEB((D_EVENT, "Incoming FILES > 0, raising flag"));
log("Raising flag for files in %s", p);
fd = open(p, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
if (fd == -1) {
DEB((D_EVENT, "Error raising files flag"));
log("Error creating flag for files in %s", p);
} else {
/* all ok - closing file */
close(fd);
}
}
/* /*
* Save session traffic before deiniting * Save session traffic before deiniting
*/ */
+3 -1
View File
@@ -189,7 +189,8 @@ static int ftn_addrparse_fido(s_faddr *addr, const char *s, bool wildcard)
{ {
strnxcpy(addr->domain, string_printable(p), sizeof(addr->domain)); strnxcpy(addr->domain, string_printable(p), sizeof(addr->domain));
} }
DEB((D_INFO,"u_ftn: Parsed ftn address z:%d, net:%d, node:%d, point:%d",
addr->zone, addr->net, addr->node, addr->point));
return badaddr; return badaddr;
} }
@@ -326,6 +327,7 @@ int ftn_addrparse(s_faddr *addr, const char *s, bool wildcard)
addr->node = DEFAULT_NODE; addr->node = DEFAULT_NODE;
addr->point = 0; addr->point = 0;
DEB((D_INFO, "u_ftn: parsing ftnaddr %s", s));
if( addr->inetform ) if( addr->inetform )
badaddr = ftn_addrparse_inet(addr, s, wildcard); badaddr = ftn_addrparse_inet(addr, s, wildcard);
else else
+1
View File
@@ -81,6 +81,7 @@ void *xrealloc(void *buf, size_t size)
else if( (tmp = (char*)(buf ? realloc(buf, size) : malloc(size))) == NULL ) else if( (tmp = (char*)(buf ? realloc(buf, size) : malloc(size))) == NULL )
{ {
log("failed to reallocate %ld bytes -> abort", size); log("failed to reallocate %ld bytes -> abort", size);
if( buf ) free(buf);
abort(); abort();
} }
+1 -1
View File
@@ -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;
+115 -113
View File
@@ -159,128 +159,130 @@ typedef struct filebox {
} s_filebox; } s_filebox;
typedef enum { typedef enum {
cf_address, cf_address, // 0
cf_amiga_outbound_directory, cf_amiga_outbound_directory, // 1
cf_binkp_timeout, cf_binkp_timeout, // 2
cf_daemon_circle, cf_daemon_circle, // 3
cf_daemon_circle_crash, cf_daemon_circle_crash, // 4
cf_daemon_circle_direct, cf_daemon_circle_direct, // 5
cf_daemon_circle_immed, cf_daemon_circle_immed, // 6
cf_daemon_circle_modem, cf_daemon_circle_modem, // 7
cf_daemon_circle_normal, cf_daemon_circle_normal, // 8
cf_daemon_circle_rescan, cf_daemon_circle_rescan, // 9
cf_daemon_maxclients_modem, cf_daemon_maxclients_modem, // 10
cf_daemon_maxclients_tcpip, cf_daemon_maxclients_tcpip, // 11
cf_daemon_pid_file, cf_daemon_pid_file, // 12
cf_delay_files_recv, cf_delay_files_recv, // 13
cf_delay_files_send, cf_delay_files_send, // 14
cf_disable_aka_matching, cf_disable_aka_matching, // 15
cf_domain, cf_domain, // 16
cf_emsi_FR_time, cf_emsi_FR_time, // 17
cf_emsi_OH_time, cf_emsi_OH_time, // 18
cf_emsi_slave_sends_nak, cf_emsi_slave_sends_nak, // 19
cf_emsi_send_tz, cf_emsi_send_tz, // 20
cf_emsi_send_time, cf_emsi_send_time, // 21
cf_filebox, cf_filebox, // 22
cf_filebox_directory, cf_filebox_directory, // 23
cf_flags, cf_flags, // 24
cf_flo_translate, cf_flo_translate, // 25
cf_freq_alias_list, cf_freq_alias_list, // 26
cf_freq_dir_list, cf_freq_dir_list, // 27
cf_freq_ignore_masks, cf_freq_ignore_masks, // 28
cf_freq_limit_number, cf_freq_limit_number, // 29
cf_freq_limit_size, cf_freq_limit_size, // 30
cf_freq_limit_time, cf_freq_limit_time, // 31
cf_freq_min_speed, cf_freq_min_speed, // 32
cf_freq_srif_command, cf_freq_srif_command, // 33
cf_incnet_flag, cf_incnet_flag, // 34
cf_incarc_flag, cf_incarc_flag, // 35
cf_hide_our_aka, cf_inctic_flag, // 36
cf_history_file, cf_incfile_flag, // 37
cf_hydra_options, cf_hide_our_aka, // 38
cf_hydra_mincps_recv, cf_history_file, // 39
cf_hydra_mincps_send, cf_hydra_options, // 40
cf_hydra_tx_window, cf_hydra_mincps_recv, // 41
cf_hydra_rx_window, cf_hydra_mincps_send, // 42
cf_inbound_directory, cf_hydra_tx_window, // 43
cf_location, cf_hydra_rx_window, // 44
cf_log_file, cf_inbound_directory, // 45
cf_log_file_daemon, cf_location, // 46
cf_max_speed, cf_log_file, // 47
cf_maxtries, cf_log_file_daemon, // 48
cf_maxtries_nodial, cf_max_speed, // 49
cf_maxtries_noansw, cf_maxtries, // 50
cf_maxtries_noconn, cf_maxtries_nodial, // 51
cf_maxtries_hshake, cf_maxtries_noansw, // 52
cf_maxtries_sessions, cf_maxtries_noconn, // 53
cf_min_cps_recv, cf_maxtries_hshake, // 54
cf_min_cps_send, cf_maxtries_sessions, // 55
cf_min_cps_time, cf_min_cps_recv, // 56
cf_min_free_space, cf_min_cps_send, // 57
cf_min_speed_in, cf_min_cps_time, // 58
cf_min_speed_out, cf_min_free_space, // 59
cf_mode_netmail, cf_min_speed_in, // 60
cf_mode_arcmail, cf_min_speed_out, // 61
cf_mode_request, cf_mode_netmail, // 62
cf_mode_ticfile, cf_mode_arcmail, // 63
cf_mode_default, cf_mode_request, // 64
cf_modem_can_send_break, cf_mode_ticfile, // 65
cf_modem_dial_prefix, cf_mode_default, // 66
cf_modem_dial_suffix, cf_modem_can_send_break, // 67
cf_modem_dial_response, cf_modem_dial_prefix, // 68
cf_modem_hangup_command, cf_modem_dial_suffix, // 69
cf_modem_port, cf_modem_dial_response, // 70
cf_modem_reset_command, cf_modem_hangup_command, // 71
cf_modem_stat_command, cf_modem_port, // 72
cf_nodelist, cf_modem_reset_command, // 73
cf_nodelist_directory, cf_modem_stat_command, // 74
cf_nodial_flag, cf_nodelist, // 75
cf_override, cf_nodelist_directory, // 76
cf_options, cf_nodial_flag, // 77
cf_outbound_directory, cf_override, // 78
cf_password, cf_options, // 79
cf_phone, cf_outbound_directory, // 80
cf_phone_translate, cf_password, // 81
cf_proto_order, cf_phone, // 82
cf_recode_file_in, cf_phone_translate, // 83
cf_recode_file_out, cf_proto_order, // 84
cf_recode_intro_in, cf_recode_file_in, // 85
cf_recv_buffer_size, cf_recode_file_out, // 86
cf_rescan_delay, cf_recode_intro_in, // 87
cf_run_after_handshake, cf_recv_buffer_size, // 88
cf_run_after_session, cf_rescan_delay, // 89
cf_run_before_session, cf_run_after_handshake, // 90
cf_session_limit_in, cf_run_after_session, // 91
cf_session_limit_out, cf_run_before_session, // 92
cf_skip_files_recv, cf_session_limit_in, // 93
cf_status_directory, cf_session_limit_out, // 94
cf_system_name, cf_skip_files_recv, // 95
cf_sysop_name, cf_status_directory, // 96
cf_uucp_lock_directory, cf_system_name, // 97
cf_wait_carrier_in, cf_sysop_name, // 98
cf_wait_carrier_out, cf_uucp_lock_directory, // 99
cf_zmodem_mincps_recv, cf_wait_carrier_in, // 100
cf_zmodem_mincps_send, cf_wait_carrier_out, // 101
cf_zmodem_send_dummy_pkt, cf_zmodem_mincps_recv, // 102
cf_zmodem_skip_by_pos, cf_zmodem_mincps_send, // 103
cf_zmodem_start_block_size, cf_zmodem_send_dummy_pkt, // 104
cf_zmodem_tx_window, cf_zmodem_skip_by_pos, // 105
cf_nomail_flag, cf_zmodem_start_block_size, // 106
cf_bind_ip, cf_zmodem_tx_window, // 107
cf_recieved_to_lower, cf_nomail_flag, // 108
cf_bind_ip, // 109
cf_recieved_to_lower, // 110
#ifdef USE_SYSLOG #ifdef USE_SYSLOG
cf_syslog_facility, cf_syslog_facility,
#endif #endif
#ifdef DEBUG #ifdef DEBUG
cf_debug_file, cf_debug_file, // 111
cf_debug_level, cf_debug_level, // 112
#endif #endif
cf_split_inbound, cf_split_inbound, // 113
#ifdef NETSPOOL #ifdef NETSPOOL
cf_netspool_host, cf_netspool_host,
cf_netspool_port, cf_netspool_port,
#endif #endif
cf_fidodnszone, cf_fidodnszone, // 114
BFORCE_NUMBER_OF_KEYWORDS BFORCE_NUMBER_OF_KEYWORDS
} bforce_config_keyword; } bforce_config_keyword;
+3 -3
View File
@@ -65,8 +65,8 @@ void log_setident(const char *ident);
int log_open(const char *logname, const char *ext, const char *tty); int log_open(const char *logname, const char *ext, const char *tty);
int log_close(void); int log_close(void);
int log_reopen(const char *logname, const char *ext, const char *tty); int log_reopen(const char *logname, const char *ext, const char *tty);
int log(const char *s, ...); void log(const char *s, ...);
int logerr(const char *s, ...); void logerr(const char *s, ...);
#ifdef DEBUG #ifdef DEBUG
//void debug_setlevel(long newlevel, bool logit); //void debug_setlevel(long newlevel, bool logit);
@@ -75,7 +75,7 @@ bool debug_isopened(void);
//int debug_parsestring(char *str, unsigned long *deblevel); //int debug_parsestring(char *str, unsigned long *deblevel);
int debug_open(); int debug_open();
int debug_close(); int debug_close();
int debug(unsigned long what, const char *str, ...); void debug(unsigned long what, const char *str, ...);
void debug_configure(); void debug_configure();
#endif #endif
+1
View File
@@ -44,6 +44,7 @@ typedef struct traffic {
int freqed_num; int freqed_num;
int freqed_time; int freqed_time;
size_t freqed_size; size_t freqed_size;
int ticfile_num;
} s_traffic; } s_traffic;
/* /*
+1 -1
View File
@@ -21,7 +21,7 @@
#define BF_VERSION RELEASE_VERSION #define BF_VERSION RELEASE_VERSION
#define BF_CDATE __DATE__ __TIME__ #define BF_CDATE __DATE__ __TIME__
#define BF_REG "free software" #define BF_REG "free software"
#define BF_COPYRIGHT "(c) 1997-2000 by Alexander Belkin" #define BF_COPYRIGHT "(c) 1997-2000 by Alexander Belkin, 2004-2025 fidonet members"
#define BF_BANNERVER BF_NAME" "BF_VERSION"/"BF_OS #define BF_BANNERVER BF_NAME" "BF_VERSION"/"BF_OS