diff options
| author | Dave Hibberd <hibby@debian.org> | 2025-11-11 21:50:49 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2025-11-11 21:50:49 +0000 |
| commit | 1338e2c0a4d701039eff82fa838a066b37206d39 (patch) | |
| tree | cf8c0b954381212d2a69d88c071657974b38884f /cMain.c | |
| parent | 8dc88bc8290ea7b72ebb2fb0042d4b200a089a8e (diff) | |
| parent | 85f200a46cf5e002e59e36b11ab4fba2f0422b33 (diff) | |
Update upstream source from tag 'upstream/6.0.25.11+repack'
Update to upstream version '6.0.25.11+repack'
with Debian dir 9c0f82ee4c630b5e6c5cc6a4d1e3093259cd7a60
Diffstat (limited to 'cMain.c')
| -rw-r--r-- | cMain.c | 66 |
1 files changed, 65 insertions, 1 deletions
@@ -38,6 +38,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses #include "cheaders.h"
#include "tncinfo.h"
#include "mqtt.h"
+#include "kiss.h"
VOID L2Routine(struct PORTCONTROL * PORT, PMESSAGE Buffer);
VOID ProcessIframe(struct _LINKTABLE * LINK, PDATAMESSAGE Buffer);
@@ -1017,6 +1018,7 @@ BOOL Start() PORT->INP3ONLY = PortRec->INP3ONLY;
PORT->ALLOWINP3 = PortRec->AllowINP3;
PORT->ENABLEINP3 = PortRec->EnableINP3;
+ PORT->isRF = PortRec->isRF;
PORT->PORTWINDOW = (UCHAR)PortRec->MAXFRAME;
@@ -2768,6 +2770,7 @@ VOID INITIALISEPORTS() {
char INITMSG[80];
struct PORTCONTROL * PORT = PORTTABLE;
+ struct PORTCONTROL * SAVEPORT;
while (PORT)
{
@@ -2775,7 +2778,68 @@ VOID INITIALISEPORTS() WritetoConsoleLocal(INITMSG);
PORT->PORTINITCODE(PORT);
- PORT = PORT->PORTPOINTER;
+ SAVEPORT=PORT;
+
+ // See if it is an RF port
+
+ if (PORT->isRF == -1) // Not set
+ {
+ // Try to determine if RF
+
+ if (PORT->PORTTYPE == 0)
+ {
+ struct KISSINFO * KISS = (struct KISSINFO *)PORT;
+ NPASYINFO Port;
+
+ if (KISS->FIRSTPORT && KISS->FIRSTPORT != KISS)
+ {
+ // Not first port on device
+
+ PORT = (struct PORTCONTROL *)KISS->FIRSTPORT;
+ }
+
+ Port = KISSInfo[PORT->PORTNUMBER];
+
+ if (Port)
+ {
+ // KISS like
+
+ if (PORT->PORTIPADDR.s_addr || PORT->KISSSLAVE)
+ {
+ // KISS over UDP or TCP
+
+ if (PORT->KISSTCP)
+ PORT->isRF = 1; // Assume TCP is RF (software modem)
+ else
+ PORT->isRF = 0; // Assuem UDP is Internet
+ }
+ else
+ PORT->isRF = 1; // Serial port
+ }
+ }
+ else if (PORT->PORTTYPE == 14) // Loopback
+ PORT->isRF = 0;
+
+ else if (PORT->PORTTYPE == 16) // External
+ {
+ if (PORT->PROTOCOL == 10) // 'HF' Port
+ {
+ struct TNCINFO * TNC = TNCInfo[PORT->PORTNUMBER];
+
+ if (TNC && TNC->Hardware == H_TELNET)
+ PORT->isRF = 0;
+ else
+ PORT->isRF = 1; // ARDOP etc
+ }
+ else
+ {
+ // External but not HF - AXIP, BPQETHER VKISS, ??
+
+ PORT->isRF = 0;
+ }
+ }
+ }
+ PORT = SAVEPORT->PORTPOINTER;
}
}
|
