Splitted TCP settings into IBN, IFC and ITN
This commit is contained in:
@@ -117,10 +117,10 @@ int binkp(int role)
|
||||
}
|
||||
|
||||
if (role) {
|
||||
if (localoptions & NOHOLD)
|
||||
// if (localoptions & NOHOLD)
|
||||
nonhold_mail = (char *)ALL_MAIL;
|
||||
else
|
||||
nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
// else
|
||||
// nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
} else {
|
||||
nonhold_mail = (char *)ALL_MAIL;
|
||||
}
|
||||
|
@@ -91,7 +91,7 @@ int portopen(faddr *addr)
|
||||
}
|
||||
}
|
||||
|
||||
WriteError("call.c portopen(): should not be here");
|
||||
WriteError("No call method available");
|
||||
return ST_PORTERR;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ int call(faddr *addr)
|
||||
* First see if this node can be reached over the internet and
|
||||
* that internet calls are allowed.
|
||||
*/
|
||||
if (nlent->iflags && ((localoptions & NOTCP) == 0)) {
|
||||
if (nlent->iflags && ((localoptions & NOIBN & NOITN & NOIFC) == 0)) {
|
||||
if (!inetaddr) {
|
||||
Syslog('d', "Trying to find IP address...");
|
||||
/*
|
||||
@@ -194,18 +194,20 @@ int call(faddr *addr)
|
||||
* from the nodelist. If it fails, fallback to dial.
|
||||
* Priority IBN, IFC, ITN.
|
||||
*/
|
||||
if (nlent->iflags & IP_IBN)
|
||||
if ((nlent->iflags & IP_IBN) && ((localoptions & NOIBN) == 0)) {
|
||||
tcp_mode = TCPMODE_IBN;
|
||||
else if (nlent->iflags & IP_IFC)
|
||||
Syslog('d', "TCP/IP mode set to IBN");
|
||||
} else if ((nlent->iflags & IP_IFC) && ((localoptions & NOIFC) == 0)) {
|
||||
tcp_mode = TCPMODE_IFC;
|
||||
else if (nlent->iflags & IP_ITN)
|
||||
Syslog('d', "TCP/IP mode set to IFC");
|
||||
} else if ((nlent->iflags & IP_ITN) && ((localoptions & NOITN) == 0)) {
|
||||
tcp_mode = TCPMODE_ITN;
|
||||
else {
|
||||
Syslog('d', "TCP/IP mode seto to ITN");
|
||||
} else {
|
||||
Syslog('+', "No common TCP/IP protocols for node %s", nlent->name);
|
||||
free(inetaddr);
|
||||
inetaddr = NULL;
|
||||
}
|
||||
Syslog('d', "TCP mode set to %d", tcp_mode);
|
||||
}
|
||||
} else {
|
||||
WriteError("No IP address, abort call");
|
||||
|
@@ -1,11 +1,10 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* File ..................: mbcico/dietifna.c
|
||||
* $Id$
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 01-Feb-2000
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2002
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@@ -87,10 +86,10 @@ int txdietifna(void)
|
||||
Syslog('+', "Start DietIFNA session");
|
||||
session_flags |= SESSION_IFNA;
|
||||
session_flags &= ~SESSION_BARK;
|
||||
if (localoptions & NOHOLD)
|
||||
// if (localoptions & NOHOLD)
|
||||
nonhold_mail = (char *)ALL_MAIL;
|
||||
else
|
||||
nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
// else
|
||||
// nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
tosend = create_filelist(remote, nonhold_mail, 2);
|
||||
|
||||
if ((rc = sendfiles(tosend)) == 0)
|
||||
|
@@ -77,8 +77,8 @@ int rx_emsi(char *data)
|
||||
Syslog('+', "Start inbound EMSI session");
|
||||
|
||||
emsi_local_lcodes = LCODE_RH1;
|
||||
if (localoptions & NOPUA)
|
||||
emsi_local_lcodes |= LCODE_PUP;
|
||||
// if (localoptions & NOPUA)
|
||||
// emsi_local_lcodes |= LCODE_PUP;
|
||||
emsi_remote_lcodes=0;
|
||||
|
||||
emsi_local_protos=LOCAL_PROTOS;
|
||||
@@ -90,7 +90,7 @@ int rx_emsi(char *data)
|
||||
emsi_local_protos &= ~PROT_JAN;
|
||||
if (localoptions & NOHYDRA)
|
||||
emsi_local_protos &= ~PROT_HYD;
|
||||
if ((localoptions & NOTCP) || ((session_flags & SESSION_TCP) == 0)) {
|
||||
if ((localoptions & NOITN) || (localoptions & NOIFC) || ((session_flags & SESSION_TCP) == 0)) {
|
||||
emsi_local_protos &= ~PROT_TCP;
|
||||
}
|
||||
|
||||
@@ -209,10 +209,10 @@ int tx_emsi(char *data)
|
||||
|
||||
Syslog('+', "Start outbound EMSI session");
|
||||
emsi_local_lcodes = LCODE_PUA | LCODE_RH1;
|
||||
if (localoptions & NOPUA) {
|
||||
emsi_local_lcodes |= LCODE_PUP;
|
||||
emsi_local_lcodes &= ~LCODE_PUA;
|
||||
}
|
||||
// if (localoptions & NOPUA) {
|
||||
// emsi_local_lcodes |= LCODE_PUP;
|
||||
// emsi_local_lcodes &= ~LCODE_PUA;
|
||||
// }
|
||||
emsi_remote_lcodes = 0;
|
||||
|
||||
emsi_local_protos=LOCAL_PROTOS;
|
||||
@@ -224,7 +224,7 @@ int tx_emsi(char *data)
|
||||
emsi_local_protos &= ~PROT_JAN;
|
||||
if (localoptions & NOHYDRA)
|
||||
emsi_local_protos &= ~PROT_HYD;
|
||||
if ((localoptions & NOTCP) || ((session_flags & SESSION_TCP) == 0)) {
|
||||
if ((localoptions & NOIFC) || (localoptions & NOITN) || ((session_flags & SESSION_TCP) == 0)) {
|
||||
emsi_local_protos &= ~PROT_TCP;
|
||||
}
|
||||
emsi_remote_protos=0;
|
||||
|
@@ -120,10 +120,10 @@ SM_EDECL
|
||||
char *nonhold_mail;
|
||||
int mailsent = FALSE, mailrcvd = FALSE;
|
||||
|
||||
if (localoptions & NOHOLD)
|
||||
// if (localoptions & NOHOLD)
|
||||
nonhold_mail = (char *)ALL_MAIL;
|
||||
else
|
||||
nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
// else
|
||||
// nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
tosend = create_filelist(remote,nonhold_mail,2);
|
||||
|
||||
Syslog('s', "txftsc SEND_MAIL");
|
||||
|
@@ -1615,10 +1615,10 @@ int hydra(int role)
|
||||
}
|
||||
|
||||
if (role) {
|
||||
if (localoptions & NOHOLD)
|
||||
// if (localoptions & NOHOLD)
|
||||
nonhold_mail = (char *)ALL_MAIL;
|
||||
else
|
||||
nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
// else
|
||||
// nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
} else {
|
||||
nonhold_mail = (char *)ALL_MAIL;
|
||||
}
|
||||
|
@@ -46,15 +46,15 @@ static struct _ktab {
|
||||
int flag;
|
||||
} ktab[] = {
|
||||
{(char *)"Call", NOCALL},
|
||||
{(char *)"Hold", NOHOLD},
|
||||
{(char *)"PUA", NOPUA},
|
||||
{(char *)"WaZOO", NOWAZOO},
|
||||
{(char *)"EMSI", NOEMSI},
|
||||
{(char *)"Freqs", NOFREQS},
|
||||
{(char *)"Zmodem", NOZMODEM},
|
||||
{(char *)"ZedZap", NOZEDZAP},
|
||||
{(char *)"Hydra", NOHYDRA},
|
||||
{(char *)"Tcp", NOTCP},
|
||||
{(char *)"IBN", NOIBN},
|
||||
{(char *)"ITN", NOITN},
|
||||
{(char *)"IFC", NOIFC},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
@@ -85,10 +85,6 @@ void rdoptions(int Loaded)
|
||||
localoptions |= NOFREQS;
|
||||
if (CFG.NoCall)
|
||||
localoptions |= NOCALL;
|
||||
if (CFG.NoHold)
|
||||
localoptions |= NOHOLD;
|
||||
if (CFG.NoPUA)
|
||||
localoptions |= NOPUA;
|
||||
if (CFG.NoEMSI)
|
||||
localoptions |= NOEMSI;
|
||||
if (CFG.NoWazoo)
|
||||
@@ -99,8 +95,12 @@ void rdoptions(int Loaded)
|
||||
localoptions |= NOZEDZAP;
|
||||
if (CFG.NoHydra)
|
||||
localoptions |= NOHYDRA;
|
||||
if (CFG.NoTCP)
|
||||
localoptions |= NOTCP;
|
||||
if (CFG.NoIBN)
|
||||
localoptions |= NOIBN;
|
||||
if (CFG.NoITN)
|
||||
localoptions |= NOITN;
|
||||
if (CFG.NoIFC)
|
||||
localoptions |= NOIFC;
|
||||
|
||||
if (nodes.Aka[0].zone == 0) {
|
||||
if (Loaded)
|
||||
@@ -119,18 +119,18 @@ void rdoptions(int Loaded)
|
||||
localoptions |= NOFREQS;
|
||||
if (nodes.NoCall)
|
||||
localoptions |= NOCALL;
|
||||
if (nodes.NoHold)
|
||||
localoptions |= NOHOLD;
|
||||
if (nodes.NoPUA)
|
||||
localoptions |= NOPUA;
|
||||
if (nodes.NoZmodem)
|
||||
localoptions |= NOZMODEM;
|
||||
if (nodes.NoZedzap)
|
||||
localoptions |= NOZEDZAP;
|
||||
if (nodes.NoHydra)
|
||||
localoptions |= NOHYDRA;
|
||||
if (nodes.NoTCP)
|
||||
localoptions |= NOTCP;
|
||||
if (nodes.NoIBN)
|
||||
localoptions |= NOIBN;
|
||||
if (nodes.NoITN)
|
||||
localoptions |= NOITN;
|
||||
if (nodes.NoIFC)
|
||||
localoptions |= NOIFC;
|
||||
|
||||
logoptions();
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef _SESSION_H
|
||||
#define _SESSION_H
|
||||
|
||||
@@ -29,7 +31,7 @@ typedef struct _file_list {
|
||||
|
||||
#define HOLD_MAIL "h"
|
||||
#define NONHOLD_MAIL "ico"
|
||||
#define ALL_MAIL "coh"
|
||||
#define ALL_MAIL "icoh"
|
||||
|
||||
extern int session_flags;
|
||||
extern int remote_flags;
|
||||
@@ -49,8 +51,8 @@ extern int remote_flags;
|
||||
|
||||
extern int localoptions;
|
||||
#define NOCALL 0x0001
|
||||
#define NOHOLD 0x0002
|
||||
#define NOPUA 0x0004
|
||||
// #define NOHOLD 0x0002
|
||||
// #define NOPUA 0x0004
|
||||
#define NOWAZOO 0x0008
|
||||
#define NOEMSI 0x0010
|
||||
#define NOFREQS 0x0020
|
||||
@@ -58,7 +60,9 @@ extern int localoptions;
|
||||
#define NOZEDZAP 0x0080
|
||||
#define NOJANUS 0x0100
|
||||
#define NOHYDRA 0x0200
|
||||
#define NOTCP 0x0400
|
||||
#define NOIBN 0x0400
|
||||
#define NOITN 0x0800
|
||||
#define NOIFC 0x1000
|
||||
|
||||
|
||||
struct _history history; /* History record for sessions */
|
||||
|
11
mbcico/tcp.c
11
mbcico/tcp.c
@@ -1,11 +1,10 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* File ..................: mbcico/tcp.c
|
||||
* $Id$
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 01-Feb-2000
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2002
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@@ -106,10 +105,10 @@ int txtcp(void)
|
||||
|
||||
Syslog('+', "Start TCP session");
|
||||
|
||||
if (localoptions & NOHOLD)
|
||||
// if (localoptions & NOHOLD)
|
||||
nonhold_mail = (char *)ALL_MAIL;
|
||||
else
|
||||
nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
// else
|
||||
// nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
if (emsi_remote_lcodes & LCODE_HAT) {
|
||||
Syslog('+', "Remote asked to \"hold all traffic\", no send");
|
||||
tosend=NULL;
|
||||
|
@@ -1,11 +1,10 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* File ..................: mbcico/wazoo.c
|
||||
* $Id$
|
||||
* Purpose ...............: Fidonet mailer
|
||||
* Last modification date : 01-Feb-2000
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2000
|
||||
* Copyright (C) 1997-2002
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10
|
||||
@@ -100,10 +99,10 @@ int txwazoo(void)
|
||||
char *nonhold_mail;
|
||||
|
||||
Syslog('+', "Start WaZOO session");
|
||||
if (localoptions & NOHOLD)
|
||||
// if (localoptions & NOHOLD)
|
||||
nonhold_mail = (char *)ALL_MAIL;
|
||||
else
|
||||
nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
// else
|
||||
// nonhold_mail = (char *)NONHOLD_MAIL;
|
||||
if (emsi_remote_lcodes & LCODE_HAT) {
|
||||
Syslog('+', "Remote asked to \"hold all traffic\", no send");
|
||||
tosend = NULL;
|
||||
|
Reference in New Issue
Block a user