summaryrefslogtreecommitdiff
path: root/Cmd.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2025-11-09 22:34:20 +0000
committerDave Hibberd <hibby@debian.org>2025-11-09 22:34:20 +0000
commit367ab8fb01191ec54c91810b1896c41fdf7de911 (patch)
tree8f9ac2b818ebb923b47fce00b28eb127556d96fb /Cmd.c
parent7c796758d1b65d4d7585c90ba71b1fb339a4d283 (diff)
New upstream version 6.0.25.9+repack
Diffstat (limited to 'Cmd.c')
-rw-r--r--Cmd.c421
1 files changed, 396 insertions, 25 deletions
diff --git a/Cmd.c b/Cmd.c
index 70a061e..d532a1e 100644
--- a/Cmd.c
+++ b/Cmd.c
@@ -17,9 +17,7 @@ You should have received a copy of the GNU General Public License
along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
*/
-//
-// C replacement for cmd.asm
-//
+
#define Kernel
#define _CRT_SECURE_NO_DEPRECATE
@@ -44,8 +42,6 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
#include "tncinfo.h"
#include "telnetserver.h"
-
-
//#include "GetVersion.h"
//#define DllImport __declspec( dllimport )
@@ -73,7 +69,8 @@ int seeifInterlockneeded(struct PORTCONTROL * PORT);
int CompareNode(const void *a, const void *b);
int CompareAlias(const void *a, const void *b);
int CompareRoutes(const void * a, const void * b);
-
+void SendVARANetromNodes(struct TNCINFO * TNC, MESSAGE *Buffer);
+VOID DoNetromConnect(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIST * Dest, BOOL Spy, int Service);
extern VOID KISSTX(struct KISSINFO * KISS, PMESSAGE Buffer);
@@ -86,6 +83,7 @@ UCHAR SAVEDAPPLFLAGS = 0;
UCHAR ALIASINVOKED = 0;
+extern int MONTOFILEFLAG;
VOID * CMDPTR = 0;
@@ -132,6 +130,8 @@ int NOBUFFCOUNT = 0;
int BUFFERWAITS = 0;
int MAXDESTS = 0;
int NUMBEROFNODES = 0;
+int L2CONNECTSOUT = 0;
+int L2CONNECTSIN = 0;
int L4CONNECTSOUT = 0;
int L4CONNECTSIN = 0;
int L4FRAMESTX = 0;
@@ -155,13 +155,15 @@ char * ALIASPTR = &CMDALIAS[0][0];
extern int RigReconfigFlag;
+extern int DEBUGINP3;
+extern int PREFERINP3ROUTES;
struct CMDX COMMANDS[];
int CMDXLEN = sizeof (struct CMDX);
-VOID SENDNODESMSG();
+VOID SENDNODESMSG(int Portnum);
VOID KISSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
VOID STOPCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
VOID STARTCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
@@ -187,6 +189,54 @@ VOID QTSMCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct
void hookL2SessionAttempt(int Port, char * fromCall, char * toCall, struct _LINKTABLE * LINK);
+/* Paula's NetROMX includes a service number in a CREQX message which allows a node to host lots of applications without
+ filling the Nodes table with SSID's
+
+I could make these (or some of them) BPQ Commands but some will clash (eg INFO) or match an existing APPL (eg BBS)
+
+I could use C APPL@CALL for an extended call to a node
+
+Maybe I can detect APPL NODE so Paula's syntax will work
+
+or both??
+
+Standard Services are:
+*/
+
+struct NETROMX SERVICES[] = {
+ {0, "CMD"}, // Normal connection to Node's command line
+ {1, "INFO"}, // Standard Information server
+ {2, "PMS"}, // Personal Message System
+ {3, "BBS"}, // (reserved for Bulletin Board System)
+ {4, "DX"}, // (reserved for DX cluster/dx-spot feed)
+ {5, "TPP"}, // (reserved for "Tampa Ping-Pong" chat)
+ {7, "ECHO"}, // Echoes data back to sender
+ {8, "XRCHAT"}, // XRChat server
+ {9, "DISCARD"}, // Data sink
+ {10, "RMS"}, // (reserved for winlink RMS}
+ {11, "CHAT"}, // (reserved for BPQ chat server)
+ {13, "DAYTIME"}, // Local date/time (similar to RFC867)
+ {14, "APRS"}, // APRS Server
+ {15, "CUSTINF"},// (reserved for custom information file server)
+ {16, "WX"}, // Local weather information
+ {17, "TELEM"}, // (reserved for Telemetry server)
+ {18, "SMS"}, // Short Message System server
+ {19, "CHARGEN"},// Generates a test pattern
+ {20, "NDATA"}, // (reserved for NFTP extension)
+ {21, "NFTP"}, // Netrom File Transfer Protocol
+ {22, "NSSH"}, // (reserved for secure login - if legal?)
+ {23, "TELNET"}, // Normal L4 login (same as 0)
+ {25, "SMTP"}, // (reserved for Simple Mail Transfer Protocol)
+ {26, "MHEARD"}, // MHEARD server (shows MH lists)
+ {27, "DXLIST"}, // DX List server (shows DX lists)
+ {79, "FINGER"}, // Finger server
+ {80, "HTTP"}, // NetromWeb (HTTP over Netrom) server
+ {87, "NTTY"}, // Netrom TTY - Keyboard to keyboard chat
+ {1883, "MQTT"} // MQTT server
+};
+
+int NUMBEROFSSERVICES = sizeof(SERVICES)/sizeof(struct NETROMX);
+
char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char * format, ...)
{
@@ -249,10 +299,81 @@ char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char
return Bufferptr + MsgLen;
}
+VOID POLLNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
+{
+ int Portnum = atoi(CmdTail);
+ struct PORTCONTROL * PORT = 0;
+ MESSAGE * Buffer;
+ UCHAR * ptr1;
+
+ if (Portnum)
+ PORT = GetPortTableEntryFromPortNum(Portnum);
+
+ if (Portnum == 0 || PORT == 0)
+ {
+ Bufferptr = Cmdprintf(Session, Bufferptr, "Invalid Port\r");
+ SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
+ return;
+ }
+
+ if (PORT->PORTQUALITY == 0 || PORT->INP3ONLY)
+ {
+ Bufferptr = Cmdprintf(Session, Bufferptr, "Quality = 0 or INP3 Port\r");
+ SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
+ return;
+ }
+ Buffer = GetBuff();
+
+ if (Buffer == 0)
+ return;
+
+ Buffer->PORT = Portnum;
+
+ memcpy(Buffer->ORIGIN, NETROMCALL, 7);
+ memcpy(Buffer->DEST, NODECALL, 7);
+
+ Buffer->ORIGIN[6] |= 0x61; // SET CMD END AND RESERVED BITS
+
+ Buffer->CTL = UI;
+ Buffer->PID = 0xCF; // Netrom
+
+ ptr1 = &Buffer->L2DATA[0];
+
+ *(ptr1++) = 0xfe; // Nodes Poll Flag
+
+ memcpy(ptr1, MYALIASTEXT, 6);
+
+ ptr1+= 6;
+
+ Buffer->LENGTH = (int)(ptr1 - (UCHAR *)Buffer);
+ if (PORT->TNC && PORT->TNC->Hardware == H_VARA)
+ SendVARANetromNodes(PORT->TNC, Buffer);
+ else
+ PUT_ON_PORT_Q(PORT, Buffer);
+
+ strcpy(Bufferptr, OKMSG);
+ Bufferptr += (int)strlen(OKMSG);
+
+ SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
+}
VOID SENDNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
{
- SENDNODESMSG();
+ int Portnum = atoi(CmdTail);
+ struct PORTCONTROL * PORT;
+
+ if (Portnum)
+ {
+ PORT = GetPortTableEntryFromPortNum(Portnum);
+ if (PORT == 0)
+ {
+ Bufferptr = Cmdprintf(Session, Bufferptr, "Invalid Port\r");
+ SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
+ return;
+ }
+ }
+
+ SENDNODESMSG(Portnum);
strcpy(Bufferptr, OKMSG);
Bufferptr += (int)strlen(OKMSG);
@@ -717,6 +838,108 @@ BOOL cATTACHTOBBS(TRANSPORTENTRY * Session, UINT Mask, int Paclen, int * AnySess
return FALSE;
}
+void ConnecttoService(TRANSPORTENTRY * Session, char * Bufferptr, int ServiceIndex, char * Node, int Stay)
+{
+ struct DEST_LIST * Dest = DESTS;
+ int n = MAXDESTS;
+ int gotDest = 0;
+ unsigned char axcall[7];
+ int Service = -1;
+
+ // Make Sure Node is Known
+
+ strcat(Node, " "); // Node table has 6 byte Aliases
+
+ while (n--)
+ {
+ if (memcmp(Dest->DEST_ALIAS, Node, 6) == 0)
+ {
+ gotDest = 1;
+ break;
+ }
+ Dest++;
+ }
+
+ if (gotDest == 0)
+ {
+ Dest = DESTS;
+ n = MAXDESTS;
+
+ ConvToAX25(Node, axcall);
+
+ while (n--)
+ {
+ if (CompareCalls(Dest->DEST_CALL, axcall))
+ {
+ gotDest = 1;
+ break;
+ }
+ Dest++;
+ }
+ }
+
+ strlop(Node, ' ');
+
+ if (gotDest == 0)
+ {
+ Bufferptr = Cmdprintf(Session, Bufferptr, "Node %s not found\r", Node);
+ SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
+ return;
+ }
+
+ Session->STAYFLAG = Stay;
+
+ Service = SERVICES[ServiceIndex].ServiceNo;
+
+ Bufferptr = Cmdprintf(Session, Bufferptr, "Connecting to Service %s on Node %s \r", SERVICES[ServiceIndex].ServiceName, Node);
+
+ DoNetromConnect(Session, Bufferptr, Dest, 0, Service);
+
+ SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
+}
+
+int checkifService(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
+{
+ char APPName[13];
+ int n = 12;
+ BOOL Stay = FALSE;
+ char * ptr, *Context;
+ int i;
+ char TailCopy[256];
+
+ strcpy(TailCopy, CmdTail);
+
+
+ ptr = strtok_s(TailCopy, " ", &Context);
+
+ // see if any param. if longer than two chars treat as remote node
+
+ if (ptr == 0 || strlen(ptr) < 3)
+ return 0;
+
+ memcpy(APPName, CMD->String, 13);
+
+ strlop(APPName, ' ');
+
+ if (Context && Context[0] == 'S')
+ Session->STAYFLAG = Stay;
+
+ // See if APPL is one of Paula's service
+
+ for (i = 0; i < NUMBEROFSSERVICES; i++)
+ {
+ if (strcmp(APPName, SERVICES[i].ServiceName) == 0)
+ {
+ ConnecttoService(Session, Bufferptr, i, ptr, Stay);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+
+
VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
{
BOOL CONFAILED = 0;
@@ -725,6 +948,7 @@ VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct
char * ptr1, *ptr2;
int n = 12;
BOOL Stay = FALSE;
+ char * ptr, *Context;
// Copy Appl and Null Terminate
@@ -743,12 +967,43 @@ VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct
return;
}
+ ptr = strtok_s(CmdTail, " ", &Context);
- if (CmdTail[0] == 'S')
- Stay = TRUE;
-
- Session->STAYFLAG = Stay;
+ // ptr is first param. Context is rest of string;
+ if (ptr)
+ {
+ // could be Node for NETROMX connect or S flag
+
+ int i;
+
+ if (strlen(ptr) > 1)
+ {
+ if (Context && Context[0] == 'S')
+ Session->STAYFLAG = Stay;
+
+ // See if APPL is one of Paula's service
+
+ for (i = 0; i < NUMBEROFSSERVICES; i++)
+ {
+ if (strcmp(APPName, SERVICES[i].ServiceName) == 0)
+ {
+ ConnecttoService(Session, Bufferptr, i, ptr, Stay);
+ return;
+ }
+ }
+
+ // Not a service that can be accessed remotely
+
+ Bufferptr = Cmdprintf(Session, Bufferptr, "Connection to %s on a remote node is not possible\r", APPName);
+ SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
+ return;
+ }
+
+ else if (ptr[0] == 'S')
+ Session->STAYFLAG = Stay;
+ }
+
memcpy(Session->APPL, CMD->String, 12);
// SEE IF THERE IS AN ALIAS DEFINDED FOR THIS COMMAND
@@ -830,6 +1085,9 @@ VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct
VOID CMDI00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
{
+ if (checkifService(Session, Bufferptr, CmdTail, CMD)) // See can be used remotely
+ return;
+
Bufferptr = Cmdprintf(Session, Bufferptr, "%s", INFOMSG);
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
}
@@ -1300,6 +1558,17 @@ VOID CMDL00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct C
else
Bufferptr = Cmdprintf(Session, Bufferptr, " S=%d P=%d T=%d V=%d Q=%d\r",
LINK->L2STATE, LINK->LINKPORT->PORTNUMBER, LINK->LINKTYPE, 2 - LINK->VER1FLAG, Count);
+
+ if (Count > 16 || LINK->LINKWINDOW == 0)
+ {
+ // Dump Link State
+
+ int secs = time(NULL) - LINK->LASTFRAMESENT;
+
+ Bufferptr = Cmdprintf(Session, Bufferptr, " Debug Info: LINK->LINKNS %d LINK->LINKOWS %d SDTSLOT %d LINKWINDOW %d L2FLAGS %d\r", LINK->LINKNS, LINK->LINKOWS, LINK->SDTSLOT, LINK->LINKWINDOW, LINK->L2FLAGS);
+ Bufferptr = Cmdprintf(Session, Bufferptr, " Debug Info: Slots %x %x %x %x %x %x %x %x\r", LINK->FRAMES[0], LINK->FRAMES[1], LINK->FRAMES[2], LINK->FRAMES[3],
+ LINK->FRAMES[4], LINK->FRAMES[5], LINK->FRAMES[6], LINK->FRAMES[7]);
+ }
}
LINK++;
}
@@ -1622,8 +1891,8 @@ char * DisplayRoute(TRANSPORTENTRY * Session, char * Bufferptr, struct ROUTE *
if (Routes->INP3Node) // INP3 Enabled?
{
- double srtt = Routes->SRTT/1000.0;
- double nsrtt = Routes->NeighbourSRTT/1000.0;
+ double srtt = Routes->SRTT/100.0;
+ double nsrtt = Routes->NeighbourSRTT/100.0;
Bufferptr = Cmdprintf(Session, Bufferptr, " %4.2fs %4.2fs", srtt, nsrtt);
}
@@ -2144,7 +2413,7 @@ TRANSPORTENTRY * SetupNewSession(TRANSPORTENTRY * Session, char * Bufferptr)
}
-VOID DoNetromConnect(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIST * Dest, BOOL Spy)
+VOID DoNetromConnect(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIST * Dest, BOOL Spy, int Service)
{
TRANSPORTENTRY * NewSess;
@@ -2153,6 +2422,8 @@ VOID DoNetromConnect(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIS
if (NewSess == NULL)
return; // Tables Full
+ NewSess->Service = Service;
+
NewSess->L4CIRCUITTYPE = SESSION + DOWNLINK;
NewSess->L4TARGET.DEST = Dest;
@@ -2160,15 +2431,41 @@ VOID DoNetromConnect(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIS
NewSess->SPYFLAG = Spy;
- ReleaseBuffer((UINT *)REPLYBUFFER);
+ if (Service == -1)
+ ReleaseBuffer((UINT *)REPLYBUFFER);
- SENDL4CONNECT(NewSess);
+ SENDL4CONNECT(NewSess, Service);
L4CONNECTSOUT++;
-
return;
}
+BOOL CheckLink(UCHAR * LinkCall, UCHAR * OurCall, int Port)
+{
+ // Check if a link exists betwwn a pair of calls on a port. Return TRUE if found
+
+ struct _LINKTABLE * LINK = LINKS;
+ int n = MAXLINKS;
+
+ while (n--)
+ {
+ if (LINK->LINKCALL[0] == 0) // Spare
+ {
+ LINK++;
+ continue;
+ }
+
+ if ((LINK->LINKPORT->PORTNUMBER == Port) && CompareCalls(LINK->LINKCALL, LinkCall) && CompareCalls(LINK->OURCALL, OurCall))
+ return TRUE;
+
+ LINK++;
+ }
+
+ // ENTRY NOT FOUND
+
+ return FALSE;
+}
+
BOOL FindLink(UCHAR * LinkCall, UCHAR * OurCall, int Port, struct _LINKTABLE ** REQLINK)
{
struct _LINKTABLE * LINK = LINKS;
@@ -2194,6 +2491,7 @@ BOOL FindLink(UCHAR * LinkCall, UCHAR * OurCall, int Port, struct _LINKTABLE **
LINK++;
}
+
// ENTRY NOT FOUND - FIRSTSPARE HAS FIRST FREE ENTRY, OR ZERO IF TABLE FULL
*REQLINK = FIRSTSPARE;
@@ -2224,6 +2522,9 @@ VOID CMDC00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct C
char PortString[10];
char cmdCopy[256];
struct _EXTPORTDATA * EXTPORT = (struct _EXTPORTDATA *)PORT;
+ int Service = -1;
+ int haveService = 0;
+ int i = 0;
#ifdef EXCLUDEBITS
@@ -2370,6 +2671,7 @@ NoPort:
// SEE IF CALL TO ANY OF OUR HOST SESSIONS - UNLESS DIGIS SPECIFIED
+// if (axcalls[7] == 0 && axcalls[9])
if (axcalls[7] == 0)
{
// If this connect is as a result of a command alias, don't check appls or we will loop
@@ -2388,6 +2690,9 @@ NoPort:
// Convert to an APPL command, so any alias is actioned
+ memcpy(Session->APPL,APPL->APPLCMD, 12);
+
+
// SEE IF THERE IS AN ALIAS DEFINDED FOR THIS COMMAND
if (APPL->APPLHASALIAS && APPL->APPLALIASVAL[0] != 0x20)
@@ -2418,9 +2723,35 @@ NoPort:
}
}
- if (axcalls[7] == 0)
+ // if no digis see if connect to known node.
+
+ // But now could have a single numeric param as a service number (Paula's Netromx)
+ // cmdCopy is command tail (after call)
+
+ // Make sure field is numeric
+
+ if (cmdCopy[0] != ' ')
{
- // SEE IF CALL TO ANOTHER NODE
+ i = 0;
+
+ while (cmdCopy[i] >= '0' && cmdCopy[i]<= '9')
+ i++;
+
+ if (cmdCopy[i] != ' ')
+ goto Downlink;
+ else
+ {
+ if (i > 0) // Some digits
+ {
+ haveService = 1;
+ Service = atoi(cmdCopy);
+ }
+ }
+ }
+
+ if (axcalls[7] == 0 || haveService)
+ {
+ // SEE IF CALL TO ANOTHER NODE
struct DEST_LIST * Dest = DESTS;
int n = MAXDESTS;
@@ -2431,7 +2762,7 @@ NoPort:
{
if (memcmp(Dest->DEST_ALIAS, TextCall, 6) == 0)
{
- DoNetromConnect(Session, Bufferptr, Dest, Spy);
+ DoNetromConnect(Session, Bufferptr, Dest, Spy, Service);
return;
}
Dest++;
@@ -2445,7 +2776,7 @@ NoPort:
{
if (CompareCalls(Dest->DEST_CALL, axcalls))
{
- DoNetromConnect(Session, Bufferptr, Dest, Spy);
+ DoNetromConnect(Session, Bufferptr, Dest, Spy, Service);
return;
}
Dest++;
@@ -2939,7 +3270,7 @@ char * DoOneNode(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIST *
if (Neighbour)
{
- double srtt = Route->SRTT/1000.0;
+ double srtt = Route->SRTT/100.0;
len = ConvFromAX25(Neighbour->NEIGHBOUR_CALL, Normcall);
Normcall[len] = 0;
@@ -2988,7 +3319,7 @@ int DoINP3ViaEntry(struct DEST_LIST * Dest, int n, char * line, int cursor)
if (Dest->INP3ROUTE[n].ROUT_NEIGHBOUR != 0)
{
- srtt = Dest->INP3ROUTE[n].SRTT/1000.0;
+ srtt = Dest->INP3ROUTE[n].SRTT/100.0;
len=ConvFromAX25(Dest->INP3ROUTE[n].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Portcall);
Portcall[len]=0;
@@ -3608,6 +3939,8 @@ VOID MHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CM
int len;
char Digi = 0;
+ if (checkifService(Session, Bufferptr, CmdTail, CMD)) // See can be used remotely
+ return;
// Note that the MHDIGIS field may contain rubbish. You have to check End of Address bit to find
// how many digis there are
@@ -4258,6 +4591,7 @@ struct CMDX COMMANDS[] =
"RIGRECONFIG ",8, &RIGRECONFIG, 0,
"RESTART ",7, &RESTART,0,
"RESTARTTNC ",10,&RESTARTTNC,0,
+ "POLLNODES ",8, &POLLNODES,0,
"SENDNODES ",8, &SENDNODES,0,
"EXTRESTART ",10, EXTPORTVAL, offsetof(EXTPORTDATA, EXTRESTART),
"TXDELAY ",3, PORTVAL, offsetof(PORTCONTROLX, PORTTXDELAY),
@@ -4275,6 +4609,10 @@ struct CMDX COMMANDS[] =
"MAXUSERS ",4,PORTVAL, offsetof(PORTCONTROLX, USERS),
"L3ONLY ",6,PORTVAL, offsetof(PORTCONTROLX, PORTL3FLAG),
"BBSALIAS ",4,PORTVAL, offsetof(PORTCONTROLX, PORTBBSFLAG),
+ "INP3ONLY ",8,PORTVAL, offsetof(PORTCONTROLX, INP3ONLY),
+ "ALLOWINP3 ",9,PORTVAL, offsetof(PORTCONTROLX, ALLOWINP3),
+ "ENABLEINP3 ",10,PORTVAL, offsetof(PORTCONTROLX, ENABLEINP3),
+ "MONTOFILE ",9,SWITCHVAL,(size_t)&MONTOFILEFLAG,
"VALIDCALLS ",5,VALNODES,0,
"WL2KSYSOP ",5,WL2KSYSOP,0,
"STOPPORT ",4,STOPPORT,0,
@@ -4286,6 +4624,7 @@ struct CMDX COMMANDS[] =
"KISS ",4,KISSCMD,0,
"GETPORTCTEXT",9,GetPortCTEXT, 0,
+
#ifdef EXCLUDEBITS
"EXCLUDE ",4,ListExcludedCalls,0,
@@ -4310,6 +4649,11 @@ struct CMDX COMMANDS[] =
"L4DELAY ",7,SWITCHVAL,(size_t)&L4DELAY,
"L4WINDOW ",6,SWITCHVAL,(size_t)&L4DEFAULTWINDOW,
"BTINTERVAL ",5,SWITCHVAL,(size_t)&BTINTERVAL,
+ "DEBUGINP3 ",8,SWITCHVAL,(size_t)&DEBUGINP3,
+ "MAXHOPS ",7,SWITCHVAL,(size_t)&MaxHops,
+ "PREFERINP3 ",10,SWITCHVAL,(size_t)&PREFERINP3ROUTES,
+ "MAXRTT ",6,SWITCHVALW,(size_t)&MAXRTT,
+ "MAXTT ",6,SWITCHVALW,(size_t)&MAXRTT,
"PASSWORD ", 8, PWDCMD, 0,
"************", 12, APPLCMD, 0,
@@ -4343,7 +4687,7 @@ struct CMDX COMMANDS[] =
"************", 12, APPLCMD, 0,
"************", 12, APPLCMD, 0,
"************", 12, APPLCMD, 0,
- "************", 12, APPLCMD, 0, // Apppl 32 is internal Terminal
+ "************", 12, APPLCMD, 0, // Apppl 32 is internal Terminal on Windows
"*** LINKED ",10,LINKCMD,0,
"CQ ",2,CQCMD,0,
"CONNECT ",1,CMDC00,0,
@@ -4736,6 +5080,8 @@ VOID DoTheCommand(TRANSPORTENTRY * Session)
struct DATAMESSAGE * Buffer = REPLYBUFFER;
char * ptr1, * ptr2;
int n;
+ int i, Service = -1;
+ char * Cmd, *Node, *Context;
ptr1 = &COMMANDBUFFER[0]; //
@@ -4827,6 +5173,31 @@ VOID DoTheCommand(TRANSPORTENTRY * Session)
CMD++;
}
+
+ // See if a NETROMX Service
+
+ Cmd = strtok_s(ptr1, " ", &Context);
+ Node = strtok_s(NULL, " ", &Context);
+
+ for (i = 0; i < NUMBEROFSSERVICES; i++)
+ {
+ if (strcmp(Cmd, SERVICES[i].ServiceName) == 0)
+ {
+ int Stay = 0;
+
+ if (Context && Context[0] == 'S')
+ Session->STAYFLAG = Stay;
+
+ if (Node)
+ {
+ ConnecttoService(Session, ReplyPointer, i, Node, Stay);
+ return;
+ }
+
+ // Connecting to service on local node - msy be possible sometime
+ }
+ }
+
Session->BADCOMMANDS++;
if (Session->BADCOMMANDS > 6) // TOO MANY ERRORS