summaryrefslogtreecommitdiff
path: root/BPQINP3.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2025-10-24 00:36:48 +0100
committerDave Hibberd <hibby@debian.org>2025-10-24 00:36:48 +0100
commit453f162d225b192d5da5a843633208f0307e6afc (patch)
tree2eeee6d228e16c3cff6ca0037d419962f15fe756 /BPQINP3.c
parent96ac3e4a36e5a0a9d86c10442ed747a8a910b40c (diff)
New upstream version 6.0.25.8+repackupstream/6.0.25.8+repack
Diffstat (limited to 'BPQINP3.c')
-rw-r--r--BPQINP3.c38
1 files changed, 28 insertions, 10 deletions
diff --git a/BPQINP3.c b/BPQINP3.c
index b1f79bc..872496b 100644
--- a/BPQINP3.c
+++ b/BPQINP3.c
@@ -42,11 +42,19 @@ extern int DEBUGINP3;
VOID SendNegativeInfo();
VOID SortRoutes(struct DEST_LIST * Dest);
VOID SendRTTMsg(struct ROUTE * Route);
+VOID TCPNETROMSend(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Frame);
static VOID SendNetFrame(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Frame)
{
// INP3 should only ever send over an active link, so just queue the message
-
+
+ if (Route->TCPPort) // NETROM over TCP
+ {
+ TCPNETROMSend(Route, Frame);
+ ReleaseBuffer(Frame);
+ return;
+ }
+
if (Route->NEIGHBOUR_LINK)
C_Q_ADD(&Route->NEIGHBOUR_LINK->TX_Q, Frame);
else
@@ -127,10 +135,11 @@ VOID TellINP3LinkGone(struct ROUTE * Route)
if (Route->NEIGHBOUR_LINK)
Debugprintf("BPQ32 Neighbour_Link not cleared");
+ // Link can have both NETROM and INP3 links
- if (Route->INP3Node == 0)
+// if (Route->INP3Node == 0)
DecayNETROMRoutes(Route);
- else
+// else
DeleteINP3Routes(Route);
}
@@ -882,9 +891,11 @@ VOID ProcessRTTMsg(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Buff, int Len
int Dummy;
char * ptr;
struct _RTTMSG * RTTMsg = (struct _RTTMSG *)&Buff->L4DATA[0];
-
char Normcall[10];
+ if (Route->NEIGHBOUR_LINK == 0)
+ return;
+
Normcall[ConvFromAX25(Route->NEIGHBOUR_LINK->LINKCALL, Normcall)] = 0;
// See if a reply to our message, or a new request
@@ -896,7 +907,7 @@ VOID ProcessRTTMsg(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Buff, int Len
return;
}
- if (Route->NEIGHBOUR_LINK->LINKPORT->ALLOWINP3 || Route->NEIGHBOUR_LINK->LINKPORT->ENABLEINP3)
+ if (Route->NEIGHBOUR_LINK->LINKPORT && (Route->NEIGHBOUR_LINK->LINKPORT->ALLOWINP3 || Route->NEIGHBOUR_LINK->LINKPORT->ENABLEINP3))
Route->INP3Node = 1;
if (Route->INP3Node == 0)
@@ -1168,11 +1179,16 @@ int SendRIPTimer()
// Delay more if Locked - they could be retrying for a long time
- if ((Route->NEIGHBOUR_FLAG)) // LOCKED ROUTE
- INP3Delay = 1200;
+ if (Route->ConnectionAttempts < 5)
+ INP3Delay = 30;
else
- INP3Delay = 600;
-
+ {
+ if ((Route->NEIGHBOUR_FLAG)) // LOCKED ROUTE
+ INP3Delay = 300;
+ else
+ INP3Delay = 120;
+ }
+
if (Route->LastConnectAttempt && (REALTIMETICKS - Route->LastConnectAttempt) < INP3Delay)
{
Route++;
@@ -1181,6 +1197,8 @@ int SendRIPTimer()
// Try to activate link
+ Route->ConnectionAttempts++;
+
if (Route->INP3Node)
{
Normcall[ConvFromAX25(Route->NEIGHBOUR_CALL, Normcall)] = 0;
@@ -1618,7 +1636,7 @@ VOID INP3TIMER()
}
-UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, unsigned int msglen)
+UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, int msglen)
{
char call[10];
int calllen;