Compare commits
No commits in common. "hibbian/latest" and "upstream/6.0.25.1+repack" have entirely different histories.
hibbian/la
...
upstream/6
|
@ -509,14 +509,6 @@ UCHAR * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen, int DoNo
|
||||||
return Output;
|
return Output;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ADJBUFFER->L2DATA[0] == 0xfe) // Paula's Nodes Poll
|
|
||||||
{
|
|
||||||
memcpy(Alias, ++ptr, 6);
|
|
||||||
Output += sprintf((char *)Output, " NODES POLL from %s\r", Alias);
|
|
||||||
return Output;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Display normal NET/ROM transmissions
|
// Display normal NET/ROM transmissions
|
||||||
|
|
||||||
Output += sprintf((char *)Output, " NET/ROM\r ");
|
Output += sprintf((char *)Output, " NET/ROM\r ");
|
||||||
|
|
12
ARDOP.c
12
ARDOP.c
|
@ -567,7 +567,7 @@ static int ProcessLine(char * buf, int Port)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ARDOPThread(VOID * Param);
|
void ARDOPThread(struct TNCINFO * TNC);
|
||||||
VOID ARDOPProcessDataSocketData(int port);
|
VOID ARDOPProcessDataSocketData(int port);
|
||||||
int ConnecttoARDOP(struct TNCINFO * TNC);
|
int ConnecttoARDOP(struct TNCINFO * TNC);
|
||||||
static VOID ARDOPProcessReceivedData(struct TNCINFO * TNC);
|
static VOID ARDOPProcessReceivedData(struct TNCINFO * TNC);
|
||||||
|
@ -2312,13 +2312,12 @@ int ConnecttoARDOP(struct TNCINFO * TNC)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID ARDOPThread(VOID * Param)
|
VOID ARDOPThread(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
// Opens sockets and looks for data on control and data sockets.
|
// Opens sockets and looks for data on control and data sockets.
|
||||||
|
|
||||||
// Socket may be TCP/IP or Serial
|
// Socket may be TCP/IP or Serial
|
||||||
|
|
||||||
struct TNCINFO * TNC = (struct TNCINFO *) Param;
|
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
int err, i, ret;
|
int err, i, ret;
|
||||||
u_long param=1;
|
u_long param=1;
|
||||||
|
@ -5759,7 +5758,8 @@ VOID ARDOPSCSPoll(struct TNCINFO * TNC)
|
||||||
|
|
||||||
// Probably only for Teensy with ESP01. Runs SCS Emulator over a TCP Link
|
// Probably only for Teensy with ESP01. Runs SCS Emulator over a TCP Link
|
||||||
|
|
||||||
VOID SerialConnecttoTCPThread(VOID * Param);
|
|
||||||
|
VOID SerialConnecttoTCPThread(struct TNCINFO * TNC);
|
||||||
|
|
||||||
int SerialConnecttoTCP(struct TNCINFO * TNC)
|
int SerialConnecttoTCP(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
|
@ -5767,9 +5767,9 @@ int SerialConnecttoTCP(struct TNCINFO * TNC)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
VOID SerialConnecttoTCPThread(VOID * Param)
|
|
||||||
|
VOID SerialConnecttoTCPThread(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
struct TNCINFO * TNC = (struct TNCINFO *) Param;
|
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
int i;
|
int i;
|
||||||
u_long param = 1;
|
u_long param = 1;
|
||||||
|
|
268
BPQINP3.c
268
BPQINP3.c
|
@ -35,9 +35,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
//#include "vmm.h"
|
//#include "vmm.h"
|
||||||
|
|
||||||
uint64_t INP3timeLoadedMS = 0;
|
uint64_t timeLoadedMS = 0;
|
||||||
|
|
||||||
extern int DEBUGINP3;
|
|
||||||
|
|
||||||
VOID SendNegativeInfo();
|
VOID SendNegativeInfo();
|
||||||
VOID SortRoutes(struct DEST_LIST * Dest);
|
VOID SortRoutes(struct DEST_LIST * Dest);
|
||||||
|
@ -64,8 +62,8 @@ typedef struct _RTTMSG
|
||||||
UCHAR ALIAS[7];
|
UCHAR ALIAS[7];
|
||||||
UCHAR VERSION[12];
|
UCHAR VERSION[12];
|
||||||
UCHAR SWVERSION[9];
|
UCHAR SWVERSION[9];
|
||||||
UCHAR FLAGS[20];
|
UCHAR FLAGS[10];
|
||||||
UCHAR PADDING[137];
|
UCHAR PADDING[147];
|
||||||
|
|
||||||
} RTTMSG;
|
} RTTMSG;
|
||||||
|
|
||||||
|
@ -104,14 +102,14 @@ int RTTTimeout = 6; // 1 Min (Horizon is 1 min)
|
||||||
|
|
||||||
VOID InitialiseRTT()
|
VOID InitialiseRTT()
|
||||||
{
|
{
|
||||||
UCHAR temp[256] = "";
|
UCHAR temp[sizeof(RTTMsg.FLAGS) + 4];
|
||||||
|
|
||||||
memset(&RTTMsg, ' ', sizeof(struct _RTTMSG));
|
memset(&RTTMsg, ' ', sizeof(struct _RTTMSG));
|
||||||
memcpy(RTTMsg.ID, "L3RTT: ", 7);
|
memcpy(RTTMsg.ID, "L3RTT: ", 7);
|
||||||
memcpy(RTTMsg.VERSION, "LEVEL3_V2.1 ", 12);
|
memcpy(RTTMsg.VERSION, "LEVEL3_V2.1 ", 12);
|
||||||
memcpy(RTTMsg.SWVERSION, "BPQ32002 ", 9);
|
memcpy(RTTMsg.SWVERSION, "BPQ32001 ", 9);
|
||||||
_snprintf(temp, sizeof(temp), "$M%d $N $H%d ", MAXRTT, MaxHops); // trailing spaces extend to ensure padding if the length of characters for MAXRTT changes.
|
_snprintf(temp, sizeof(temp), "$M%d $N ", MAXRTT); // trailing spaces extend to ensure padding if the length of characters for MAXRTT changes.
|
||||||
memcpy(RTTMsg.FLAGS, temp, 20); // But still limit the actual characters copied.
|
memcpy(RTTMsg.FLAGS, temp, 10); // But still limit the actual characters copied.
|
||||||
memcpy(RTTMsg.ALIAS, &MYALIASTEXT, 6);
|
memcpy(RTTMsg.ALIAS, &MYALIASTEXT, 6);
|
||||||
RTTMsg.ALIAS[6] = ' ';
|
RTTMsg.ALIAS[6] = ' ';
|
||||||
}
|
}
|
||||||
|
@ -143,7 +141,7 @@ VOID DeleteINP3Routes(struct ROUTE * Route)
|
||||||
|
|
||||||
Call1[ConvFromAX25(Route->NEIGHBOUR_CALL, Call1)] = 0;
|
Call1[ConvFromAX25(Route->NEIGHBOUR_CALL, Call1)] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("Deleting INP3 routes via %s", Call1);
|
Debugprintf("Deleting INP3 routes via %s", Call1);
|
||||||
|
|
||||||
// Delete any INP3 Dest entries via this Route
|
// Delete any INP3 Dest entries via this Route
|
||||||
|
|
||||||
|
@ -179,7 +177,7 @@ VOID DeleteINP3Routes(struct ROUTE * Route)
|
||||||
|
|
||||||
// If we are cleaning up after a sabm on an existing link (frmr or other end reloaded) then we don't need to tell anyone - the routes should be reestablished very quickly
|
// If we are cleaning up after a sabm on an existing link (frmr or other end reloaded) then we don't need to tell anyone - the routes should be reestablished very quickly
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("Deleting First INP3 Route to %s", Call2);
|
Debugprintf("Deleting First INP3 Route to %s", Call2);
|
||||||
|
|
||||||
if (Dest->INP3ROUTE[1].ROUT_NEIGHBOUR == 0)
|
if (Dest->INP3ROUTE[1].ROUT_NEIGHBOUR == 0)
|
||||||
{
|
{
|
||||||
|
@ -188,7 +186,7 @@ VOID DeleteINP3Routes(struct ROUTE * Route)
|
||||||
Dest->INP3ROUTE[0].SRTT = 60000;
|
Dest->INP3ROUTE[0].SRTT = 60000;
|
||||||
Dest->INP3ROUTE[0].Hops = 255;
|
Dest->INP3ROUTE[0].Hops = 255;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("Was the only INP3 route");
|
Debugprintf("Was the only INP3 route");
|
||||||
|
|
||||||
if (Dest->DEST_ROUTE == 4) // we were using it
|
if (Dest->DEST_ROUTE == 4) // we were using it
|
||||||
Dest->DEST_ROUTE = 0;
|
Dest->DEST_ROUTE = 0;
|
||||||
|
@ -208,7 +206,7 @@ VOID DeleteINP3Routes(struct ROUTE * Route)
|
||||||
|
|
||||||
if (Dest->INP3ROUTE[1].ROUT_NEIGHBOUR == Route)
|
if (Dest->INP3ROUTE[1].ROUT_NEIGHBOUR == Route)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("Deleting 2nd INP3 Route to %s", Call2);
|
Debugprintf("Deleting 2nd INP3 Route to %s", Call2);
|
||||||
memcpy(&Dest->INP3ROUTE[1], &Dest->INP3ROUTE[2], sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
memcpy(&Dest->INP3ROUTE[1], &Dest->INP3ROUTE[2], sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
||||||
memset(&Dest->INP3ROUTE[2], 0, sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
memset(&Dest->INP3ROUTE[2], 0, sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
||||||
|
|
||||||
|
@ -217,7 +215,7 @@ VOID DeleteINP3Routes(struct ROUTE * Route)
|
||||||
|
|
||||||
if (Dest->INP3ROUTE[2].ROUT_NEIGHBOUR == Route)
|
if (Dest->INP3ROUTE[2].ROUT_NEIGHBOUR == Route)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("Deleting 3rd INP3 Route to %s", Call2);
|
Debugprintf("Deleting 3rd INP3 Route to %s", Call2);
|
||||||
memset(&Dest->INP3ROUTE[2], 0, sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
memset(&Dest->INP3ROUTE[2], 0, sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -341,10 +339,10 @@ VOID ProcessRTTReply(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Buff)
|
||||||
Route->Timeout = 0; // Got Response
|
Route->Timeout = 0; // Got Response
|
||||||
|
|
||||||
sscanf(&Buff->L4DATA[6], "%d", &OrigTime);
|
sscanf(&Buff->L4DATA[6], "%d", &OrigTime);
|
||||||
RTT = (int)((GetTickCount() - INP3timeLoadedMS) / 10 - (OrigTime)); // We work internally in mS
|
RTT = (GetTickCount() - timeLoadedMS) - OrigTime;
|
||||||
|
|
||||||
if (RTT > 60000)
|
if (RTT > 60000)
|
||||||
return; // Ignore if more than 60 secs (why ??)
|
return; // Ignore if more than 60 secs
|
||||||
|
|
||||||
Route->RTT = RTT;
|
Route->RTT = RTT;
|
||||||
|
|
||||||
|
@ -353,13 +351,11 @@ VOID ProcessRTTReply(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Buff)
|
||||||
else
|
else
|
||||||
Route->SRTT = ((Route->SRTT * 80)/100) + ((RTT * 20)/100);
|
Route->SRTT = ((Route->SRTT * 80)/100) + ((RTT * 20)/100);
|
||||||
|
|
||||||
Route->RTTIncrement = Route->SRTT / 2; // Half for one way time.
|
|
||||||
|
|
||||||
if ((Route->Status & GotRTTResponse) == 0)
|
if ((Route->Status & GotRTTResponse) == 0)
|
||||||
{
|
{
|
||||||
// Link is just starting
|
// Link is just starting
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 got first RTT reply from %s - Link is (Re)staring", Normcall);
|
Debugprintf("INP3 got first RTT reply from %s - Link is (Re)staring", Normcall);
|
||||||
|
|
||||||
Route->Status |= GotRTTResponse;
|
Route->Status |= GotRTTResponse;
|
||||||
}
|
}
|
||||||
|
@ -378,10 +374,10 @@ VOID ProcessINP3RIF(struct ROUTE * Route, UCHAR * ptr1, int msglen, int Port)
|
||||||
char Normcall[10];
|
char Normcall[10];
|
||||||
|
|
||||||
Normcall[ConvFromAX25(Route->NEIGHBOUR_LINK->LINKCALL, Normcall)] = 0;
|
Normcall[ConvFromAX25(Route->NEIGHBOUR_LINK->LINKCALL, Normcall)] = 0;
|
||||||
if (DEBUGINP3) Debugprintf("Processing RIF from %s INP3Node %d Route SRTT %d", Normcall, Route->INP3Node, Route->SRTT);
|
Debugprintf("Processing RIF from %s INP3Node %d Route SRTT %d", Normcall, Route->INP3Node, Route->SRTT);
|
||||||
|
|
||||||
if (Route->SRTT == 0)
|
if (Route->SRTT == 0)
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Zero SRTT");
|
Debugprintf("INP3 Zero SRTT");
|
||||||
|
|
||||||
|
|
||||||
#ifdef NOINP3
|
#ifdef NOINP3
|
||||||
|
@ -407,7 +403,7 @@ VOID ProcessINP3RIF(struct ROUTE * Route, UCHAR * ptr1, int msglen, int Port)
|
||||||
{
|
{
|
||||||
if (msglen < 10)
|
if (msglen < 10)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("Corrupt INP3 Message");
|
Debugprintf("Corrupt INP3 Message");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,12 +421,7 @@ VOID ProcessINP3RIF(struct ROUTE * Route, UCHAR * ptr1, int msglen, int Port)
|
||||||
|
|
||||||
// rtt is value from remote node. Add our RTT to that node
|
// rtt is value from remote node. Add our RTT to that node
|
||||||
|
|
||||||
// if other end is old bpq then value is mS otherwise 10 mS unita
|
rtt += Route->SRTT;
|
||||||
|
|
||||||
if (Route->OldBPQ)
|
|
||||||
rtt /= 10;
|
|
||||||
|
|
||||||
// rtt += Route->SRTT; // Don't do this - other end has added linkrtt
|
|
||||||
|
|
||||||
msglen -= 10;
|
msglen -= 10;
|
||||||
|
|
||||||
|
@ -448,7 +439,7 @@ VOID ProcessINP3RIF(struct ROUTE * Route, UCHAR * ptr1, int msglen, int Port)
|
||||||
memcpy(alias, ptr1+2, len-2);
|
memcpy(alias, ptr1+2, len-2);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("Corrupt INP3 Message");
|
Debugprintf("Corrupt INP3 Message");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -486,13 +477,13 @@ VOID UpdateNode(struct ROUTE * Route, UCHAR * axcall, UCHAR * alias, int hops,
|
||||||
|
|
||||||
if (CompareCalls(axcall, NETROMCALL))
|
if (CompareCalls(axcall, NETROMCALL))
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 for our Nodecall - discarding");
|
Debugprintf("INP3 for our Nodecall - discarding");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckExcludeList(axcall) == 0)
|
if (CheckExcludeList(axcall) == 0)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 excluded - discarding");
|
Debugprintf("INP3 excluded - discarding");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,7 +493,7 @@ VOID UpdateNode(struct ROUTE * Route, UCHAR * axcall, UCHAR * alias, int hops,
|
||||||
|
|
||||||
if (CompareCalls(axcall, APPL->APPLCALL))
|
if (CompareCalls(axcall, APPL->APPLCALL))
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 for an APPLCALL - discarding");
|
Debugprintf("INP3 for an APPLCALL - discarding");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -511,20 +502,20 @@ VOID UpdateNode(struct ROUTE * Route, UCHAR * axcall, UCHAR * alias, int hops,
|
||||||
if (hops > MaxHops && hops < 255)
|
if (hops > MaxHops && hops < 255)
|
||||||
{
|
{
|
||||||
ConvFromAX25(axcall, call);
|
ConvFromAX25(axcall, call);
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Node %s Hops %d RTT %d Ignored - Hop Count too high", call, hops, rtt);
|
Debugprintf("INP3 Node %s Hops %d RTT %d Ignored - Hop Count too high", call, hops, rtt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtt > MAXRTT && rtt < 60000)
|
if (rtt > MAXRTT && rtt < 60000)
|
||||||
{
|
{
|
||||||
ConvFromAX25(axcall, call);
|
ConvFromAX25(axcall, call);
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Node %s Hops %d RTT %d Ignored - rtt too high", call, hops, rtt);
|
Debugprintf("INP3 Node %s Hops %d RTT %d Ignored - rtt too high", call, hops, rtt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtt >= 60000)
|
if (rtt >= 60000)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 RTT > 60000 - discarding");
|
Debugprintf("INP3 RTT > 60000 - discarding");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -533,7 +524,7 @@ VOID UpdateNode(struct ROUTE * Route, UCHAR * axcall, UCHAR * alias, int hops,
|
||||||
|
|
||||||
if (Dest == NULL)
|
if (Dest == NULL)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Table Full - discarding");
|
Debugprintf("INP3 Table Full - discarding");
|
||||||
return; // Table Full
|
return; // Table Full
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -557,7 +548,7 @@ VOID UpdateNode(struct ROUTE * Route, UCHAR * axcall, UCHAR * alias, int hops,
|
||||||
NUMBEROFNODES++;
|
NUMBEROFNODES++;
|
||||||
|
|
||||||
ConvFromAX25(Dest->DEST_CALL, call);
|
ConvFromAX25(Dest->DEST_CALL, call);
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Adding New Node %s Hops %d RTT %d", call, hops, rtt);
|
Debugprintf("INP3 Adding New Node %s Hops %d RTT %d", call, hops, rtt);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -565,14 +556,14 @@ Found:
|
||||||
|
|
||||||
if (Dest->DEST_STATE & 0x80) // Application Entry
|
if (Dest->DEST_STATE & 0x80) // Application Entry
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Application Entry - discarding");
|
Debugprintf("INP3 Application Entry - discarding");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update ALIAS
|
// Update ALIAS
|
||||||
|
|
||||||
ConvFromAX25(Dest->DEST_CALL, call);
|
ConvFromAX25(Dest->DEST_CALL, call);
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Updating Node %s Hops %d RTT %d", call, hops, rtt);
|
Debugprintf("INP3 Updating Node %s Hops %d RTT %d", call, hops, rtt);
|
||||||
|
|
||||||
if (alias[0] > ' ')
|
if (alias[0] > ' ')
|
||||||
memcpy(Dest->DEST_ALIAS, alias, 6);
|
memcpy(Dest->DEST_ALIAS, alias, 6);
|
||||||
|
@ -583,7 +574,7 @@ Found:
|
||||||
|
|
||||||
if (ROUTEPTR->ROUT_NEIGHBOUR == Route)
|
if (ROUTEPTR->ROUT_NEIGHBOUR == Route)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Already have as route[0] - updating");
|
Debugprintf("INP3 Already have as route[0] - updating");
|
||||||
UpdateRoute(Dest, ROUTEPTR, hops, rtt);
|
UpdateRoute(Dest, ROUTEPTR, hops, rtt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -592,7 +583,7 @@ Found:
|
||||||
|
|
||||||
if (ROUTEPTR->ROUT_NEIGHBOUR == Route)
|
if (ROUTEPTR->ROUT_NEIGHBOUR == Route)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Already have as route[1] - updating");
|
Debugprintf("INP3 Already have as route[1] - updating");
|
||||||
UpdateRoute(Dest, ROUTEPTR, hops, rtt);
|
UpdateRoute(Dest, ROUTEPTR, hops, rtt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -601,7 +592,7 @@ Found:
|
||||||
|
|
||||||
if (ROUTEPTR->ROUT_NEIGHBOUR == Route)
|
if (ROUTEPTR->ROUT_NEIGHBOUR == Route)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Already have as route[2] - updating");
|
Debugprintf("INP3 Already have as route[2] - updating");
|
||||||
UpdateRoute(Dest, ROUTEPTR, hops, rtt);
|
UpdateRoute(Dest, ROUTEPTR, hops, rtt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -617,7 +608,7 @@ Found:
|
||||||
{
|
{
|
||||||
// Add here
|
// Add here
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 adding as route[%d]", i);
|
Debugprintf("INP3 adding as route[%d]", i);
|
||||||
AddHere(ROUTEPTR, Route, hops, rtt);
|
AddHere(ROUTEPTR, Route, hops, rtt);
|
||||||
SortRoutes(Dest);
|
SortRoutes(Dest);
|
||||||
return;
|
return;
|
||||||
|
@ -625,7 +616,7 @@ Found:
|
||||||
ROUTEPTR++;
|
ROUTEPTR++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 All entries in use - see if this is better than existing");
|
Debugprintf("INP3 All entries in use - see if this is better than existing");
|
||||||
|
|
||||||
// Full, see if this is better
|
// Full, see if this is better
|
||||||
|
|
||||||
|
@ -635,7 +626,7 @@ Found:
|
||||||
{
|
{
|
||||||
// We are better. Move others down and add on front
|
// We are better. Move others down and add on front
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Replacing route 0");
|
Debugprintf("INP3 Replacing route 0");
|
||||||
|
|
||||||
memcpy(&Dest->INP3ROUTE[2], &Dest->INP3ROUTE[1], sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
memcpy(&Dest->INP3ROUTE[2], &Dest->INP3ROUTE[1], sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
||||||
memcpy(&Dest->INP3ROUTE[1], &Dest->INP3ROUTE[0], sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
memcpy(&Dest->INP3ROUTE[1], &Dest->INP3ROUTE[0], sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
||||||
|
@ -647,7 +638,7 @@ Found:
|
||||||
{
|
{
|
||||||
// We are better. Move 2nd down and add
|
// We are better. Move 2nd down and add
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Replacing route 1");
|
Debugprintf("INP3 Replacing route 1");
|
||||||
memcpy(&Dest->INP3ROUTE[2], &Dest->INP3ROUTE[1], sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
memcpy(&Dest->INP3ROUTE[2], &Dest->INP3ROUTE[1], sizeof(struct INP3_DEST_ROUTE_ENTRY));
|
||||||
AddHere(&Dest->INP3ROUTE[1], Route, hops, rtt);
|
AddHere(&Dest->INP3ROUTE[1], Route, hops, rtt);
|
||||||
return;
|
return;
|
||||||
|
@ -657,13 +648,13 @@ Found:
|
||||||
{
|
{
|
||||||
// We are better. Add here
|
// We are better. Add here
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Replacing route 2");
|
Debugprintf("INP3 Replacing route 2");
|
||||||
AddHere(&Dest->INP3ROUTE[2], Route, hops, rtt);
|
AddHere(&Dest->INP3ROUTE[2], Route, hops, rtt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Worse that any existing route");
|
Debugprintf("INP3 Worse that any existing route");
|
||||||
|
|
||||||
|
|
||||||
// Worse than any - ignore
|
// Worse than any - ignore
|
||||||
|
@ -744,7 +735,7 @@ VOID SortRoutes(struct DEST_LIST * Dest)
|
||||||
if (Dest->INP3ROUTE[1].ROUT_NEIGHBOUR == 0)
|
if (Dest->INP3ROUTE[1].ROUT_NEIGHBOUR == 0)
|
||||||
{
|
{
|
||||||
Call1[ConvFromAX25(Dest->INP3ROUTE[0].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call1)] = 0;
|
Call1[ConvFromAX25(Dest->INP3ROUTE[0].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call1)] = 0;
|
||||||
if (DEBUGINP3) Debugprintf("INP3 1 route %d %s", Dest->INP3ROUTE[0].SRTT, Call1);
|
Debugprintf("INP3 1 route %d %s", Dest->INP3ROUTE[0].SRTT, Call1);
|
||||||
return; // Only One, so cant be out of order
|
return; // Only One, so cant be out of order
|
||||||
}
|
}
|
||||||
if (Dest->INP3ROUTE[2].ROUT_NEIGHBOUR == 0)
|
if (Dest->INP3ROUTE[2].ROUT_NEIGHBOUR == 0)
|
||||||
|
@ -754,7 +745,7 @@ VOID SortRoutes(struct DEST_LIST * Dest)
|
||||||
Call1[ConvFromAX25(Dest->INP3ROUTE[0].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call1)] = 0;
|
Call1[ConvFromAX25(Dest->INP3ROUTE[0].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call1)] = 0;
|
||||||
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 2 routes %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2);
|
Debugprintf("INP3 2 routes %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2);
|
||||||
|
|
||||||
if (Dest->INP3ROUTE[0].SRTT <= Dest->INP3ROUTE[1].SRTT)
|
if (Dest->INP3ROUTE[0].SRTT <= Dest->INP3ROUTE[1].SRTT)
|
||||||
return;
|
return;
|
||||||
|
@ -768,7 +759,7 @@ VOID SortRoutes(struct DEST_LIST * Dest)
|
||||||
Call1[ConvFromAX25(Dest->INP3ROUTE[0].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call1)] = 0;
|
Call1[ConvFromAX25(Dest->INP3ROUTE[0].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call1)] = 0;
|
||||||
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 2 routes %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2);
|
Debugprintf("INP3 2 routes %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -779,7 +770,7 @@ VOID SortRoutes(struct DEST_LIST * Dest)
|
||||||
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
||||||
Call3[ConvFromAX25(Dest->INP3ROUTE[2].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call3)] = 0;
|
Call3[ConvFromAX25(Dest->INP3ROUTE[2].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call3)] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 3 routes %d %s %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2, Dest->INP3ROUTE[2].SRTT, Call3);
|
Debugprintf("INP3 3 routes %d %s %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2, Dest->INP3ROUTE[2].SRTT, Call3);
|
||||||
|
|
||||||
// In order?
|
// In order?
|
||||||
|
|
||||||
|
@ -800,7 +791,7 @@ VOID SortRoutes(struct DEST_LIST * Dest)
|
||||||
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
||||||
Call3[ConvFromAX25(Dest->INP3ROUTE[2].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call3)] = 0;
|
Call3[ConvFromAX25(Dest->INP3ROUTE[2].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call3)] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 3 routes %d %s %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2, Dest->INP3ROUTE[2].SRTT, Call3);
|
Debugprintf("INP3 3 routes %d %s %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2, Dest->INP3ROUTE[2].SRTT, Call3);
|
||||||
|
|
||||||
// if 3 is better than 2 swap them. As two is worse than one. three will then be worst
|
// if 3 is better than 2 swap them. As two is worse than one. three will then be worst
|
||||||
|
|
||||||
|
@ -816,7 +807,7 @@ VOID SortRoutes(struct DEST_LIST * Dest)
|
||||||
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
||||||
Call3[ConvFromAX25(Dest->INP3ROUTE[2].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call3)] = 0;
|
Call3[ConvFromAX25(Dest->INP3ROUTE[2].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call3)] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 3 routes %d %s %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2, Dest->INP3ROUTE[2].SRTT, Call3);
|
Debugprintf("INP3 3 routes %d %s %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2, Dest->INP3ROUTE[2].SRTT, Call3);
|
||||||
|
|
||||||
// 3 is now slowest. 2 could still be better than 1
|
// 3 is now slowest. 2 could still be better than 1
|
||||||
|
|
||||||
|
@ -833,14 +824,14 @@ VOID SortRoutes(struct DEST_LIST * Dest)
|
||||||
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
Call2[ConvFromAX25(Dest->INP3ROUTE[1].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call2)] = 0;
|
||||||
Call3[ConvFromAX25(Dest->INP3ROUTE[2].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call3)] = 0;
|
Call3[ConvFromAX25(Dest->INP3ROUTE[2].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Call3)] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 3 routes %d %s %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2, Dest->INP3ROUTE[2].SRTT, Call3);
|
Debugprintf("INP3 3 routes %d %s %d %s %d %s", Dest->INP3ROUTE[0].SRTT, Call1, Dest->INP3ROUTE[1].SRTT, Call2, Dest->INP3ROUTE[2].SRTT, Call3);
|
||||||
|
|
||||||
if (Dest->INP3ROUTE[0].SRTT <= Dest->INP3ROUTE[1].SRTT && Dest->INP3ROUTE[1].SRTT <= Dest->INP3ROUTE[2].SRTT)// In order?
|
if (Dest->INP3ROUTE[0].SRTT <= Dest->INP3ROUTE[1].SRTT && Dest->INP3ROUTE[1].SRTT <= Dest->INP3ROUTE[2].SRTT)// In order?
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Something went wrong
|
// Something went wrong
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Sort Failed");
|
Debugprintf("INP3 Sort Failed");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -880,8 +871,6 @@ VOID ProcessRTTMsg(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Buff, int Len
|
||||||
{
|
{
|
||||||
int OtherRTT;
|
int OtherRTT;
|
||||||
int Dummy;
|
int Dummy;
|
||||||
char * ptr;
|
|
||||||
struct _RTTMSG * RTTMsg = (struct _RTTMSG *)&Buff->L4DATA[0];
|
|
||||||
|
|
||||||
char Normcall[10];
|
char Normcall[10];
|
||||||
|
|
||||||
|
@ -896,40 +885,20 @@ VOID ProcessRTTMsg(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Buff, int Len
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Route->NEIGHBOUR_LINK->LINKPORT->ALLOWINP3 || Route->NEIGHBOUR_LINK->LINKPORT->ENABLEINP3)
|
if (Route->NEIGHBOUR_LINK->LINKPORT->ALLOWINP3)
|
||||||
Route->INP3Node = 1;
|
Route->INP3Node = 1;
|
||||||
|
|
||||||
if (Route->INP3Node == 0)
|
if (Route->INP3Node == 0)
|
||||||
{
|
{
|
||||||
if (DEBUGINP3) Debugprintf("Ignoring RTT Msg from %s - not using INP3", Normcall);
|
Debugprintf("Ignoring RTT Msg from %s - not using INP3", Normcall);
|
||||||
ReleaseBuffer(Buff);
|
ReleaseBuffer(Buff);
|
||||||
return; // We don't want to use INP3
|
return; // We don't want to use INP3
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract other end's SRTT
|
// Extract other end's SRTT
|
||||||
|
|
||||||
// Get SWVERSION to see if other end is old (Buggy) BPQ
|
|
||||||
|
|
||||||
if (memcmp(RTTMsg->SWVERSION, "BPQ32001 ", 9) == 0)
|
|
||||||
Route->OldBPQ = 1;
|
|
||||||
else
|
|
||||||
Route->OldBPQ = 0;
|
|
||||||
|
|
||||||
sscanf(&Buff->L4DATA[6], "%d %d", &Dummy, &OtherRTT);
|
sscanf(&Buff->L4DATA[6], "%d %d", &Dummy, &OtherRTT);
|
||||||
|
Route->NeighbourSRTT = OtherRTT * 10; // We store in mS
|
||||||
Route->NeighbourSRTT = OtherRTT;
|
|
||||||
|
|
||||||
// Look for $M and $H (MAXRTT MAXHOPS)
|
|
||||||
|
|
||||||
ptr = strstr(RTTMsg->FLAGS, "$M");
|
|
||||||
|
|
||||||
if (ptr)
|
|
||||||
Route->RemoteMAXRTT = atoi(ptr + 2);
|
|
||||||
|
|
||||||
ptr = strstr(RTTMsg->FLAGS, "$H");
|
|
||||||
|
|
||||||
if (ptr)
|
|
||||||
Route->RemoteMAXHOPS = atoi(ptr + 2);
|
|
||||||
|
|
||||||
// Echo Back to sender
|
// Echo Back to sender
|
||||||
|
|
||||||
|
@ -939,8 +908,20 @@ VOID ProcessRTTMsg(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Buff, int Len
|
||||||
{
|
{
|
||||||
// Link is just starting
|
// Link is just starting
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Processing first RTT frame from %s - link is (re)starting", Normcall);
|
Debugprintf("INP3 Processing first RTT frame from %s - link is (re)starting", Normcall);
|
||||||
Route->Status |= GotRTTRequest;
|
Route->Status |= GotRTTRequest;
|
||||||
|
|
||||||
|
// I don't think we should send RIF until we get an RTT response.
|
||||||
|
|
||||||
|
if ((Route->Status & SentRTTRequest) == 0) // Not sent one yet so send it
|
||||||
|
SendRTTMsg(Route);
|
||||||
|
|
||||||
|
// No, it's the other end that must have an rrt response and we've just sent it
|
||||||
|
|
||||||
|
Route->Status |= SentOurRIF;
|
||||||
|
SendOurRIF(Route);
|
||||||
|
SendRIPToNeighbour(Route);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -950,8 +931,6 @@ VOID SendRTTMsg(struct ROUTE * Route)
|
||||||
struct _L3MESSAGEBUFFER * Msg;
|
struct _L3MESSAGEBUFFER * Msg;
|
||||||
char Stamp[50];
|
char Stamp[50];
|
||||||
char Normcall[10];
|
char Normcall[10];
|
||||||
unsigned char temp[256];
|
|
||||||
uint64_t sendTime;
|
|
||||||
|
|
||||||
Normcall[ConvFromAX25(Route->NEIGHBOUR_CALL, Normcall)] = 0;
|
Normcall[ConvFromAX25(Route->NEIGHBOUR_CALL, Normcall)] = 0;
|
||||||
|
|
||||||
|
@ -971,25 +950,13 @@ VOID SendRTTMsg(struct ROUTE * Route)
|
||||||
Msg->L4TXNO = 0;
|
Msg->L4TXNO = 0;
|
||||||
Msg->L4FLAGS = L4INFO;
|
Msg->L4FLAGS = L4INFO;
|
||||||
|
|
||||||
// The timestamp can possibly exceed 10 digits. INP3 only works on differece between send and received, so base can be reset safely.
|
|
||||||
|
|
||||||
sendTime = ((uint64_t)GetTickCount() - INP3timeLoadedMS) / 10; // 10mS units
|
|
||||||
|
|
||||||
if (sendTime > 9999999999)
|
|
||||||
sendTime = INP3timeLoadedMS = 0;
|
|
||||||
|
|
||||||
sprintf(Stamp, "%10llu %10d %10d %10d ", sendTime, Route->SRTT, Route->RTT, 0);
|
|
||||||
|
|
||||||
|
sprintf(Stamp, "%10llu %10d %10d %10d ", (GetTickCount() - timeLoadedMS), Route->SRTT/10, Route->RTT/10, 0);
|
||||||
memcpy(RTTMsg.TXTIME, Stamp, 44);
|
memcpy(RTTMsg.TXTIME, Stamp, 44);
|
||||||
|
|
||||||
// We now allow MAXRTT and MAXHOPS to be reconfigured so should update header each time
|
|
||||||
|
|
||||||
sprintf(temp, "$M%d $N $H%d ", MAXRTT, MaxHops); // trailing spaces extend to ensure padding if the length of characters for MAXRTT changes.
|
|
||||||
memcpy(RTTMsg.FLAGS, temp, 20); // But still limit the actual characters copied.
|
|
||||||
|
|
||||||
memcpy(Msg->L4DATA, &RTTMsg, 236);
|
memcpy(Msg->L4DATA, &RTTMsg, 236);
|
||||||
|
|
||||||
Msg->LENGTH = 256 + 1 + MSGHDDRLEN;
|
Msg->LENGTH = 256 + 1 + 7;
|
||||||
|
|
||||||
Route->Timeout = RTTTimeout;
|
Route->Timeout = RTTTimeout;
|
||||||
|
|
||||||
|
@ -1000,7 +967,7 @@ VOID SendRTTMsg(struct ROUTE * Route)
|
||||||
|
|
||||||
Route->Status |= SentRTTRequest;
|
Route->Status |= SentRTTRequest;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Sending first RTT Msg to %s", Normcall);
|
Debugprintf("INP3 Sending first RTT Msg to %s", Normcall);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1064,13 +1031,12 @@ int BuildRIF(UCHAR * RIF, UCHAR * Call, UCHAR * Alias, int Hops, int RTT)
|
||||||
RIF[12+AliasLen] = 0;
|
RIF[12+AliasLen] = 0;
|
||||||
|
|
||||||
RIFLen = 13 + AliasLen;
|
RIFLen = 13 + AliasLen;
|
||||||
if (DEBUGINP3) Debugprintf("INP3 sending RIF Entry %s:%s %d %d", AliasCopy, Normcall, Hops, RTT);
|
Debugprintf("INP3 sending RIF Entry %s:%s %d %d", AliasCopy, Normcall, Hops, RTT);
|
||||||
return RIFLen;
|
return RIFLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
RIF[10] = 0;
|
RIF[10] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 sending RIF Entry %s %d %d", Normcall, Hops, RTT);
|
Debugprintf("INP3 sending RIF Entry %s %d %d", Normcall, Hops, RTT);
|
||||||
|
|
||||||
return (11);
|
return (11);
|
||||||
}
|
}
|
||||||
|
@ -1091,18 +1057,14 @@ VOID SendOurRIF(struct ROUTE * Route)
|
||||||
|
|
||||||
|
|
||||||
Normcall[ConvFromAX25(Route->NEIGHBOUR_LINK->LINKCALL, Normcall)] = 0;
|
Normcall[ConvFromAX25(Route->NEIGHBOUR_LINK->LINKCALL, Normcall)] = 0;
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Sending Initial RIF to %s ", Normcall);
|
Debugprintf("INP3 Sending Initial RIF to %s ", Normcall);
|
||||||
|
|
||||||
|
|
||||||
Msg->L3SRCE[0] = 0xff;
|
Msg->L3SRCE[0] = 0xff;
|
||||||
|
|
||||||
// send a RIF for our Node and all our APPLCalls
|
// send a RIF for our Node and all our APPLCalls
|
||||||
|
|
||||||
if (Route->OldBPQ)
|
RIFLen = BuildRIF(&Msg->L3SRCE[totLen], MYCALL, MYALIASTEXT, 1, 0);
|
||||||
RIFLen = BuildRIF(&Msg->L3SRCE[totLen], MYCALL, MYALIASTEXT, 1, Route->RTTIncrement * 10);
|
|
||||||
else
|
|
||||||
RIFLen = BuildRIF(&Msg->L3SRCE[totLen], MYCALL, MYALIASTEXT, 1, Route->RTTIncrement);
|
|
||||||
|
|
||||||
totLen += RIFLen;
|
totLen += RIFLen;
|
||||||
|
|
||||||
for (App = 0; App < NumberofAppls; App++)
|
for (App = 0; App < NumberofAppls; App++)
|
||||||
|
@ -1111,11 +1073,7 @@ VOID SendOurRIF(struct ROUTE * Route)
|
||||||
|
|
||||||
if (APPL->APPLQUAL > 0)
|
if (APPL->APPLQUAL > 0)
|
||||||
{
|
{
|
||||||
if (Route->OldBPQ)
|
RIFLen = BuildRIF(&Msg->L3SRCE[totLen], APPL->APPLCALL, APPL->APPLALIAS_TEXT, 1, 0);
|
||||||
RIFLen = BuildRIF(&Msg->L3SRCE[totLen], APPL->APPLCALL, APPL->APPLALIAS_TEXT, 1, Route->RTTIncrement * 10);
|
|
||||||
else
|
|
||||||
RIFLen = BuildRIF(&Msg->L3SRCE[totLen], APPL->APPLCALL, APPL->APPLALIAS_TEXT, 1, Route->RTTIncrement);
|
|
||||||
|
|
||||||
totLen += RIFLen;
|
totLen += RIFLen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1173,10 +1131,11 @@ int SendRIPTimer()
|
||||||
else
|
else
|
||||||
INP3Delay = 600;
|
INP3Delay = 600;
|
||||||
|
|
||||||
if (Route->LastConnectAttempt && (REALTIMETICKS - Route->LastConnectAttempt) < INP3Delay)
|
if (Route->LastConnectAttempt &&
|
||||||
|
(REALTIMETICKS - Route->LastConnectAttempt) < INP3Delay)
|
||||||
{
|
{
|
||||||
Route++;
|
Route++;
|
||||||
continue; // Not yet
|
continue; // No room for link
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to activate link
|
// Try to activate link
|
||||||
|
@ -1184,7 +1143,7 @@ int SendRIPTimer()
|
||||||
if (Route->INP3Node)
|
if (Route->INP3Node)
|
||||||
{
|
{
|
||||||
Normcall[ConvFromAX25(Route->NEIGHBOUR_CALL, Normcall)] = 0;
|
Normcall[ConvFromAX25(Route->NEIGHBOUR_CALL, Normcall)] = 0;
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Activating link to %s", Normcall);
|
Debugprintf("INP3 Activating link to %s", Normcall);
|
||||||
}
|
}
|
||||||
|
|
||||||
L2SETUPCROSSLINKEX(Route, 2); // Only try SABM twice
|
L2SETUPCROSSLINKEX(Route, 2); // Only try SABM twice
|
||||||
|
@ -1248,7 +1207,7 @@ int SendRIPTimer()
|
||||||
char Call [11] = "";
|
char Call [11] = "";
|
||||||
|
|
||||||
ConvFromAX25(Route->NEIGHBOUR_CALL, Call);
|
ConvFromAX25(Route->NEIGHBOUR_CALL, Call);
|
||||||
if (DEBUGINP3) Debugprintf("BPQ32 INP3 Neighbour %s Lost", Call);
|
Debugprintf("BPQ32 INP3 Neighbour %s Lost", Call);
|
||||||
|
|
||||||
Route->Status = 0; // Down
|
Route->Status = 0; // Down
|
||||||
}
|
}
|
||||||
|
@ -1263,7 +1222,7 @@ int SendRIPTimer()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Route->BCTimer = RTTInterval + rand() % 4;
|
Route->BCTimer = RTTInterval;
|
||||||
Route->Retries = RTTRetries;
|
Route->Retries = RTTRetries;
|
||||||
SendRTTMsg(Route);
|
SendRTTMsg(Route);
|
||||||
}
|
}
|
||||||
|
@ -1302,7 +1261,7 @@ VOID SendRIF(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Msg)
|
||||||
|
|
||||||
Msg->LENGTH += MSGHDDRLEN + 1; // PID
|
Msg->LENGTH += MSGHDDRLEN + 1; // PID
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("Sending INP3 RIF length %d to %s", Msg->LENGTH, Normcall);
|
Debugprintf("Sending INP3 RIF length %d to %s", Msg->LENGTH, Normcall);
|
||||||
SendNetFrame(Route, Msg);
|
SendNetFrame(Route, Msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1312,11 +1271,10 @@ VOID SendRIPToOtherNeighbours(UCHAR * axcall, UCHAR * alias, struct INP3_DEST_RO
|
||||||
struct _L3MESSAGEBUFFER * Msg;
|
struct _L3MESSAGEBUFFER * Msg;
|
||||||
int count, MaxRoutes = MAXNEIGHBOURS;
|
int count, MaxRoutes = MAXNEIGHBOURS;
|
||||||
char Normcall[10];
|
char Normcall[10];
|
||||||
int sendHops, sendTT;
|
|
||||||
|
|
||||||
Normcall[ConvFromAX25(axcall, Normcall)] = 0;
|
Normcall[ConvFromAX25(axcall, Normcall)] = 0;
|
||||||
|
|
||||||
if (DEBUGINP3) Debugprintf("INP3 SendRIPToOtherNeighbours for %s", Normcall);
|
Debugprintf("INP3 SendRIPToOtherNeighbours for %s", Normcall);
|
||||||
|
|
||||||
for (count=0; count<MaxRoutes; count++)
|
for (count=0; count<MaxRoutes; count++)
|
||||||
{
|
{
|
||||||
|
@ -1324,32 +1282,20 @@ VOID SendRIPToOtherNeighbours(UCHAR * axcall, UCHAR * alias, struct INP3_DEST_RO
|
||||||
(Routes->Status) &&
|
(Routes->Status) &&
|
||||||
(Routes != Entry->ROUT_NEIGHBOUR)) // Dont send to originator of route
|
(Routes != Entry->ROUT_NEIGHBOUR)) // Dont send to originator of route
|
||||||
{
|
{
|
||||||
sendHops = Entry->Hops + 1;
|
|
||||||
sendTT = Entry->SRTT + Entry->ROUT_NEIGHBOUR->RTTIncrement;
|
|
||||||
|
|
||||||
// send, but only if within their constraints
|
|
||||||
|
|
||||||
if ((Routes->RemoteMAXHOPS == 0 || Routes->RemoteMAXHOPS >= Entry->Hops) &&
|
|
||||||
(Routes->RemoteMAXRTT == 0 || Routes->RemoteMAXRTT >= Entry->SRTT || Entry->SRTT == 60000))
|
|
||||||
{
|
|
||||||
|
|
||||||
Msg = Routes->Msg;
|
Msg = Routes->Msg;
|
||||||
|
|
||||||
if (Msg == NULL)
|
if (Msg == NULL)
|
||||||
{
|
{
|
||||||
Normcall[ConvFromAX25(Routes->NEIGHBOUR_CALL, Normcall)] = 0;
|
Normcall[ConvFromAX25(Routes->NEIGHBOUR_CALL, Normcall)] = 0;
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Building RIF to send to %s", Normcall);
|
Debugprintf("INP3 Building RIF to send to %s", Normcall);
|
||||||
Msg = Routes->Msg = CreateRIFHeader(Routes);
|
Msg = Routes->Msg = CreateRIFHeader(Routes);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Msg)
|
if (Msg)
|
||||||
{
|
{
|
||||||
if (Routes->OldBPQ)
|
|
||||||
Msg->LENGTH += BuildRIF(&Msg->L3SRCE[Msg->LENGTH],
|
Msg->LENGTH += BuildRIF(&Msg->L3SRCE[Msg->LENGTH],
|
||||||
axcall, alias, sendHops, sendTT + 10);
|
axcall, alias, Entry->Hops + 1, Entry->SRTT + Entry->ROUT_NEIGHBOUR->SRTT/10);
|
||||||
else
|
|
||||||
Msg->LENGTH += BuildRIF(&Msg->L3SRCE[Msg->LENGTH],
|
|
||||||
axcall, alias, sendHops, sendTT);
|
|
||||||
|
|
||||||
if (Msg->LENGTH > 250 - 15)
|
if (Msg->LENGTH > 250 - 15)
|
||||||
// if (Msg->LENGTH > Routes->NBOUR_PACLEN - 11)
|
// if (Msg->LENGTH > Routes->NBOUR_PACLEN - 11)
|
||||||
|
@ -1359,7 +1305,6 @@ VOID SendRIPToOtherNeighbours(UCHAR * axcall, UCHAR * alias, struct INP3_DEST_RO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Routes+=1;
|
Routes+=1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1370,12 +1315,11 @@ VOID SendRIPToNeighbour(struct ROUTE * Route)
|
||||||
struct DEST_LIST * Dest = DESTS;
|
struct DEST_LIST * Dest = DESTS;
|
||||||
struct INP3_DEST_ROUTE_ENTRY * Entry;
|
struct INP3_DEST_ROUTE_ENTRY * Entry;
|
||||||
struct _L3MESSAGEBUFFER * Msg;
|
struct _L3MESSAGEBUFFER * Msg;
|
||||||
int sendHops, sendTT;
|
|
||||||
|
|
||||||
char Normcall[10];
|
char Normcall[10];
|
||||||
|
|
||||||
Normcall[ConvFromAX25(Route->NEIGHBOUR_LINK->LINKCALL, Normcall)] = 0;
|
Normcall[ConvFromAX25(Route->NEIGHBOUR_LINK->LINKCALL, Normcall)] = 0;
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Sending Our Table to %s ", Normcall);
|
Debugprintf("INP3 Sending Our Table to %s ", Normcall);
|
||||||
|
|
||||||
Dest--;
|
Dest--;
|
||||||
|
|
||||||
|
@ -1387,17 +1331,10 @@ VOID SendRIPToNeighbour(struct ROUTE * Route)
|
||||||
|
|
||||||
Entry = &Dest->INP3ROUTE[0];
|
Entry = &Dest->INP3ROUTE[0];
|
||||||
|
|
||||||
|
|
||||||
if (Entry->ROUT_NEIGHBOUR && Entry->Hops && Route != Entry->ROUT_NEIGHBOUR)
|
if (Entry->ROUT_NEIGHBOUR && Entry->Hops && Route != Entry->ROUT_NEIGHBOUR)
|
||||||
{
|
{
|
||||||
// Best Route not via this neighbour - send, but only if within their constraints
|
// Best Route not via this neighbour - send
|
||||||
|
|
||||||
sendHops = Entry->Hops + 1;
|
|
||||||
sendTT = Entry->SRTT + Entry->ROUT_NEIGHBOUR->RTTIncrement;
|
|
||||||
|
|
||||||
if ((Route->RemoteMAXHOPS == 0 || Route->RemoteMAXHOPS >= Entry->Hops) &&
|
|
||||||
(Route->RemoteMAXRTT == 0 || Route->RemoteMAXRTT >= Entry->SRTT || Entry->SRTT == 60000))
|
|
||||||
{
|
|
||||||
Msg = Route->Msg;
|
Msg = Route->Msg;
|
||||||
|
|
||||||
if (Msg == NULL)
|
if (Msg == NULL)
|
||||||
|
@ -1406,10 +1343,9 @@ VOID SendRIPToNeighbour(struct ROUTE * Route)
|
||||||
if (Msg == NULL)
|
if (Msg == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Route->OldBPQ)
|
Msg->LENGTH += BuildRIF(&Msg->L3SRCE[Msg->LENGTH],
|
||||||
Msg->LENGTH += BuildRIF(&Msg->L3SRCE[Msg->LENGTH], Dest->DEST_CALL, Dest->DEST_ALIAS, sendHops, sendTT * 10); // old bpq bug - send mS not 10 mS units
|
Dest->DEST_CALL, Dest->DEST_ALIAS,
|
||||||
else
|
Entry->Hops + 1, Entry->SRTT + Entry->ROUT_NEIGHBOUR->SRTT/10);
|
||||||
Msg->LENGTH += BuildRIF(&Msg->L3SRCE[Msg->LENGTH], Dest->DEST_CALL, Dest->DEST_ALIAS, sendHops, sendTT);
|
|
||||||
|
|
||||||
if (Msg->LENGTH > 250 - 15)
|
if (Msg->LENGTH > 250 - 15)
|
||||||
{
|
{
|
||||||
|
@ -1418,7 +1354,6 @@ VOID SendRIPToNeighbour(struct ROUTE * Route)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (Route->Msg)
|
if (Route->Msg)
|
||||||
{
|
{
|
||||||
SendRIF(Route, Route->Msg);
|
SendRIF(Route, Route->Msg);
|
||||||
|
@ -1433,15 +1368,6 @@ VOID FlushRIFs()
|
||||||
|
|
||||||
for (count=0; count<MaxRoutes; count++)
|
for (count=0; count<MaxRoutes; count++)
|
||||||
{
|
{
|
||||||
// Make sure we've sent our local calls
|
|
||||||
|
|
||||||
if ((Routes->Status & GotRTTRequest) && (Routes->Status & GotRTTResponse) && ((Routes->Status & SentOurRIF) == 0))
|
|
||||||
{
|
|
||||||
Routes->Status |= SentOurRIF;
|
|
||||||
SendOurRIF(Routes);
|
|
||||||
SendRIPToNeighbour(Routes);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Routes->Msg)
|
if (Routes->Msg)
|
||||||
{
|
{
|
||||||
char Normcall[10];
|
char Normcall[10];
|
||||||
|
@ -1449,7 +1375,7 @@ VOID FlushRIFs()
|
||||||
Normcall[ConvFromAX25(Routes->NEIGHBOUR_CALL, Normcall)] = 0;
|
Normcall[ConvFromAX25(Routes->NEIGHBOUR_CALL, Normcall)] = 0;
|
||||||
SendRIF(Routes, Routes->Msg);
|
SendRIF(Routes, Routes->Msg);
|
||||||
Routes->Msg = NULL;
|
Routes->Msg = NULL;
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Flushing RIF to %s", Normcall);
|
Debugprintf("INP3 Flushing RIF to %s", Normcall);
|
||||||
}
|
}
|
||||||
Routes+=1;
|
Routes+=1;
|
||||||
}
|
}
|
||||||
|
@ -1500,7 +1426,7 @@ VOID SendNegativeInfo()
|
||||||
{
|
{
|
||||||
char call[11]="";
|
char call[11]="";
|
||||||
ConvFromAX25(Dest->DEST_CALL, call);
|
ConvFromAX25(Dest->DEST_CALL, call);
|
||||||
if (DEBUGINP3) Debugprintf("INP3 Deleting Node %s", call);
|
Debugprintf("INP3 Deleting Node %s", call);
|
||||||
REMOVENODE(Dest); // Clear buffers, Remove from Sorted Nodes chain, and zap entry
|
REMOVENODE(Dest); // Clear buffers, Remove from Sorted Nodes chain, and zap entry
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1659,9 +1585,7 @@ UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, unsigned int msglen)
|
||||||
|
|
||||||
msglen -= 10;
|
msglen -= 10;
|
||||||
|
|
||||||
// Process optional fields
|
while (*ptr1 && msglen > 0)
|
||||||
|
|
||||||
while (*ptr1 && msglen > 0) // Have an option
|
|
||||||
{
|
{
|
||||||
len = *ptr1;
|
len = *ptr1;
|
||||||
opcode = *(ptr1+1);
|
opcode = *(ptr1+1);
|
||||||
|
@ -1675,20 +1599,18 @@ UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, unsigned int msglen)
|
||||||
{
|
{
|
||||||
memcpy(&alias[6 - (len - 2)], ptr1+2, len-2); // Right Justiify
|
memcpy(&alias[6 - (len - 2)], ptr1+2, len-2); // Right Justiify
|
||||||
}
|
}
|
||||||
else if (opcode == 1 && len < 8)
|
else
|
||||||
|
if (opcode == 1 && len < 8)
|
||||||
{
|
{
|
||||||
memcpy(IP, ptr1+2, len-2);
|
memcpy(IP, ptr1+2, len-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr1 += len;
|
|
||||||
msglen -= len;
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr2+=sprintf(ptr2, " %s:%s %d %4.2d\r", alias, call, hops, rtt);
|
ptr2+=sprintf(ptr2, " %s:%s %d %4.2d\r", alias, call, hops, rtt);
|
||||||
|
|
||||||
ptr1++;
|
ptr1++;
|
||||||
msglen--; // Over EOP
|
msglen--; // EOP
|
||||||
|
}
|
||||||
|
|
||||||
|
return ptr2;
|
||||||
}
|
}
|
||||||
return ptr2;
|
return ptr2;
|
||||||
}
|
}
|
||||||
|
|
BIN
BPQMail.aps
BIN
BPQMail.aps
Binary file not shown.
6
BPQNRR.c
6
BPQNRR.c
|
@ -45,8 +45,6 @@ extern VOID Q_ADD();
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
|
|
||||||
TRANSPORTENTRY * NRRSession;
|
TRANSPORTENTRY * NRRSession;
|
||||||
time_t NRRTime;
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
datagrams (and other things) to be transported in Netrom L3 frames.
|
datagrams (and other things) to be transported in Netrom L3 frames.
|
||||||
|
@ -78,7 +76,6 @@ VOID NRRecordRoute(UCHAR * Buff, int Len)
|
||||||
UCHAR * BUFFER = GetBuff();
|
UCHAR * BUFFER = GetBuff();
|
||||||
UCHAR * ptr1;
|
UCHAR * ptr1;
|
||||||
struct _MESSAGE * Msg;
|
struct _MESSAGE * Msg;
|
||||||
time_t Now = time(NULL);
|
|
||||||
|
|
||||||
if (BUFFER == NULL)
|
if (BUFFER == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -87,7 +84,7 @@ VOID NRRecordRoute(UCHAR * Buff, int Len)
|
||||||
|
|
||||||
*ptr1++ = 0xf0; // PID
|
*ptr1++ = 0xf0; // PID
|
||||||
|
|
||||||
ptr1 += sprintf(ptr1, "NRR Response in (probably) %d Secs :", (int)(Now - NRRTime));
|
ptr1 += sprintf(ptr1, "NRR Response:");
|
||||||
|
|
||||||
Buff += 21 + MSGHDDRLEN;
|
Buff += 21 + MSGHDDRLEN;
|
||||||
Len -= (21 + MSGHDDRLEN);
|
Len -= (21 + MSGHDDRLEN);
|
||||||
|
@ -175,7 +172,6 @@ VOID SendNRRecordRoute(struct DEST_LIST * DEST, TRANSPORTENTRY * Session)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NRRSession = Session; // Save Session Pointer for reply
|
NRRSession = Session; // Save Session Pointer for reply
|
||||||
NRRTime = time(NULL);
|
|
||||||
|
|
||||||
Msg->Port = 0;
|
Msg->Port = 0;
|
||||||
Msg->L3PID = NRPID;
|
Msg->L3PID = NRPID;
|
||||||
|
|
17
Bpq32.c
17
Bpq32.c
|
@ -1180,7 +1180,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
// Fix processing of the Winlink API /account/exists response (82)
|
// Fix processing of the Winlink API /account/exists response (82)
|
||||||
// Fix sending CTEXT to L4 connects to Node when FULL_CTEXT is not set
|
// Fix sending CTEXT to L4 connects to Node when FULL_CTEXT is not set
|
||||||
|
|
||||||
// Version 6.0.25.1 Sept 2025
|
// Version 6.0.25.?
|
||||||
|
|
||||||
// Fix 64 bit compatibility problems in SCSTracker and UZ7HO drivers
|
// Fix 64 bit compatibility problems in SCSTracker and UZ7HO drivers
|
||||||
// Add Chat PACLEN config (5)
|
// Add Chat PACLEN config (5)
|
||||||
|
@ -1284,16 +1284,6 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
// Fix Webmail autorefresh extra threads problem (websock connection lost handling) (82)
|
// Fix Webmail autorefresh extra threads problem (websock connection lost handling) (82)
|
||||||
// Fix overwriting application alias (83)
|
// Fix overwriting application alias (83)
|
||||||
|
|
||||||
|
|
||||||
// Version 6.0.26.?
|
|
||||||
|
|
||||||
// Fix for compiling with gcc15 (2)
|
|
||||||
// Fix possble stuck L2 session caused by window being set to zero (3)
|
|
||||||
// Improvments to INP3 (4, 5)
|
|
||||||
// Add Node API /api/tcpqueues (5)
|
|
||||||
// Add sending link events to OARC API (disabled by default) (6)
|
|
||||||
|
|
||||||
|
|
||||||
#define CKernel
|
#define CKernel
|
||||||
|
|
||||||
#include "Versions.h"
|
#include "Versions.h"
|
||||||
|
@ -1455,7 +1445,6 @@ extern HWND hIPResWnd;
|
||||||
extern BOOL IPMinimized;
|
extern BOOL IPMinimized;
|
||||||
|
|
||||||
extern int NODESINPROGRESS;
|
extern int NODESINPROGRESS;
|
||||||
extern int NODESToOnePort;
|
|
||||||
extern VOID * CURRENTNODE;
|
extern VOID * CURRENTNODE;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1525,7 +1514,7 @@ extern char ReportDest[7];
|
||||||
|
|
||||||
extern UCHAR ConfigDirectory[260];
|
extern UCHAR ConfigDirectory[260];
|
||||||
|
|
||||||
extern uint64_t INP3timeLoadedMS;
|
extern uint64_t timeLoadedMS;
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
VOID __cdecl Consoleprintf(const char * format, ...);
|
VOID __cdecl Consoleprintf(const char * format, ...);
|
||||||
|
@ -2414,7 +2403,7 @@ FirstInit()
|
||||||
EnumProcessesPtr = (FARPROCX)GetProcAddress(ExtDriver,"EnumProcesses");
|
EnumProcessesPtr = (FARPROCX)GetProcAddress(ExtDriver,"EnumProcesses");
|
||||||
}
|
}
|
||||||
|
|
||||||
INP3timeLoadedMS = GetTickCount();
|
timeLoadedMS = GetTickCount();
|
||||||
|
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
|
|
139
Cmd.c
139
Cmd.c
|
@ -73,7 +73,7 @@ int seeifInterlockneeded(struct PORTCONTROL * PORT);
|
||||||
int CompareNode(const void *a, const void *b);
|
int CompareNode(const void *a, const void *b);
|
||||||
int CompareAlias(const void *a, const void *b);
|
int CompareAlias(const void *a, const void *b);
|
||||||
int CompareRoutes(const void * a, const void * b);
|
int CompareRoutes(const void * a, const void * b);
|
||||||
void SendVARANetromNodes(struct TNCINFO * TNC, MESSAGE *Buffer);
|
|
||||||
|
|
||||||
extern VOID KISSTX(struct KISSINFO * KISS, PMESSAGE Buffer);
|
extern VOID KISSTX(struct KISSINFO * KISS, PMESSAGE Buffer);
|
||||||
|
|
||||||
|
@ -86,7 +86,6 @@ UCHAR SAVEDAPPLFLAGS = 0;
|
||||||
|
|
||||||
UCHAR ALIASINVOKED = 0;
|
UCHAR ALIASINVOKED = 0;
|
||||||
|
|
||||||
extern int MONTOFILEFLAG;
|
|
||||||
|
|
||||||
VOID * CMDPTR = 0;
|
VOID * CMDPTR = 0;
|
||||||
|
|
||||||
|
@ -156,15 +155,13 @@ char * ALIASPTR = &CMDALIAS[0][0];
|
||||||
|
|
||||||
extern int RigReconfigFlag;
|
extern int RigReconfigFlag;
|
||||||
|
|
||||||
extern int DEBUGINP3;
|
|
||||||
extern int PREFERINP3ROUTES;
|
|
||||||
|
|
||||||
|
|
||||||
struct CMDX COMMANDS[];
|
struct CMDX COMMANDS[];
|
||||||
|
|
||||||
int CMDXLEN = sizeof (struct CMDX);
|
int CMDXLEN = sizeof (struct CMDX);
|
||||||
|
|
||||||
VOID SENDNODESMSG(int Portnum);
|
VOID SENDNODESMSG();
|
||||||
VOID KISSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
VOID KISSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID STOPCMS(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);
|
VOID STARTCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
|
@ -252,81 +249,10 @@ char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char
|
||||||
return Bufferptr + MsgLen;
|
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)
|
VOID SENDNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
int Portnum = atoi(CmdTail);
|
SENDNODESMSG();
|
||||||
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);
|
strcpy(Bufferptr, OKMSG);
|
||||||
Bufferptr += (int)strlen(OKMSG);
|
Bufferptr += (int)strlen(OKMSG);
|
||||||
|
@ -1374,17 +1300,6 @@ VOID CMDL00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct C
|
||||||
else
|
else
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, " S=%d P=%d T=%d V=%d Q=%d\r",
|
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);
|
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++;
|
LINK++;
|
||||||
}
|
}
|
||||||
|
@ -1707,8 +1622,8 @@ char * DisplayRoute(TRANSPORTENTRY * Session, char * Bufferptr, struct ROUTE *
|
||||||
|
|
||||||
if (Routes->INP3Node) // INP3 Enabled?
|
if (Routes->INP3Node) // INP3 Enabled?
|
||||||
{
|
{
|
||||||
double srtt = Routes->SRTT/100.0;
|
double srtt = Routes->SRTT/1000.0;
|
||||||
double nsrtt = Routes->NeighbourSRTT/100.0;
|
double nsrtt = Routes->NeighbourSRTT/1000.0;
|
||||||
|
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, " %4.2fs %4.2fs", srtt, nsrtt);
|
Bufferptr = Cmdprintf(Session, Bufferptr, " %4.2fs %4.2fs", srtt, nsrtt);
|
||||||
}
|
}
|
||||||
|
@ -2254,32 +2169,6 @@ VOID DoNetromConnect(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIS
|
||||||
return;
|
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)
|
BOOL FindLink(UCHAR * LinkCall, UCHAR * OurCall, int Port, struct _LINKTABLE ** REQLINK)
|
||||||
{
|
{
|
||||||
struct _LINKTABLE * LINK = LINKS;
|
struct _LINKTABLE * LINK = LINKS;
|
||||||
|
@ -2305,7 +2194,6 @@ BOOL FindLink(UCHAR * LinkCall, UCHAR * OurCall, int Port, struct _LINKTABLE **
|
||||||
|
|
||||||
LINK++;
|
LINK++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ENTRY NOT FOUND - FIRSTSPARE HAS FIRST FREE ENTRY, OR ZERO IF TABLE FULL
|
// ENTRY NOT FOUND - FIRSTSPARE HAS FIRST FREE ENTRY, OR ZERO IF TABLE FULL
|
||||||
|
|
||||||
*REQLINK = FIRSTSPARE;
|
*REQLINK = FIRSTSPARE;
|
||||||
|
@ -2500,9 +2388,6 @@ NoPort:
|
||||||
|
|
||||||
// Convert to an APPL command, so any alias is actioned
|
// 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
|
// SEE IF THERE IS AN ALIAS DEFINDED FOR THIS COMMAND
|
||||||
|
|
||||||
if (APPL->APPLHASALIAS && APPL->APPLALIASVAL[0] != 0x20)
|
if (APPL->APPLHASALIAS && APPL->APPLALIASVAL[0] != 0x20)
|
||||||
|
@ -3054,7 +2939,7 @@ char * DoOneNode(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIST *
|
||||||
|
|
||||||
if (Neighbour)
|
if (Neighbour)
|
||||||
{
|
{
|
||||||
double srtt = Route->SRTT/100.0;
|
double srtt = Route->SRTT/1000.0;
|
||||||
|
|
||||||
len = ConvFromAX25(Neighbour->NEIGHBOUR_CALL, Normcall);
|
len = ConvFromAX25(Neighbour->NEIGHBOUR_CALL, Normcall);
|
||||||
Normcall[len] = 0;
|
Normcall[len] = 0;
|
||||||
|
@ -3103,7 +2988,7 @@ int DoINP3ViaEntry(struct DEST_LIST * Dest, int n, char * line, int cursor)
|
||||||
|
|
||||||
if (Dest->INP3ROUTE[n].ROUT_NEIGHBOUR != 0)
|
if (Dest->INP3ROUTE[n].ROUT_NEIGHBOUR != 0)
|
||||||
{
|
{
|
||||||
srtt = Dest->INP3ROUTE[n].SRTT/100.0;
|
srtt = Dest->INP3ROUTE[n].SRTT/1000.0;
|
||||||
|
|
||||||
len=ConvFromAX25(Dest->INP3ROUTE[n].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Portcall);
|
len=ConvFromAX25(Dest->INP3ROUTE[n].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Portcall);
|
||||||
Portcall[len]=0;
|
Portcall[len]=0;
|
||||||
|
@ -4373,7 +4258,6 @@ struct CMDX COMMANDS[] =
|
||||||
"RIGRECONFIG ",8, &RIGRECONFIG, 0,
|
"RIGRECONFIG ",8, &RIGRECONFIG, 0,
|
||||||
"RESTART ",7, &RESTART,0,
|
"RESTART ",7, &RESTART,0,
|
||||||
"RESTARTTNC ",10,&RESTARTTNC,0,
|
"RESTARTTNC ",10,&RESTARTTNC,0,
|
||||||
"POLLNODES ",8, &POLLNODES,0,
|
|
||||||
"SENDNODES ",8, &SENDNODES,0,
|
"SENDNODES ",8, &SENDNODES,0,
|
||||||
"EXTRESTART ",10, EXTPORTVAL, offsetof(EXTPORTDATA, EXTRESTART),
|
"EXTRESTART ",10, EXTPORTVAL, offsetof(EXTPORTDATA, EXTRESTART),
|
||||||
"TXDELAY ",3, PORTVAL, offsetof(PORTCONTROLX, PORTTXDELAY),
|
"TXDELAY ",3, PORTVAL, offsetof(PORTCONTROLX, PORTTXDELAY),
|
||||||
|
@ -4391,10 +4275,6 @@ struct CMDX COMMANDS[] =
|
||||||
"MAXUSERS ",4,PORTVAL, offsetof(PORTCONTROLX, USERS),
|
"MAXUSERS ",4,PORTVAL, offsetof(PORTCONTROLX, USERS),
|
||||||
"L3ONLY ",6,PORTVAL, offsetof(PORTCONTROLX, PORTL3FLAG),
|
"L3ONLY ",6,PORTVAL, offsetof(PORTCONTROLX, PORTL3FLAG),
|
||||||
"BBSALIAS ",4,PORTVAL, offsetof(PORTCONTROLX, PORTBBSFLAG),
|
"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,
|
"VALIDCALLS ",5,VALNODES,0,
|
||||||
"WL2KSYSOP ",5,WL2KSYSOP,0,
|
"WL2KSYSOP ",5,WL2KSYSOP,0,
|
||||||
"STOPPORT ",4,STOPPORT,0,
|
"STOPPORT ",4,STOPPORT,0,
|
||||||
|
@ -4406,7 +4286,6 @@ struct CMDX COMMANDS[] =
|
||||||
"KISS ",4,KISSCMD,0,
|
"KISS ",4,KISSCMD,0,
|
||||||
"GETPORTCTEXT",9,GetPortCTEXT, 0,
|
"GETPORTCTEXT",9,GetPortCTEXT, 0,
|
||||||
|
|
||||||
|
|
||||||
#ifdef EXCLUDEBITS
|
#ifdef EXCLUDEBITS
|
||||||
|
|
||||||
"EXCLUDE ",4,ListExcludedCalls,0,
|
"EXCLUDE ",4,ListExcludedCalls,0,
|
||||||
|
@ -4431,10 +4310,6 @@ struct CMDX COMMANDS[] =
|
||||||
"L4DELAY ",7,SWITCHVAL,(size_t)&L4DELAY,
|
"L4DELAY ",7,SWITCHVAL,(size_t)&L4DELAY,
|
||||||
"L4WINDOW ",6,SWITCHVAL,(size_t)&L4DEFAULTWINDOW,
|
"L4WINDOW ",6,SWITCHVAL,(size_t)&L4DEFAULTWINDOW,
|
||||||
"BTINTERVAL ",5,SWITCHVAL,(size_t)&BTINTERVAL,
|
"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,
|
|
||||||
"PASSWORD ", 8, PWDCMD, 0,
|
"PASSWORD ", 8, PWDCMD, 0,
|
||||||
|
|
||||||
"************", 12, APPLCMD, 0,
|
"************", 12, APPLCMD, 0,
|
||||||
|
|
29
CommonCode.c
29
CommonCode.c
|
@ -79,7 +79,6 @@ extern VOID * ENDBUFFERPOOL;
|
||||||
|
|
||||||
extern int PoolBuilt;
|
extern int PoolBuilt;
|
||||||
|
|
||||||
extern int EnableOARCAPI;
|
|
||||||
|
|
||||||
// Read/Write length field in a buffer header
|
// Read/Write length field in a buffer header
|
||||||
|
|
||||||
|
@ -3314,12 +3313,8 @@ SOCKADDR_IN reportdest = {0};
|
||||||
|
|
||||||
SOCKET ReportSocket = 0;
|
SOCKET ReportSocket = 0;
|
||||||
|
|
||||||
SOCKET NodeAPISocket = 0 ;
|
|
||||||
|
|
||||||
SOCKADDR_IN Chatreportdest = {0};
|
SOCKADDR_IN Chatreportdest = {0};
|
||||||
|
|
||||||
SOCKADDR_IN UDPreportdest = {0};
|
|
||||||
|
|
||||||
extern char LOCATOR[]; // Locator for Reporting - may be Maidenhead or LAT:LON
|
extern char LOCATOR[]; // Locator for Reporting - may be Maidenhead or LAT:LON
|
||||||
extern char MAPCOMMENT[]; // Locator for Reporting - may be Maidenhead or LAT:LON
|
extern char MAPCOMMENT[]; // Locator for Reporting - may be Maidenhead or LAT:LON
|
||||||
extern char LOC[7]; // Maidenhead Locator for Reporting
|
extern char LOC[7]; // Maidenhead Locator for Reporting
|
||||||
|
@ -3675,16 +3670,11 @@ pthread_t ResolveUpdateThreadId = 0;
|
||||||
|
|
||||||
char NodeMapServer[80] = "update.g8bpq.net";
|
char NodeMapServer[80] = "update.g8bpq.net";
|
||||||
char ChatMapServer[80] = "chatupdate.g8bpq.net";
|
char ChatMapServer[80] = "chatupdate.g8bpq.net";
|
||||||
char NodeAPIServer[80] = "node-api.packet.oarc.uk";
|
|
||||||
|
|
||||||
int NodeAPIPort = 13579;
|
|
||||||
|
|
||||||
VOID ResolveUpdateThread(void * Unused)
|
VOID ResolveUpdateThread(void * Unused)
|
||||||
{
|
{
|
||||||
struct hostent * HostEnt1;
|
struct hostent * HostEnt1;
|
||||||
struct hostent * HostEnt2;
|
struct hostent * HostEnt2;
|
||||||
struct hostent * HostEnt3;
|
|
||||||
|
|
||||||
|
|
||||||
ResolveUpdateThreadId = GetCurrentThreadId();
|
ResolveUpdateThreadId = GetCurrentThreadId();
|
||||||
|
|
||||||
|
@ -3712,14 +3702,6 @@ VOID ResolveUpdateThread(void * Unused)
|
||||||
if (HostEnt2)
|
if (HostEnt2)
|
||||||
memcpy(&Chatreportdest.sin_addr.s_addr,HostEnt2->h_addr,4);
|
memcpy(&Chatreportdest.sin_addr.s_addr,HostEnt2->h_addr,4);
|
||||||
|
|
||||||
Debugprintf("Resolving %s", NodeAPIServer);
|
|
||||||
|
|
||||||
HostEnt3 = gethostbyname(NodeAPIServer);
|
|
||||||
|
|
||||||
if (HostEnt3)
|
|
||||||
memcpy(&UDPreportdest.sin_addr.s_addr,HostEnt3->h_addr,4);
|
|
||||||
|
|
||||||
|
|
||||||
if (HostEnt1 && HostEnt2)
|
if (HostEnt1 && HostEnt2)
|
||||||
{
|
{
|
||||||
Sleep(1000 * 60 * 30);
|
Sleep(1000 * 60 * 30);
|
||||||
|
@ -3760,13 +3742,6 @@ VOID OpenReportingSockets()
|
||||||
ConvToAX25("DUMMY-1", ReportDest);
|
ConvToAX25("DUMMY-1", ReportDest);
|
||||||
}
|
}
|
||||||
|
|
||||||
UDPreportdest.sin_family = AF_INET;
|
|
||||||
UDPreportdest.sin_port = htons(NodeAPIPort);
|
|
||||||
|
|
||||||
if (EnableOARCAPI)
|
|
||||||
NodeAPISocket = socket(AF_INET, SOCK_DGRAM, 0);
|
|
||||||
|
|
||||||
|
|
||||||
// Set up Chat Report even if no LOCATOR reportdest.sin_family = AF_INET;
|
// Set up Chat Report even if no LOCATOR reportdest.sin_family = AF_INET;
|
||||||
// Socket must be opened in MailChat Process
|
// Socket must be opened in MailChat Process
|
||||||
|
|
||||||
|
@ -5219,14 +5194,14 @@ skipit:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendDataToPktMapThread(void * Param);
|
void SendDataToPktMapThread();
|
||||||
|
|
||||||
void SendDataToPktMap()
|
void SendDataToPktMap()
|
||||||
{
|
{
|
||||||
_beginthread(SendDataToPktMapThread,2048000,0);
|
_beginthread(SendDataToPktMapThread,2048000,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendDataToPktMapThread(void * Param)
|
void SendDataToPktMapThread()
|
||||||
{
|
{
|
||||||
char Return[256] = "";
|
char Return[256] = "";
|
||||||
char Request[64];
|
char Request[64];
|
||||||
|
|
79
Events.c
79
Events.c
|
@ -43,16 +43,8 @@ void MQTTReportSession(char * Msg);
|
||||||
extern int MQTT;
|
extern int MQTT;
|
||||||
|
|
||||||
|
|
||||||
int UDPSeq = 0;
|
|
||||||
|
|
||||||
extern SOCKET NodeAPISocket;
|
|
||||||
extern SOCKADDR_IN UDPreportdest;
|
|
||||||
|
|
||||||
extern char Modenames[19][10];
|
extern char Modenames[19][10];
|
||||||
|
|
||||||
extern char NODECALLLOPPED[10];
|
|
||||||
|
|
||||||
|
|
||||||
// Runs use specified routine on certain event
|
// Runs use specified routine on certain event
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|
||||||
|
@ -125,11 +117,7 @@ DllExport void APIENTRY RunEventProgram(char * Program, char * Param)
|
||||||
|
|
||||||
void hookL2SessionAccepted(int Port, char * remotecall, char * ourcall, struct _LINKTABLE * LINK)
|
void hookL2SessionAccepted(int Port, char * remotecall, char * ourcall, struct _LINKTABLE * LINK)
|
||||||
{
|
{
|
||||||
// Incoming SABM accepted
|
// Incoming SABM
|
||||||
|
|
||||||
char UDPMsg[1024];
|
|
||||||
int udplen;
|
|
||||||
|
|
||||||
|
|
||||||
LINK->ConnectTime = time(NULL);
|
LINK->ConnectTime = time(NULL);
|
||||||
LINK->bytesTXed = LINK->bytesRXed = 0;
|
LINK->bytesTXed = LINK->bytesRXed = 0;
|
||||||
|
@ -137,18 +125,7 @@ void hookL2SessionAccepted(int Port, char * remotecall, char * ourcall, struct _
|
||||||
strcpy(LINK->callingCall, remotecall);
|
strcpy(LINK->callingCall, remotecall);
|
||||||
strcpy(LINK->receivingCall, ourcall);
|
strcpy(LINK->receivingCall, ourcall);
|
||||||
strcpy(LINK->Direction, "In");
|
strcpy(LINK->Direction, "In");
|
||||||
|
|
||||||
if (NodeAPISocket)
|
|
||||||
{
|
|
||||||
udplen = sprintf(UDPMsg, "{\"@type\":\"LinkUpEvent\", \"node\": \"%s\", \"id\": %d, \"direction\": \"incoming\", \"port\": \"%d\", \"remote\": \"%s\", \"local\": \"%s\"}",
|
|
||||||
NODECALLLOPPED, UDPSeq++, LINK->LINKPORT->PORTNUMBER, LINK->callingCall, LINK->receivingCall);
|
|
||||||
|
|
||||||
Debugprintf(UDPMsg);
|
|
||||||
|
|
||||||
sendto(NodeAPISocket, UDPMsg, udplen, 0, (struct sockaddr *)&UDPreportdest, sizeof(UDPreportdest));
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void hookL2SessionDeleted(struct _LINKTABLE * LINK)
|
void hookL2SessionDeleted(struct _LINKTABLE * LINK)
|
||||||
{
|
{
|
||||||
|
@ -164,14 +141,12 @@ void hookL2SessionDeleted(struct _LINKTABLE * LINK)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char Msg[256];
|
char Msg[256];
|
||||||
char timestamp[64];
|
char timestamp[16];
|
||||||
time_t sessionTime = time(NULL) - LINK->ConnectTime;
|
time_t sessionTime = time(NULL) - LINK->ConnectTime;
|
||||||
double avBytesSent = LINK->bytesTXed / (sessionTime / 60.0);
|
double avBytesSent = LINK->bytesTXed / (sessionTime / 60.0);
|
||||||
double avBytesRXed = LINK->bytesRXed / (sessionTime / 60.0);
|
double avBytesRXed = LINK->bytesRXed / (sessionTime / 60.0);
|
||||||
time_t Now = time(NULL);
|
time_t Now = time(NULL);
|
||||||
struct tm * TM = localtime(&Now);
|
struct tm * TM = localtime(&Now);
|
||||||
char UDPMsg[1024];
|
|
||||||
int udplen;
|
|
||||||
|
|
||||||
sprintf(timestamp, "%02d:%02d:%02d", TM->tm_hour, TM->tm_min, TM->tm_sec);
|
sprintf(timestamp, "%02d:%02d:%02d", TM->tm_hour, TM->tm_min, TM->tm_sec);
|
||||||
|
|
||||||
|
@ -189,21 +164,6 @@ void hookL2SessionDeleted(struct _LINKTABLE * LINK)
|
||||||
|
|
||||||
if (MQTT)
|
if (MQTT)
|
||||||
MQTTReportSession(Msg);
|
MQTTReportSession(Msg);
|
||||||
|
|
||||||
|
|
||||||
if (NodeAPISocket)
|
|
||||||
{
|
|
||||||
if (strcmp(LINK->Direction, "Out") == 0)
|
|
||||||
udplen = sprintf(UDPMsg, "{\"@type\":\"LinkDownEvent\", \"node\": \"%s\", \"id\": %d, \"direction\": \"outgoing\", \"port\": \"%d\", \"remote\": \"%s\", \"local\": \"%s\"}",
|
|
||||||
NODECALLLOPPED, UDPSeq++, LINK->LINKPORT->PORTNUMBER, LINK->receivingCall, LINK->callingCall);
|
|
||||||
else
|
|
||||||
udplen = sprintf(UDPMsg, "{\"@type\":\"LinkDownEvent\", \"node\": \"%s\", \"id\": %d, \"direction\": \"incoming\", \"port\": \"%d\", \"remote\": \"%s\", \"local\": \"%s\"}",
|
|
||||||
NODECALLLOPPED, UDPSeq++, LINK->LINKPORT->PORTNUMBER, LINK->callingCall, LINK->receivingCall);
|
|
||||||
|
|
||||||
Debugprintf(UDPMsg);
|
|
||||||
|
|
||||||
sendto(NodeAPISocket, UDPMsg, udplen, 0, (struct sockaddr *)&UDPreportdest, sizeof(UDPreportdest));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LINK->ConnectTime = 0;
|
LINK->ConnectTime = 0;
|
||||||
|
@ -226,27 +186,6 @@ void hookL2SessionAttempt(int Port, char * ourcall, char * remotecall, struct _L
|
||||||
strcpy(LINK->Direction, "Out");
|
strcpy(LINK->Direction, "Out");
|
||||||
}
|
}
|
||||||
|
|
||||||
void hookL2SessionConnected(struct _LINKTABLE * LINK)
|
|
||||||
{
|
|
||||||
// UA received in reponse to SABM
|
|
||||||
|
|
||||||
char UDPMsg[1024];
|
|
||||||
int udplen;
|
|
||||||
|
|
||||||
if (NodeAPISocket)
|
|
||||||
{
|
|
||||||
udplen = sprintf(UDPMsg, "{\"@type\":\"LinkUpEvent\", \"node\": \"%s\", \"id\": %d, \"direction\": \"outgoing\", \"port\": \"%d\", \"remote\": \"%s\", \"local\": \"%s\"}",
|
|
||||||
NODECALLLOPPED, UDPSeq++, LINK->LINKPORT->PORTNUMBER, LINK->callingCall, LINK->receivingCall);
|
|
||||||
|
|
||||||
Debugprintf(UDPMsg);
|
|
||||||
|
|
||||||
sendto(NodeAPISocket, UDPMsg, udplen, 0, (struct sockaddr *)&UDPreportdest, sizeof(UDPreportdest));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void hookL4SessionAttempt(struct STREAMINFO * STREAM, char * remotecall, char * ourcall)
|
void hookL4SessionAttempt(struct STREAMINFO * STREAM, char * remotecall, char * ourcall)
|
||||||
{
|
{
|
||||||
// Outgoing Connect
|
// Outgoing Connect
|
||||||
|
@ -271,20 +210,6 @@ void hookL4SessionAccepted(struct STREAMINFO * STREAM, char * remotecall, char *
|
||||||
strcpy(STREAM->Direction, "In");
|
strcpy(STREAM->Direction, "In");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
{
|
|
||||||
"eventSource": "circuit",
|
|
||||||
"time": "2025-10-08T14:05:54+00:00",
|
|
||||||
"id": 23,
|
|
||||||
"direction": "incoming",
|
|
||||||
"port": "0",
|
|
||||||
"remote": "G8PZT@G8PZT:15aa",
|
|
||||||
"local": "GE8PZT:0017",
|
|
||||||
"event": "disconnect",
|
|
||||||
"@type": "event"
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void hookL4SessionDeleted(struct TNCINFO * TNC, struct STREAMINFO * STREAM)
|
void hookL4SessionDeleted(struct TNCINFO * TNC, struct STREAMINFO * STREAM)
|
||||||
{
|
{
|
||||||
char Msg[256];
|
char Msg[256];
|
||||||
|
|
|
@ -426,7 +426,7 @@ VOID ChatExpandAndSendMessage(ChatCIRCUIT * conn, char * Msg, int LOG)
|
||||||
|
|
||||||
len = RemoveLF(NewMessage, (int)strlen(NewMessage));
|
len = RemoveLF(NewMessage, (int)strlen(NewMessage));
|
||||||
|
|
||||||
ChatWriteLogLine(conn, '>', NewMessage, len, LOG_CHAT);
|
ChatWriteLogLine(conn, '>', NewMessage, len, LOG);
|
||||||
ChatQueueMsg(conn, NewMessage, len);
|
ChatQueueMsg(conn, NewMessage, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
149
L2Code.c
149
L2Code.c
|
@ -64,7 +64,7 @@ VOID L2SENDRESPONSE(struct _LINKTABLE * LINK, int CMD);
|
||||||
VOID L2SENDCOMMAND(struct _LINKTABLE * LINK, int CMD);
|
VOID L2SENDCOMMAND(struct _LINKTABLE * LINK, int CMD);
|
||||||
VOID ACKMSG(struct _LINKTABLE * LINK);
|
VOID ACKMSG(struct _LINKTABLE * LINK);
|
||||||
VOID InformPartner(struct _LINKTABLE * LINK, int Reason);
|
VOID InformPartner(struct _LINKTABLE * LINK, int Reason);
|
||||||
UINT RR_OR_RNR(struct _LINKTABLE * LINK, int CMD);
|
UINT RR_OR_RNR(struct _LINKTABLE * LINK);
|
||||||
VOID L2TIMEOUT(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT);
|
VOID L2TIMEOUT(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT);
|
||||||
VOID CLEAROUTLINK(struct _LINKTABLE * LINK);
|
VOID CLEAROUTLINK(struct _LINKTABLE * LINK);
|
||||||
VOID SENDFRMR(struct _LINKTABLE * LINK);
|
VOID SENDFRMR(struct _LINKTABLE * LINK);
|
||||||
|
@ -99,7 +99,6 @@ VOID L2SENDXID(struct _LINKTABLE * LINK);
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
VOID Q_IP_MSG(MESSAGE * Buffer);
|
VOID Q_IP_MSG(MESSAGE * Buffer);
|
||||||
VOID PROCESSNODEMESSAGE(MESSAGE * Msg, struct PORTCONTROL * PORT);
|
VOID PROCESSNODEMESSAGE(MESSAGE * Msg, struct PORTCONTROL * PORT);
|
||||||
VOID PROCESSNODESPOLL(struct PORTCONTROL * PORT);
|
|
||||||
VOID L2LINKACTIVE(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffer, MESSAGE * ADJBUFFER, UCHAR CTL, UCHAR MSGFLAG);
|
VOID L2LINKACTIVE(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffer, MESSAGE * ADJBUFFER, UCHAR CTL, UCHAR MSGFLAG);
|
||||||
BOOL CompareAliases(UCHAR * c1, UCHAR * c2);
|
BOOL CompareAliases(UCHAR * c1, UCHAR * c2);
|
||||||
VOID L2FORUS(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffer, MESSAGE * ADJBUFFER, UCHAR CTL, UCHAR MSGFLAG);
|
VOID L2FORUS(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffer, MESSAGE * ADJBUFFER, UCHAR CTL, UCHAR MSGFLAG);
|
||||||
|
@ -121,10 +120,8 @@ int CheckKissInterlock(struct PORTCONTROL * MYPORT, int Exclusive);
|
||||||
void hookL2SessionAccepted(int Port, char * fromCall, char * toCall, struct _LINKTABLE * LINK);
|
void hookL2SessionAccepted(int Port, char * fromCall, char * toCall, struct _LINKTABLE * LINK);
|
||||||
void hookL2SessionDeleted(struct _LINKTABLE * LINK);
|
void hookL2SessionDeleted(struct _LINKTABLE * LINK);
|
||||||
void hookL2SessionAttempt(int Port, char * fromCall, char * toCall, struct _LINKTABLE * LINK);
|
void hookL2SessionAttempt(int Port, char * fromCall, char * toCall, struct _LINKTABLE * LINK);
|
||||||
void hookL2SessionConnected(struct _LINKTABLE * LINK);
|
|
||||||
int L2Compressit(unsigned char * Out, int OutSize, unsigned char * In, int Len);
|
int L2Compressit(unsigned char * Out, int OutSize, unsigned char * In, int Len);
|
||||||
VOID DeleteINP3Routes(struct ROUTE * Route);
|
VOID DeleteINP3Routes(struct ROUTE * Route);
|
||||||
VOID SendRTTMsg(struct ROUTE * Route);
|
|
||||||
|
|
||||||
extern int REALTIMETICKS;
|
extern int REALTIMETICKS;
|
||||||
|
|
||||||
|
@ -449,8 +446,6 @@ TRYBBS:
|
||||||
{
|
{
|
||||||
ALIASMSG = 0;
|
ALIASMSG = 0;
|
||||||
|
|
||||||
strcpy(LINK->ApplName, APPL->APPLCMD);
|
|
||||||
|
|
||||||
if (CompareCalls(Buffer->DEST, APPL->APPLCALL))
|
if (CompareCalls(Buffer->DEST, APPL->APPLCALL))
|
||||||
goto FORUS;
|
goto FORUS;
|
||||||
|
|
||||||
|
@ -484,9 +479,9 @@ NOWTRY_NODES:
|
||||||
if (CompareCalls(Buffer->DEST, NODECALL))
|
if (CompareCalls(Buffer->DEST, NODECALL))
|
||||||
{
|
{
|
||||||
if (Buffer->L2DATA[0] == 0xff) // Valid NODES Broadcast
|
if (Buffer->L2DATA[0] == 0xff) // Valid NODES Broadcast
|
||||||
|
{
|
||||||
PROCESSNODEMESSAGE(Buffer, PORT);
|
PROCESSNODEMESSAGE(Buffer, PORT);
|
||||||
else if (Buffer->L2DATA[0] == 0xfe) // Paula's NODES Poll (request Nodes broadcast on port)
|
}
|
||||||
PROCESSNODESPOLL(PORT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
|
@ -813,15 +808,7 @@ VOID L2FORUS(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buff
|
||||||
|
|
||||||
if (CTLlessPF == XID)
|
if (CTLlessPF == XID)
|
||||||
{
|
{
|
||||||
// We could possibly get an XID response if packet is badly delayed and we had timed out
|
|
||||||
|
|
||||||
if ((MSGFLAG & CMDBIT)) // Command
|
|
||||||
ProcessXIDCommand(LINK, PORT, Buffer, ADJBUFFER, CTL, MSGFLAG);
|
ProcessXIDCommand(LINK, PORT, Buffer, ADJBUFFER, CTL, MSGFLAG);
|
||||||
else
|
|
||||||
{
|
|
||||||
Debugprintf("Unexpected XID response with no session");
|
|
||||||
ReleaseBuffer(Buffer); // Ignore if not
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -942,7 +929,6 @@ VOID ProcessXIDCommand(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESS
|
||||||
LINK->L2STATE = 1; // XID received
|
LINK->L2STATE = 1; // XID received
|
||||||
LINK->Ver2point2 = TRUE; // Must support 2.2 if sent XID
|
LINK->Ver2point2 = TRUE; // Must support 2.2 if sent XID
|
||||||
LINK->L2TIME = PORT->PORTT1;
|
LINK->L2TIME = PORT->PORTT1;
|
||||||
LINK->LINKWINDOW = PORT->PORTWINDOW; // Just in case!
|
|
||||||
|
|
||||||
LINK->LINKPORT = PORT;
|
LINK->LINKPORT = PORT;
|
||||||
|
|
||||||
|
@ -1090,47 +1076,25 @@ VOID L2LINKACTIVE(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE *
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CTLlessPF == XID)
|
|
||||||
{
|
|
||||||
// XID command or response on active session.
|
|
||||||
|
|
||||||
// if Command and state = 2 then other end missed XID Response. Process command again
|
|
||||||
|
|
||||||
if ((MSGFLAG & CMDBIT))
|
|
||||||
{
|
|
||||||
if (LINK->L2STATE == 2)
|
|
||||||
{
|
|
||||||
// I think we can just process as normal.
|
|
||||||
|
|
||||||
ProcessXIDCommand(LINK, PORT, Buffer, ADJBUFFER, CTL, MSGFLAG);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LINK->L2STATE == 1) // We've just sent XID so is probably XID Collision
|
|
||||||
{
|
|
||||||
// I think we can just process as normal. If we don't send a response the other end may not switch to 2.2
|
|
||||||
|
|
||||||
ProcessXIDCommand(LINK, PORT, Buffer, ADJBUFFER, CTL, MSGFLAG);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// XID Command on active session. Other end may be restarting. Reset session
|
|
||||||
|
|
||||||
InformPartner(LINK, NORMALCLOSE); // SEND DISC TO OTHER END
|
|
||||||
LINK->CIRCUITPOINTER = 0;
|
|
||||||
|
|
||||||
// I think it is safer to ignore it. The retry will be processed normally as XID command with no session
|
|
||||||
|
|
||||||
ReleaseBuffer(Buffer);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// XID Response
|
|
||||||
|
|
||||||
// if Link State = 1 this is a normal response. Check it then send SABM
|
|
||||||
|
|
||||||
if (LINK->L2STATE == 1)
|
if (LINK->L2STATE == 1)
|
||||||
{
|
{
|
||||||
|
// XID State. Should be XID response if 2.2 ok or DM/FRMR if not
|
||||||
|
|
||||||
|
if (MSGFLAG & RESP)
|
||||||
|
{
|
||||||
|
if (CTLlessPF == DM || CTLlessPF == FRMR)
|
||||||
|
{
|
||||||
|
// Doesn't support XID - Send SABM
|
||||||
|
|
||||||
|
LINK->L2STATE = 2;
|
||||||
|
LINK->Ver2point2 = FALSE;
|
||||||
|
LINK->L2TIMER = 1; // Use retry to send SABM
|
||||||
|
}
|
||||||
|
else if (CTLlessPF == XID)
|
||||||
|
{
|
||||||
|
// Process response to make sure ok, Send SABM or DISC
|
||||||
|
|
||||||
LINK->L2STATE = 2;
|
LINK->L2STATE = 2;
|
||||||
LINK->Ver2point2 = TRUE;// Must support 2.2 if responded to XID
|
LINK->Ver2point2 = TRUE;// Must support 2.2 if responded to XID
|
||||||
|
|
||||||
|
@ -1175,44 +1139,25 @@ VOID L2LINKACTIVE(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE *
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LINK->LINKWINDOW = PORT->PORTWINDOW; // Just in case!
|
|
||||||
LINK->L2TIMER = 1; // Use retry to send SABM
|
LINK->L2TIMER = 1; // Use retry to send SABM
|
||||||
|
}
|
||||||
|
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// XID response, not in state 1.
|
// Command on existing session. Could be due to other end missing
|
||||||
|
// the XID response, so if XID just resend response
|
||||||
|
|
||||||
// This "shouldn't happen"
|
|
||||||
|
|
||||||
Debugprintf("Unexpected XID response, State = %d", LINK->L2STATE);
|
|
||||||
|
|
||||||
// Discard
|
|
||||||
|
|
||||||
ReleaseBuffer(Buffer);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CTLlessPF == XID && (MSGFLAG & CMDBIT))
|
||||||
// Not XID
|
|
||||||
|
|
||||||
// if state = 1 then unexpected response to XID
|
|
||||||
|
|
||||||
if (LINK->L2STATE == 1)
|
|
||||||
{
|
{
|
||||||
if (CTLlessPF == DM || CTLlessPF == FRMR)
|
// XID Command on active session. Other end may be restarting. Send Response
|
||||||
{
|
|
||||||
// Doesn't support XID - Send SABM
|
|
||||||
|
|
||||||
LINK->L2STATE = 2;
|
ProcessXIDCommand(LINK, PORT, Buffer, ADJBUFFER, CTL, MSGFLAG);
|
||||||
LINK->Ver2point2 = FALSE;
|
|
||||||
LINK->L2TIMER = 1; // Use retry to send SABM
|
|
||||||
|
|
||||||
ReleaseBuffer(Buffer);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (CTLlessPF == SABM)
|
if (CTLlessPF == SABM)
|
||||||
|
@ -1343,16 +1288,6 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe
|
||||||
Debugprintf("INP3 Incoming connect from %s", fromCall);
|
Debugprintf("INP3 Incoming connect from %s", fromCall);
|
||||||
DeleteINP3Routes(ROUTE);
|
DeleteINP3Routes(ROUTE);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (PORT->ENABLEINP3)
|
|
||||||
{
|
|
||||||
// We will offer INP3 by sending an RTT probe.
|
|
||||||
|
|
||||||
SendRTTMsg(ROUTE);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NO_CTEXT == 1)
|
if (NO_CTEXT == 1)
|
||||||
|
@ -1453,8 +1388,6 @@ VOID L2SABM(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(Session->APPL, LINK->ApplName);
|
|
||||||
|
|
||||||
// NOW TRY A BBS CONNECT
|
// NOW TRY A BBS CONNECT
|
||||||
// IF APPL CONNECT, SEE IF APPL HAS AN ALIAS
|
// IF APPL CONNECT, SEE IF APPL HAS AN ALIAS
|
||||||
|
|
||||||
|
@ -2054,26 +1987,15 @@ VOID L2_PROCESS(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * B
|
||||||
{
|
{
|
||||||
Debugprintf("INP3 Route to %s connected", fromCall);
|
Debugprintf("INP3 Route to %s connected", fromCall);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (PORT->ENABLEINP3)
|
|
||||||
{
|
|
||||||
// We will offer INP3 by sending an RTT probe.
|
|
||||||
|
|
||||||
SendRTTMsg(ROUTE);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hookL2SessionConnected(LINK);
|
|
||||||
|
|
||||||
SendL2ToMonMap(PORT, fromCall, '+', 'O');
|
SendL2ToMonMap(PORT, fromCall, '+', 'O');
|
||||||
|
|
||||||
LINK->L2STATE = 5;
|
LINK->L2STATE = 5;
|
||||||
LINK->L2TIMER = 0; // CANCEL TIMER
|
LINK->L2TIMER = 0; // CANCEL TIMER
|
||||||
LINK->L2RETRIES = 0;
|
LINK->L2RETRIES = 0;
|
||||||
LINK->L2SLOTIM = T3; // SET FRAME SENT RECENTLY
|
LINK->L2SLOTIM, T3; // SET FRAME SENT RECENTLY
|
||||||
|
|
||||||
// IF VERSION 1 MSG, SET FLAG
|
// IF VERSION 1 MSG, SET FLAG
|
||||||
|
|
||||||
|
@ -2352,7 +2274,7 @@ VOID SFRAME(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, UCHAR CTL, UCHA
|
||||||
if (LINK->LAST_F_TIME + 15 > REALTIMETICKS)
|
if (LINK->LAST_F_TIME + 15 > REALTIMETICKS)
|
||||||
return; // DISCARD
|
return; // DISCARD
|
||||||
|
|
||||||
CTL = RR_OR_RNR(LINK, FALSE); // Sending response
|
CTL = RR_OR_RNR(LINK);
|
||||||
|
|
||||||
CTL |= LINK->LINKNR << 5; // SHIFT N(R) TO TOP 3 BITS
|
CTL |= LINK->LINKNR << 5; // SHIFT N(R) TO TOP 3 BITS
|
||||||
CTL |= PFBIT;
|
CTL |= PFBIT;
|
||||||
|
@ -3059,9 +2981,9 @@ VOID SDETX(struct _LINKTABLE * LINK)
|
||||||
|
|
||||||
// **** Debug code **** look for stuck links
|
// **** Debug code **** look for stuck links
|
||||||
|
|
||||||
if (LINK->LINKWINDOW == 0 || LINK->LASTFRAMESENT == 0 || (time(NULL) - LINK->LASTFRAMESENT) > 60) // No send for 60 secs
|
if (LINK->LASTFRAMESENT && (time(NULL) - LINK->LASTFRAMESENT) > 60) // No send for 60 secs
|
||||||
{
|
{
|
||||||
if (COUNT_AT_L2(LINK) > 16 || LINK->LINKWINDOW == 0)
|
if (COUNT_AT_L2(LINK) > 16)
|
||||||
{
|
{
|
||||||
// Dump Link State
|
// Dump Link State
|
||||||
|
|
||||||
|
@ -3394,7 +3316,7 @@ VOID L2TimerProc()
|
||||||
{
|
{
|
||||||
// Was busy
|
// Was busy
|
||||||
|
|
||||||
if (RR_OR_RNR(LINK, 0) != RNR) // SEE IF STILL BUSY
|
if (RR_OR_RNR(LINK) != RNR) // SEE IF STILL BUSY
|
||||||
{
|
{
|
||||||
// Not still busy - tell other end
|
// Not still busy - tell other end
|
||||||
|
|
||||||
|
@ -3510,7 +3432,7 @@ VOID SendSupervisCmd(struct _LINKTABLE * LINK)
|
||||||
|
|
||||||
LINK->L2ACKREQ = 0; // CLEAR ACK NEEDED
|
LINK->L2ACKREQ = 0; // CLEAR ACK NEEDED
|
||||||
|
|
||||||
CTL = RR_OR_RNR(LINK, TRUE);
|
CTL = RR_OR_RNR(LINK);
|
||||||
|
|
||||||
// MOV L2STATE[EBX],5 ; CANCEL REJ - ACTUALLY GOING TO 'PENDING ACK'
|
// MOV L2STATE[EBX],5 ; CANCEL REJ - ACTUALLY GOING TO 'PENDING ACK'
|
||||||
|
|
||||||
|
@ -3528,7 +3450,7 @@ void SEND_RR_RESP(struct _LINKTABLE * LINK, UCHAR PF)
|
||||||
{
|
{
|
||||||
UCHAR CTL;
|
UCHAR CTL;
|
||||||
|
|
||||||
CTL = RR_OR_RNR(LINK, FALSE);
|
CTL = RR_OR_RNR(LINK);
|
||||||
|
|
||||||
// MOV L2STATE[EBX],5 ; CANCEL REJ - ACTUALLY GOING TO 'PENDING ACK'
|
// MOV L2STATE[EBX],5 ; CANCEL REJ - ACTUALLY GOING TO 'PENDING ACK'
|
||||||
|
|
||||||
|
@ -3879,7 +3801,6 @@ VOID L2SENDXID(struct _LINKTABLE * LINK)
|
||||||
|
|
||||||
if (PORT)
|
if (PORT)
|
||||||
{
|
{
|
||||||
LINK->LINKWINDOW = PORT->PORTWINDOW; // Just in case!
|
|
||||||
Buffer->PORT = PORT->PORTNUMBER;
|
Buffer->PORT = PORT->PORTNUMBER;
|
||||||
PUT_ON_PORT_Q(PORT, Buffer);
|
PUT_ON_PORT_Q(PORT, Buffer);
|
||||||
}
|
}
|
||||||
|
@ -4023,7 +3944,7 @@ VOID InformPartner(struct _LINKTABLE * LINK, int Reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UINT RR_OR_RNR(struct _LINKTABLE * LINK, int CMD)
|
UINT RR_OR_RNR(struct _LINKTABLE * LINK)
|
||||||
{
|
{
|
||||||
UCHAR Temp;
|
UCHAR Temp;
|
||||||
TRANSPORTENTRY * Session;
|
TRANSPORTENTRY * Session;
|
||||||
|
@ -4105,9 +4026,7 @@ stayinREJ2:
|
||||||
|
|
||||||
// Dont send SREJ if clearing RNR - causes FRMR
|
// Dont send SREJ if clearing RNR - causes FRMR
|
||||||
|
|
||||||
// Latest Spec says shouldn't send SREJ as Command
|
if (SaveRNRSent)
|
||||||
|
|
||||||
if (SaveRNRSent || CMD == 1)
|
|
||||||
return REJ;
|
return REJ;
|
||||||
|
|
||||||
if (LINK->Ver2point2) // We only allow 2.2 with SREJ Multi
|
if (LINK->Ver2point2) // We only allow 2.2 with SREJ Multi
|
||||||
|
|
45
L3Code.c
45
L3Code.c
|
@ -60,10 +60,6 @@ VOID L3TRYNEXTDEST(struct ROUTE * ROUTE);
|
||||||
VOID SendNETROMRoute(struct PORTCONTROL * PORT, unsigned char * axcall);
|
VOID SendNETROMRoute(struct PORTCONTROL * PORT, unsigned char * axcall);
|
||||||
void SendVARANetromNodes(struct TNCINFO * TNC, MESSAGE *Buffer);
|
void SendVARANetromNodes(struct TNCINFO * TNC, MESSAGE *Buffer);
|
||||||
void SendVARANetromMsg(struct TNCINFO * TNC,L3MESSAGEBUFFER * Buffer);
|
void SendVARANetromMsg(struct TNCINFO * TNC,L3MESSAGEBUFFER * Buffer);
|
||||||
VOID SENDNODESMSG(int Portnum);
|
|
||||||
|
|
||||||
extern int NODESINPROGRESS;
|
|
||||||
extern int NODESToOnePort;
|
|
||||||
|
|
||||||
extern BOOL NODESINPROGRESS ;;
|
extern BOOL NODESINPROGRESS ;;
|
||||||
PPORTCONTROL L3CURRENTPORT;
|
PPORTCONTROL L3CURRENTPORT;
|
||||||
|
@ -245,13 +241,6 @@ char Call1[10];
|
||||||
char Call2[10];
|
char Call2[10];
|
||||||
char Call3[10];
|
char Call3[10];
|
||||||
|
|
||||||
VOID PROCESSNODESPOLL(struct PORTCONTROL * PORT)
|
|
||||||
{
|
|
||||||
// Pauls G8BPT's request NODES Broadcast
|
|
||||||
|
|
||||||
SENDNODESMSG(PORT->PORTNUMBER);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
VOID PROCESSNODEMESSAGE(MESSAGE * Msg, struct PORTCONTROL * PORT)
|
VOID PROCESSNODEMESSAGE(MESSAGE * Msg, struct PORTCONTROL * PORT)
|
||||||
{
|
{
|
||||||
// PROCESS A NET/ROM 'NODES' MESSAGE
|
// PROCESS A NET/ROM 'NODES' MESSAGE
|
||||||
|
@ -755,26 +744,12 @@ VOID L3BG();
|
||||||
|
|
||||||
VOID SENDNEXTNODESFRAGMENT();
|
VOID SENDNEXTNODESFRAGMENT();
|
||||||
|
|
||||||
VOID SENDNODESMSG(int Portnum)
|
VOID SENDNODESMSG()
|
||||||
{
|
{
|
||||||
if (NODESINPROGRESS)
|
if (NODESINPROGRESS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NODESToOnePort = Portnum;
|
|
||||||
|
|
||||||
if (Portnum) // Nodes to one port only
|
|
||||||
{
|
|
||||||
L3CURRENTPORT = GetPortTableEntryFromPortNum(Portnum);
|
|
||||||
|
|
||||||
if (L3CURRENTPORT == 0)
|
|
||||||
{
|
|
||||||
NODESToOnePort = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
L3CURRENTPORT = PORTTABLE;
|
L3CURRENTPORT = PORTTABLE;
|
||||||
|
|
||||||
SENDNEXTNODESFRAGMENT();
|
SENDNEXTNODESFRAGMENT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -810,18 +785,15 @@ VOID SENDNEXTNODESFRAGMENT()
|
||||||
// No NODES to this port, so go to next
|
// No NODES to this port, so go to next
|
||||||
|
|
||||||
PORT = PORT->PORTPOINTER;
|
PORT = PORT->PORTPOINTER;
|
||||||
|
if (PORT == NULL)
|
||||||
if (PORT == NULL || NODESToOnePort)
|
|
||||||
{
|
{
|
||||||
// Finished
|
// Finished
|
||||||
|
|
||||||
NODESToOnePort = 0;
|
|
||||||
NODESINPROGRESS = 0;
|
NODESINPROGRESS = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NODESToOnePort == 0) // CurrentPort already set if NODESToOnePort
|
|
||||||
L3CURRENTPORT = PORT;
|
L3CURRENTPORT = PORT;
|
||||||
|
|
||||||
DEST = CURRENTNODE = DESTS; // START OF LIST
|
DEST = CURRENTNODE = DESTS; // START OF LIST
|
||||||
|
@ -879,16 +851,6 @@ VOID SENDNEXTNODESFRAGMENT()
|
||||||
if (DEST >= ENDDESTLIST)
|
if (DEST >= ENDDESTLIST)
|
||||||
{
|
{
|
||||||
CURRENTNODE = 0; // Finished on this port
|
CURRENTNODE = 0; // Finished on this port
|
||||||
|
|
||||||
// if sending to only one port then stop
|
|
||||||
|
|
||||||
if (NODESToOnePort)
|
|
||||||
{
|
|
||||||
NODESToOnePort = 0;
|
|
||||||
NODESINPROGRESS = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
L3CURRENTPORT = PORT->PORTPOINTER;
|
L3CURRENTPORT = PORT->PORTPOINTER;
|
||||||
if (L3CURRENTPORT == NULL)
|
if (L3CURRENTPORT == NULL)
|
||||||
{
|
{
|
||||||
|
@ -896,7 +858,6 @@ VOID SENDNEXTNODESFRAGMENT()
|
||||||
|
|
||||||
NODESINPROGRESS = 0;
|
NODESINPROGRESS = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
goto Sendit;
|
goto Sendit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1083,7 +1044,7 @@ VOID L3TimerProc()
|
||||||
|
|
||||||
L3TIMER = L3INTERVAL;
|
L3TIMER = L3INTERVAL;
|
||||||
UPDATEDESTLIST();
|
UPDATEDESTLIST();
|
||||||
SENDNODESMSG(0);
|
SENDNODESMSG();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
L4Code.c
4
L4Code.c
|
@ -791,7 +791,7 @@ VOID L4BG()
|
||||||
|
|
||||||
complen = L2Compressit(Compressed, 8192, toCompress, toCompressLen);
|
complen = L2Compressit(Compressed, 8192, toCompress, toCompressLen);
|
||||||
|
|
||||||
// Debugprintf("%d %d %d%%", toCompressLen, complen, ((toCompressLen - complen) * 100) / toCompressLen);
|
Debugprintf("%d %d %d%%", toCompressLen, complen, ((toCompressLen - complen) * 100) / toCompressLen);
|
||||||
|
|
||||||
// Send compressed
|
// Send compressed
|
||||||
|
|
||||||
|
@ -826,7 +826,7 @@ VOID L4BG()
|
||||||
Len = ChunkSize;
|
Len = ChunkSize;
|
||||||
|
|
||||||
complen = L2Compressit(Compressed, 8192, CompressPtr, Len);
|
complen = L2Compressit(Compressed, 8192, CompressPtr, Len);
|
||||||
// Debugprintf("Chunked %d %d %d%%", Len, complen, ((Len - complen) * 100) / Len);
|
Debugprintf("Chunked %d %d %d%%", Len, complen, ((Len - complen) * 100) / Len);
|
||||||
|
|
||||||
sendChunk(L4, Compressed, complen, savePort);
|
sendChunk(L4, Compressed, complen, savePort);
|
||||||
|
|
||||||
|
|
5
LinBPQ.c
5
LinBPQ.c
|
@ -84,7 +84,7 @@ void RHPPoll();
|
||||||
VOID GetPGConfig();
|
VOID GetPGConfig();
|
||||||
void SendBBSDataToPktMap();
|
void SendBBSDataToPktMap();
|
||||||
|
|
||||||
extern uint64_t INP3timeLoadedMS;
|
extern uint64_t timeLoadedMS;
|
||||||
|
|
||||||
BOOL IncludesMail = FALSE;
|
BOOL IncludesMail = FALSE;
|
||||||
BOOL IncludesChat = FALSE;
|
BOOL IncludesChat = FALSE;
|
||||||
|
@ -840,13 +840,14 @@ int main(int argc, char * argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Disable Console Terminal if stdout redirected
|
// Disable Console Terminal if stdout redirected
|
||||||
|
|
||||||
// printf("STDOUT %d\n",isatty(STDOUT_FILENO));
|
// printf("STDOUT %d\n",isatty(STDOUT_FILENO));
|
||||||
// printf("STDIN %d\n",isatty(STDIN_FILENO));
|
// printf("STDIN %d\n",isatty(STDIN_FILENO));
|
||||||
|
|
||||||
if (!isatty(STDOUT_FILENO) || !isatty(STDIN_FILENO))
|
if (!isatty(STDOUT_FILENO) || !isatty(STDIN_FILENO))
|
||||||
Redirected = 1;
|
Redirected = 1;
|
||||||
|
|
||||||
INP3timeLoadedMS = GetTickCount();
|
timeLoadedMS = GetTickCount();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
92
Moncode.c
92
Moncode.c
|
@ -691,14 +691,6 @@ char * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen)
|
||||||
return Output;
|
return Output;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ADJBUFFER->L2DATA[0] == 0xfe) // Paula's Nodes Poll
|
|
||||||
{
|
|
||||||
memcpy(Alias, ++ptr, 6);
|
|
||||||
Output += sprintf((char *)Output, " NODES POLL from %s\r", Alias);
|
|
||||||
return Output;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Display normal NET/ROM transmissions
|
// Display normal NET/ROM transmissions
|
||||||
|
|
||||||
Output += sprintf((char *)Output, " NET/ROM\r ");
|
Output += sprintf((char *)Output, " NET/ROM\r ");
|
||||||
|
@ -993,87 +985,3 @@ char * DISPLAYARPDATAGRAM(UCHAR * Datagram, UCHAR * Output)
|
||||||
ptr[15], ptr[16], ptr[17], ptr[18], Dest, ptr[26], ptr[27], ptr[28], ptr[29]);
|
ptr[15], ptr[16], ptr[17], ptr[18], Dest, ptr[26], ptr[27], ptr[28], ptr[29]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char Lastpacketlog[256];
|
|
||||||
|
|
||||||
int PacketLogDelay = 30000;
|
|
||||||
|
|
||||||
extern BPQVECSTRUC * FILEMONVECTOR;
|
|
||||||
extern UCHAR LogDirectory[260];
|
|
||||||
|
|
||||||
void WritePacketLogThread(void * param)
|
|
||||||
{
|
|
||||||
char FN[256];
|
|
||||||
time_t T;
|
|
||||||
struct tm * tm;
|
|
||||||
FILE * Handle;
|
|
||||||
int MsgLen;
|
|
||||||
MESSAGE * MSG;
|
|
||||||
MESSAGE * Q;
|
|
||||||
char buffer[512];
|
|
||||||
|
|
||||||
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
BOOL SaveMTX = MTX;
|
|
||||||
BOOL SaveMCOM = MCOM;
|
|
||||||
BOOL SaveMUI = MUIONLY;
|
|
||||||
|
|
||||||
Sleep(PacketLogDelay);
|
|
||||||
|
|
||||||
// Get chain of queued packets under semaphore
|
|
||||||
|
|
||||||
GetSemaphore(&Semaphore, 101);
|
|
||||||
|
|
||||||
Q = FILEMONVECTOR->HOSTTRACEQ;
|
|
||||||
FILEMONVECTOR->HOSTTRACEQ = 0;
|
|
||||||
|
|
||||||
FreeSemaphore(&Semaphore);
|
|
||||||
|
|
||||||
if (Q == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Open log file and write decoded packets
|
|
||||||
|
|
||||||
T = time(NULL);
|
|
||||||
tm = gmtime(&T);
|
|
||||||
|
|
||||||
if (LogDirectory[0] == 0)
|
|
||||||
{
|
|
||||||
strcpy(FN, "logs/PacketLog");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
strcpy(FN, LogDirectory);
|
|
||||||
strcat(FN, "/");
|
|
||||||
strcat(FN, "logs/PacketLog");
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf(&FN[strlen(FN)], "_%04d%02d%02d.log", tm->tm_year +1900, tm->tm_mon+1, tm->tm_mday);
|
|
||||||
|
|
||||||
Handle = fopen(FN, "ab");
|
|
||||||
|
|
||||||
if (Handle == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
while (Q)
|
|
||||||
{
|
|
||||||
MSG = Q;
|
|
||||||
Q = MSG->CHAIN; // get first
|
|
||||||
|
|
||||||
IntSetTraceOptionsEx(MMASK, 1, 1, 0);
|
|
||||||
MsgLen = IntDecodeFrame(MSG, buffer, MSG->Timestamp, 0xffffffffffffffff, FALSE, FALSE);
|
|
||||||
IntSetTraceOptionsEx(MMASK, SaveMTX, SaveMCOM, SaveMUI);
|
|
||||||
|
|
||||||
fwrite(buffer , 1, MsgLen, Handle);
|
|
||||||
|
|
||||||
GetSemaphore(&Semaphore, 101);
|
|
||||||
ReleaseBuffer(MSG);
|
|
||||||
FreeSemaphore(&Semaphore);
|
|
||||||
}
|
|
||||||
fclose(Handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
28
RigControl.c
28
RigControl.c
|
@ -110,7 +110,7 @@ VOID ConnecttoFLRIG(struct RIGPORTINFO * PORT);
|
||||||
int DecodeHAMLIBAddr(struct RIGPORTINFO * PORT, char * ptr);
|
int DecodeHAMLIBAddr(struct RIGPORTINFO * PORT, char * ptr);
|
||||||
void ProcessHAMLIBFrame(struct RIGPORTINFO * PORT, int Length);
|
void ProcessHAMLIBFrame(struct RIGPORTINFO * PORT, int Length);
|
||||||
VOID HAMLIBPoll(struct RIGPORTINFO * PORT);
|
VOID HAMLIBPoll(struct RIGPORTINFO * PORT);
|
||||||
void HAMLIBSlaveThread(VOID * Param);
|
void HAMLIBSlaveThread(struct RIGINFO * RIG);
|
||||||
void CheckAndProcessRTLUDP(struct RIGPORTINFO * PORT);
|
void CheckAndProcessRTLUDP(struct RIGPORTINFO * PORT);
|
||||||
VOID RTLUDPPoll(struct RIGPORTINFO * PORT);
|
VOID RTLUDPPoll(struct RIGPORTINFO * PORT);
|
||||||
VOID ConnecttoRTLUDP(struct RIGPORTINFO * PORT);
|
VOID ConnecttoRTLUDP(struct RIGPORTINFO * PORT);
|
||||||
|
@ -122,8 +122,8 @@ VOID ProcessSDRRadioFrame(struct RIGPORTINFO * PORT, int Length);
|
||||||
VOID SDRRadioPoll(struct RIGPORTINFO * PORT);
|
VOID SDRRadioPoll(struct RIGPORTINFO * PORT);
|
||||||
|
|
||||||
VOID SetupPortRIGPointers();
|
VOID SetupPortRIGPointers();
|
||||||
VOID PTTCATThread(void * Param);
|
VOID PTTCATThread(struct RIGINFO *RIG);
|
||||||
|
VOID ConnecttoHAMLIB(struct RIGPORTINFO * PORT);
|
||||||
|
|
||||||
// ----- G7TAJ ----
|
// ----- G7TAJ ----
|
||||||
VOID ConnecttoSDRANGEL(struct RIGPORTINFO * PORT);
|
VOID ConnecttoSDRANGEL(struct RIGPORTINFO * PORT);
|
||||||
|
@ -7484,9 +7484,8 @@ VOID SetupPortRIGPointers()
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
VOID PTTCATThread(void * Param)
|
VOID PTTCATThread(struct RIGINFO *RIG)
|
||||||
{
|
{
|
||||||
struct RIGINFO * RIG = (struct RIGINFO *)Param;
|
|
||||||
DWORD dwLength = 0;
|
DWORD dwLength = 0;
|
||||||
int Length, ret, i;
|
int Length, ret, i;
|
||||||
UCHAR * ptr1;
|
UCHAR * ptr1;
|
||||||
|
@ -8472,7 +8471,7 @@ int DecodeHAMLIBAddr(struct RIGPORTINFO * PORT, char * ptr)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID HAMLIBThread(void * Param);
|
VOID HAMLIBThread(struct RIGPORTINFO * PORT);
|
||||||
|
|
||||||
VOID ConnecttoHAMLIB(struct RIGPORTINFO * PORT)
|
VOID ConnecttoHAMLIB(struct RIGPORTINFO * PORT)
|
||||||
{
|
{
|
||||||
|
@ -8482,11 +8481,10 @@ VOID ConnecttoHAMLIB(struct RIGPORTINFO * PORT)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID HAMLIBThread(void * Param)
|
VOID HAMLIBThread(struct RIGPORTINFO * PORT)
|
||||||
{
|
{
|
||||||
// Opens sockets and looks for data
|
// Opens sockets and looks for data
|
||||||
|
|
||||||
struct RIGPORTINFO * PORT = (struct RIGPORTINFO * )Param;
|
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
int err, i, ret;
|
int err, i, ret;
|
||||||
u_long param=1;
|
u_long param=1;
|
||||||
|
@ -8608,11 +8606,10 @@ Lost:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void HAMLIBSlaveThread(VOID * Param)
|
void HAMLIBSlaveThread(struct RIGINFO * RIG)
|
||||||
{
|
{
|
||||||
// Wait for connections and messages from HAMLIB Clients
|
// Wait for connections and messages from HAMLIB Clients
|
||||||
|
|
||||||
struct RIGINFO * RIG = (struct RIGINFO *)Param;
|
|
||||||
fd_set readfs;
|
fd_set readfs;
|
||||||
fd_set errorfs;
|
fd_set errorfs;
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
|
@ -8928,7 +8925,7 @@ VOID FLRIGSendCommand(struct RIGPORTINFO * PORT, char * Command, char * Value)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID FLRIGThread(VOID * Param);
|
VOID FLRIGThread(struct RIGPORTINFO * PORT);
|
||||||
|
|
||||||
VOID ConnecttoFLRIG(struct RIGPORTINFO * PORT)
|
VOID ConnecttoFLRIG(struct RIGPORTINFO * PORT)
|
||||||
{
|
{
|
||||||
|
@ -8937,11 +8934,10 @@ VOID ConnecttoFLRIG(struct RIGPORTINFO * PORT)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID FLRIGThread(VOID * Param)
|
VOID FLRIGThread(struct RIGPORTINFO * PORT)
|
||||||
{
|
{
|
||||||
// Opens sockets and looks for data
|
// Opens sockets and looks for data
|
||||||
|
|
||||||
struct RIGPORTINFO * PORT = (struct RIGPORTINFO *)Param;
|
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
int err, i, ret;
|
int err, i, ret;
|
||||||
u_long param=1;
|
u_long param=1;
|
||||||
|
@ -10181,7 +10177,7 @@ void ProcessSDRANGELFrame(struct RIGPORTINFO * PORT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID SDRANGELThread(VOID * Param);
|
VOID SDRANGELThread(struct RIGPORTINFO * PORT);
|
||||||
|
|
||||||
VOID ConnecttoSDRANGEL(struct RIGPORTINFO * PORT)
|
VOID ConnecttoSDRANGEL(struct RIGPORTINFO * PORT)
|
||||||
{
|
{
|
||||||
|
@ -10190,11 +10186,9 @@ VOID ConnecttoSDRANGEL(struct RIGPORTINFO * PORT)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SDRANGELThread(VOID * Param)
|
VOID SDRANGELThread(struct RIGPORTINFO * PORT)
|
||||||
{
|
{
|
||||||
// Opens sockets and looks for data
|
// Opens sockets and looks for data
|
||||||
|
|
||||||
struct RIGPORTINFO * PORT = (struct RIGPORTINFO *)Param;
|
|
||||||
char Msg[512];
|
char Msg[512];
|
||||||
int err, i, ret;
|
int err, i, ret;
|
||||||
u_long param=1;
|
u_long param=1;
|
||||||
|
|
|
@ -10,15 +10,15 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KVers 6,0,25,6
|
#define KVers 6,0,25,1
|
||||||
#define KVerstring "6.0.25.6\0"
|
#define KVerstring "6.0.25.1\0"
|
||||||
|
|
||||||
|
|
||||||
#ifdef CKernel
|
#ifdef CKernel
|
||||||
|
|
||||||
#define Vers KVers
|
#define Vers KVers
|
||||||
#define Verstring KVerstring
|
#define Verstring KVerstring
|
||||||
#define Datestring "October 2025"
|
#define Datestring "August 2025"
|
||||||
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
|
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
|
||||||
#define VerCopyright "Copyright © 2001-2025 John Wiseman G8BPQ\0"
|
#define VerCopyright "Copyright © 2001-2025 John Wiseman G8BPQ\0"
|
||||||
#define VerDesc "BPQ32 Switch\0"
|
#define VerDesc "BPQ32 Switch\0"
|
||||||
|
|
29
asmstrucs.h
29
asmstrucs.h
|
@ -64,6 +64,15 @@ extern int ENDOFDATA;
|
||||||
extern int L3LIVES;
|
extern int L3LIVES;
|
||||||
extern int NUMBEROFNODES;
|
extern int NUMBEROFNODES;
|
||||||
|
|
||||||
|
struct CMDX
|
||||||
|
{
|
||||||
|
char String[12]; // COMMAND STRING
|
||||||
|
UCHAR CMDLEN; // SIGNIFICANT LENGTH
|
||||||
|
// VOID (*CMDPROC)(struct _TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);// COMMAND PROCESSOR
|
||||||
|
VOID (*CMDPROC)();// COMMAND PROCESSOR
|
||||||
|
size_t CMDFLAG; // FLAG/VALUE Offset
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
struct APPLCONFIG
|
struct APPLCONFIG
|
||||||
{
|
{
|
||||||
|
@ -222,12 +231,11 @@ typedef struct ROUTE
|
||||||
int LastConnectAttempt; // To stop us trying too often
|
int LastConnectAttempt; // To stop us trying too often
|
||||||
|
|
||||||
int Status; //
|
int Status; //
|
||||||
int OldBPQ; // Set if other end is BPQ sending RIF in mS
|
|
||||||
int LastRTT; // Last Value Reported
|
int LastRTT; // Last Value Reported
|
||||||
int RTT; // Current
|
int RTT; // Current
|
||||||
int SRTT; // Smoothed RTT
|
int SRTT; // Smoothed RTT
|
||||||
int NeighbourSRTT; // Other End SRTT
|
int NeighbourSRTT; // Other End SRTT
|
||||||
int RTTIncrement; // Average of Ours and Neighbours SRTT in 10 ms - smoothed neighbor transport time (SNTT) in spec
|
// int RTTIncrement; // Average of Ours and Neighbours SRTT in 10 ms
|
||||||
int BCTimer; // Time to next L3RTT Broadcast
|
int BCTimer; // Time to next L3RTT Broadcast
|
||||||
int Timeout; // Lost Response Timer
|
int Timeout; // Lost Response Timer
|
||||||
int Retries; // Lost Response Count
|
int Retries; // Lost Response Count
|
||||||
|
@ -236,8 +244,6 @@ typedef struct ROUTE
|
||||||
int OtherendsRouteQual; // Route quality used by other end.
|
int OtherendsRouteQual; // Route quality used by other end.
|
||||||
int OtherendLocked; // Route quality locked by ROUTES entry.
|
int OtherendLocked; // Route quality locked by ROUTES entry.
|
||||||
int FirstTimeFlag; // Set once quality has been set by direct receive
|
int FirstTimeFlag; // Set once quality has been set by direct receive
|
||||||
int RemoteMAXRTT; // For INP3
|
|
||||||
int RemoteMAXHOPS;
|
|
||||||
|
|
||||||
} *PROUTE;
|
} *PROUTE;
|
||||||
|
|
||||||
|
@ -695,8 +701,7 @@ typedef struct PORTCONTROL
|
||||||
BOOL NormalizeQuality; // Normalise Node Qualities
|
BOOL NormalizeQuality; // Normalise Node Qualities
|
||||||
BOOL IgnoreUnlocked; // Ignore Unlocked routes
|
BOOL IgnoreUnlocked; // Ignore Unlocked routes
|
||||||
BOOL INP3ONLY; // Default to INP3 and disallow NODES
|
BOOL INP3ONLY; // Default to INP3 and disallow NODES
|
||||||
BOOL ALLOWINP3; // Accept INP3 if offered by other end
|
BOOL ALLOWINP3;
|
||||||
BOOL ENABLEINP3; // Send INP3 RTT probes to discovered neighbours
|
|
||||||
|
|
||||||
void (* UIHook)(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffer, MESSAGE * ADJBUFFER, UCHAR CTL, UCHAR MSGFLAG); // Used for KISSARQ
|
void (* UIHook)(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffer, MESSAGE * ADJBUFFER, UCHAR CTL, UCHAR MSGFLAG); // Used for KISSARQ
|
||||||
struct PORTCONTROL * HookPort;
|
struct PORTCONTROL * HookPort;
|
||||||
|
@ -976,8 +981,6 @@ typedef struct _LINKTABLE
|
||||||
int Received;
|
int Received;
|
||||||
int ReceivedAfterExpansion;
|
int ReceivedAfterExpansion;
|
||||||
|
|
||||||
char ApplName[16];
|
|
||||||
|
|
||||||
|
|
||||||
} LINKTABLE;
|
} LINKTABLE;
|
||||||
|
|
||||||
|
@ -1469,16 +1472,6 @@ struct AXIPPORTINFO
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CMDX
|
|
||||||
{
|
|
||||||
char String[12]; // COMMAND STRING
|
|
||||||
UCHAR CMDLEN; // SIGNIFICANT LENGTH
|
|
||||||
VOID (*CMDPROC)(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);// COMMAND PROCESSOR
|
|
||||||
// VOID (*CMDPROC)();// COMMAND PROCESSOR
|
|
||||||
size_t CMDFLAG; // FLAG/VALUE Offset
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#define Disconnect(stream) SessionControl(stream,2,0)
|
#define Disconnect(stream) SessionControl(stream,2,0)
|
||||||
#define Connect(stream) SessionControl(stream,1,0)
|
#define Connect(stream) SessionControl(stream,1,0)
|
||||||
|
|
15
bpqaxip.c
15
bpqaxip.c
|
@ -192,8 +192,8 @@ extern UCHAR BPQDirectory[];
|
||||||
|
|
||||||
extern int OffsetH, OffsetW;
|
extern int OffsetH, OffsetW;
|
||||||
|
|
||||||
static void ResolveNames(VOID * Param);
|
static void ResolveNames(struct AXIPPORTINFO * PORT);
|
||||||
void OpenSockets(VOID * Param);
|
void OpenSockets(struct AXIPPORTINFO * PORT);
|
||||||
void CloseSockets(struct AXIPPORTINFO * PORT);
|
void CloseSockets(struct AXIPPORTINFO * PORT);
|
||||||
|
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ int KissDecode(UCHAR * inbuff, int len);
|
||||||
int Socket_Accept(int SocketId);
|
int Socket_Accept(int SocketId);
|
||||||
int Socket_Connect(int SocketId, int Error);
|
int Socket_Connect(int SocketId, int Error);
|
||||||
int Socket_Data(int sock, int error, int eventcode);
|
int Socket_Data(int sock, int error, int eventcode);
|
||||||
VOID TCPConnectThread(VOID * Param);
|
VOID TCPConnectThread(struct arp_table_entry * arp);
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
VOID __cdecl Consoleprintf(const char * format, ...);
|
VOID __cdecl Consoleprintf(const char * format, ...);
|
||||||
BOOL OpenListeningSocket(struct AXIPPORTINFO * PORT, struct arp_table_entry * arp);
|
BOOL OpenListeningSocket(struct AXIPPORTINFO * PORT, struct arp_table_entry * arp);
|
||||||
|
@ -844,9 +844,8 @@ int InitAXIP(int Port)
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenSockets(void * Param)
|
void OpenSockets(struct AXIPPORTINFO * PORT)
|
||||||
{
|
{
|
||||||
struct AXIPPORTINFO * PORT = (struct AXIPPORTINFO *)Param;
|
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
int err;
|
int err;
|
||||||
u_long param=1;
|
u_long param=1;
|
||||||
|
@ -1529,9 +1528,8 @@ static void CreateResolverWindow(struct AXIPPORTINFO * PORT)
|
||||||
extern HWND hWndPopup;
|
extern HWND hWndPopup;
|
||||||
|
|
||||||
|
|
||||||
static void ResolveNames(VOID * Param)
|
static void ResolveNames(struct AXIPPORTINFO * PORT)
|
||||||
{
|
{
|
||||||
struct AXIPPORTINFO * PORT = (struct AXIPPORTINFO *)Param;
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
PORT->ResolveNamesThreadId = GetCurrentThreadId(); // Detect if another started
|
PORT->ResolveNamesThreadId = GetCurrentThreadId(); // Detect if another started
|
||||||
|
@ -2998,9 +2996,8 @@ int KissDecode(UCHAR * inbuff, int len)
|
||||||
return txptr;
|
return txptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID TCPConnectThread(void * Param)
|
VOID TCPConnectThread(struct arp_table_entry * arp)
|
||||||
{
|
{
|
||||||
struct arp_table_entry * arp = (struct arp_table_entry *)Param;
|
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
int err, i;
|
int err, i;
|
||||||
u_long param=1;
|
u_long param=1;
|
||||||
|
|
35
cMain.c
35
cMain.c
|
@ -54,7 +54,6 @@ void MQTTTimer();
|
||||||
void SaveMH();
|
void SaveMH();
|
||||||
VOID InformPartner(struct _LINKTABLE * LINK, int Reason);
|
VOID InformPartner(struct _LINKTABLE * LINK, int Reason);
|
||||||
VOID L2SENDCOMMAND(struct _LINKTABLE * LINK, int CMD);
|
VOID L2SENDCOMMAND(struct _LINKTABLE * LINK, int CMD);
|
||||||
void WritePacketLogThread(void * param);
|
|
||||||
|
|
||||||
|
|
||||||
#include "configstructs.h"
|
#include "configstructs.h"
|
||||||
|
@ -62,7 +61,6 @@ void WritePacketLogThread(void * param);
|
||||||
extern struct CONFIGTABLE xxcfg;
|
extern struct CONFIGTABLE xxcfg;
|
||||||
extern BOOL needAIS;
|
extern BOOL needAIS;
|
||||||
extern int needADSB;
|
extern int needADSB;
|
||||||
extern int EnableOARCAPI;
|
|
||||||
|
|
||||||
struct PORTCONFIG * PortRec;
|
struct PORTCONFIG * PortRec;
|
||||||
|
|
||||||
|
@ -183,7 +181,6 @@ extern VOID * ENDPOOL;
|
||||||
extern void * APPL_Q; // Queue of frames for APRS Appl
|
extern void * APPL_Q; // Queue of frames for APRS Appl
|
||||||
|
|
||||||
extern BOOL APRSActive;
|
extern BOOL APRSActive;
|
||||||
extern int DEBUGINP3;
|
|
||||||
|
|
||||||
#define BPQHOSTSTREAMS 64
|
#define BPQHOSTSTREAMS 64
|
||||||
|
|
||||||
|
@ -197,12 +194,9 @@ BPQVECSTRUC * TELNETMONVECPTR = &BPQHOSTVECTOR[BPQHOSTSTREAMS];
|
||||||
BPQVECSTRUC * AGWMONVECPTR = &BPQHOSTVECTOR[BPQHOSTSTREAMS + 1];
|
BPQVECSTRUC * AGWMONVECPTR = &BPQHOSTVECTOR[BPQHOSTSTREAMS + 1];
|
||||||
BPQVECSTRUC * APRSMONVECPTR = &BPQHOSTVECTOR[BPQHOSTSTREAMS + 2];
|
BPQVECSTRUC * APRSMONVECPTR = &BPQHOSTVECTOR[BPQHOSTSTREAMS + 2];
|
||||||
BPQVECSTRUC * IPHOSTVECTORPTR = &BPQHOSTVECTOR[BPQHOSTSTREAMS + 3];
|
BPQVECSTRUC * IPHOSTVECTORPTR = &BPQHOSTVECTOR[BPQHOSTSTREAMS + 3];
|
||||||
BPQVECSTRUC * FILEMONVECTOR = &BPQHOSTVECTOR[BPQHOSTSTREAMS + 4];
|
|
||||||
|
|
||||||
int BPQVECLENGTH = sizeof(BPQVECSTRUC);
|
int BPQVECLENGTH = sizeof(BPQVECSTRUC);
|
||||||
|
|
||||||
int MONTOFILEFLAG = 0;
|
|
||||||
|
|
||||||
int NODEORDER = 0;
|
int NODEORDER = 0;
|
||||||
UCHAR LINKEDFLAG = 0;
|
UCHAR LINKEDFLAG = 0;
|
||||||
|
|
||||||
|
@ -256,8 +250,6 @@ int CFLAG = 0; // C =HOST Command
|
||||||
VOID * IDMSG_Q = NULL; // ID/BEACONS WAITING TO BE SENT
|
VOID * IDMSG_Q = NULL; // ID/BEACONS WAITING TO BE SENT
|
||||||
|
|
||||||
int NODESINPROGRESS = 0;
|
int NODESINPROGRESS = 0;
|
||||||
int NODESToOnePort = 0; // Set to port num to send NODES to only one port.
|
|
||||||
|
|
||||||
VOID * CURRENTNODE = NULL; // NEXT _NODE TO SEND
|
VOID * CURRENTNODE = NULL; // NEXT _NODE TO SEND
|
||||||
VOID * DESTHEADER = NULL; // HEAD OF SORTED NODES CHAIN
|
VOID * DESTHEADER = NULL; // HEAD OF SORTED NODES CHAIN
|
||||||
|
|
||||||
|
@ -870,11 +862,6 @@ BOOL Start()
|
||||||
|
|
||||||
PREFERINP3ROUTES = cfg->C_PREFERINP3ROUTES;
|
PREFERINP3ROUTES = cfg->C_PREFERINP3ROUTES;
|
||||||
|
|
||||||
if (cfg->C_DEBUGINP3)
|
|
||||||
DEBUGINP3 = 0;
|
|
||||||
|
|
||||||
EnableOARCAPI = cfg->C_OARCAPI;
|
|
||||||
|
|
||||||
if (cfg->C_OnlyVer2point0)
|
if (cfg->C_OnlyVer2point0)
|
||||||
SUPPORT2point2 = 0;
|
SUPPORT2point2 = 0;
|
||||||
|
|
||||||
|
@ -1005,7 +992,6 @@ BOOL Start()
|
||||||
PORT->IgnoreUnlocked = PortRec->IGNOREUNLOCKED;
|
PORT->IgnoreUnlocked = PortRec->IGNOREUNLOCKED;
|
||||||
PORT->INP3ONLY = PortRec->INP3ONLY;
|
PORT->INP3ONLY = PortRec->INP3ONLY;
|
||||||
PORT->ALLOWINP3 = PortRec->AllowINP3;
|
PORT->ALLOWINP3 = PortRec->AllowINP3;
|
||||||
PORT->ENABLEINP3 = PortRec->EnableINP3;
|
|
||||||
|
|
||||||
PORT->PORTWINDOW = (UCHAR)PortRec->MAXFRAME;
|
PORT->PORTWINDOW = (UCHAR)PortRec->MAXFRAME;
|
||||||
|
|
||||||
|
@ -1578,10 +1564,6 @@ BOOL Start()
|
||||||
|
|
||||||
upnpInit();
|
upnpInit();
|
||||||
|
|
||||||
// Start Monitor to file thread
|
|
||||||
|
|
||||||
_beginthread(WritePacketLogThread, 0, NULL);
|
|
||||||
|
|
||||||
lastSaveSecs = CurrentSecs = lastSlowSecs = time(NULL);
|
lastSaveSecs = CurrentSecs = lastSlowSecs = time(NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2532,9 +2514,9 @@ ENDOFLIST:
|
||||||
{
|
{
|
||||||
// Stuck link debug check
|
// Stuck link debug check
|
||||||
|
|
||||||
if (LINK->LINKWINDOW == 0 || LINK->LASTFRAMESENT == 0 || (time(NULL) - LINK->LASTFRAMESENT) > 60) // No send for 60 secs
|
if (LINK->LASTFRAMESENT && (time(NULL) - LINK->LASTFRAMESENT) > 60) // No send for 60 secs
|
||||||
{
|
{
|
||||||
if (COUNT_AT_L2(LINK) > 16 || LINK->LINKWINDOW == 0)
|
if (COUNT_AT_L2(LINK) > 16)
|
||||||
{
|
{
|
||||||
// Dump Link State
|
// Dump Link State
|
||||||
|
|
||||||
|
@ -2693,19 +2675,6 @@ int BPQTRACE(MESSAGE * Msg, BOOL TOAPRS)
|
||||||
L4++;
|
L4++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// And to the Monitor to File system.
|
|
||||||
|
|
||||||
|
|
||||||
if (MONTOFILEFLAG) // Trace Enabled?
|
|
||||||
{
|
|
||||||
Buffer = GetBuff();
|
|
||||||
if (Buffer)
|
|
||||||
{
|
|
||||||
memcpy(&Buffer->PORT, &Msg->PORT, BUFFLEN - sizeof(void *)); // Dont copy chain word
|
|
||||||
C_Q_ADD(&FILEMONVECTOR->HOSTTRACEQ, Buffer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
38
compatbits.h
38
compatbits.h
|
@ -49,39 +49,7 @@ Stuff to make compiling on WINDOWS and LINUX easier
|
||||||
|
|
||||||
int pthread_equal(pthread_t T1, pthread_t T2);
|
int pthread_equal(pthread_t T1, pthread_t T2);
|
||||||
|
|
||||||
uintptr_t _beginthread(void(__cdecl start_address)(void *), unsigned stack_size, void *arglist);
|
uintptr_t _beginthread(void(__cdecl *start_address)(void *), unsigned stack_size, void *arglist);
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
|
||||||
|
|
||||||
#define snprintf c99_snprintf
|
|
||||||
#define vsnprintf c99_vsnprintf
|
|
||||||
|
|
||||||
__inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
|
|
||||||
{
|
|
||||||
int count = -1;
|
|
||||||
|
|
||||||
if (size != 0)
|
|
||||||
count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);
|
|
||||||
if (count == -1)
|
|
||||||
count = _vscprintf(format, ap);
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline int c99_snprintf(char *outBuf, size_t size, const char *format, ...)
|
|
||||||
{
|
|
||||||
int count;
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start(ap, format);
|
|
||||||
count = c99_vsnprintf(outBuf, size, format, ap);
|
|
||||||
va_end(ap);
|
|
||||||
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -184,7 +152,9 @@ int stricmp(const unsigned char * pStr1, const unsigned char *pStr2);
|
||||||
char * strupr(char* s);
|
char * strupr(char* s);
|
||||||
char * strlwr(char* s);
|
char * strlwr(char* s);
|
||||||
|
|
||||||
pthread_t _beginthread(void(start_address)(void *), unsigned stack_size, VOID * arglist);
|
pthread_t _beginthread(void(*start_address)(), unsigned stack_size, VOID * arglist);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define WSAGetLastError() errno
|
#define WSAGetLastError() errno
|
||||||
#define GetLastError() errno
|
#define GetLastError() errno
|
||||||
|
|
17
config.c
17
config.c
|
@ -309,7 +309,7 @@ static char *keywords[] =
|
||||||
"LogL4Connects", "LogAllConnects", "SAVEMH", "ENABLEADIFLOG", "ENABLEEVENTS", "SAVEAPRSMSGS",
|
"LogL4Connects", "LogAllConnects", "SAVEMH", "ENABLEADIFLOG", "ENABLEEVENTS", "SAVEAPRSMSGS",
|
||||||
"EnableM0LTEMap", "MQTT", "MQTT_HOST", "MQTT_PORT", "MQTT_USER", "MQTT_PASS",
|
"EnableM0LTEMap", "MQTT", "MQTT_HOST", "MQTT_PORT", "MQTT_USER", "MQTT_PASS",
|
||||||
"L4Compress", "L4CompMaxframe", "L4CompPaclen", "L2Compress", "L2CompMaxframe",
|
"L4Compress", "L4CompMaxframe", "L4CompPaclen", "L2Compress", "L2CompMaxframe",
|
||||||
"L2CompPaclen", "PREFERINP3ROUTES", "OnlyVer2point0", "DEBUGINP3", "ENABLEOARCAPI"
|
"L2CompPaclen", "PREFERINP3ROUTES", "OnlyVer2point0"
|
||||||
}; /* parameter keywords */
|
}; /* parameter keywords */
|
||||||
|
|
||||||
static void * offset[] =
|
static void * offset[] =
|
||||||
|
@ -332,7 +332,7 @@ static void * offset[] =
|
||||||
&xxcfg.C_LogL4Connects, &xxcfg.C_LogAllConnects, &xxcfg.C_SaveMH, &xxcfg.C_ADIF, &xxcfg.C_EVENTS, &xxcfg.C_SaveAPRSMsgs,
|
&xxcfg.C_LogL4Connects, &xxcfg.C_LogAllConnects, &xxcfg.C_SaveMH, &xxcfg.C_ADIF, &xxcfg.C_EVENTS, &xxcfg.C_SaveAPRSMsgs,
|
||||||
&xxcfg.C_M0LTEMap, &xxcfg.C_MQTT, &xxcfg.C_MQTT_HOST, &xxcfg.C_MQTT_PORT, &xxcfg.C_MQTT_USER, &xxcfg.C_MQTT_PASS,
|
&xxcfg.C_M0LTEMap, &xxcfg.C_MQTT, &xxcfg.C_MQTT_HOST, &xxcfg.C_MQTT_PORT, &xxcfg.C_MQTT_USER, &xxcfg.C_MQTT_PASS,
|
||||||
&xxcfg.C_L4Compress, &xxcfg.C_L4CompMaxframe, &xxcfg.C_L4CompPaclen, &xxcfg.C_L2Compress, &xxcfg.C_L2CompMaxframe,
|
&xxcfg.C_L4Compress, &xxcfg.C_L4CompMaxframe, &xxcfg.C_L4CompPaclen, &xxcfg.C_L2Compress, &xxcfg.C_L2CompMaxframe,
|
||||||
&xxcfg.C_L2CompPaclen, &xxcfg.C_PREFERINP3ROUTES, &xxcfg.C_OnlyVer2point0, &xxcfg.C_DEBUGINP3, &xxcfg.C_OARCAPI}; /* offset for corresponding data in config file */
|
&xxcfg.C_L2CompPaclen, &xxcfg.C_PREFERINP3ROUTES, &xxcfg.C_OnlyVer2point0}; /* offset for corresponding data in config file */
|
||||||
|
|
||||||
static int routine[] =
|
static int routine[] =
|
||||||
{
|
{
|
||||||
|
@ -354,7 +354,7 @@ static int routine[] =
|
||||||
2, 2, 1, 2, 2, 2,
|
2, 2, 1, 2, 2, 2,
|
||||||
2, 2, 0, 1, 20, 20,
|
2, 2, 0, 1, 20, 20,
|
||||||
1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1,
|
||||||
1, 1, 1, 1, 1}; // Routine to process param
|
1, 1, 1} ; // Routine to process param
|
||||||
|
|
||||||
int PARAMLIM = sizeof(routine)/sizeof(int);
|
int PARAMLIM = sizeof(routine)/sizeof(int);
|
||||||
//int NUMBEROFKEYWORDS = sizeof(routine)/sizeof(int);
|
//int NUMBEROFKEYWORDS = sizeof(routine)/sizeof(int);
|
||||||
|
@ -376,7 +376,7 @@ static char *pkeywords[] =
|
||||||
"BCALL", "DIGIMASK", "NOKEEPALIVES", "COMPORT", "DRIVER", "WL2KREPORT", "UIONLY",
|
"BCALL", "DIGIMASK", "NOKEEPALIVES", "COMPORT", "DRIVER", "WL2KREPORT", "UIONLY",
|
||||||
"UDPPORT", "IPADDR", "I2CBUS", "I2CDEVICE", "UDPTXPORT", "UDPRXPORT", "NONORMALIZE",
|
"UDPPORT", "IPADDR", "I2CBUS", "I2CDEVICE", "UDPTXPORT", "UDPRXPORT", "NONORMALIZE",
|
||||||
"IGNOREUNLOCKEDROUTES", "INP3ONLY", "TCPPORT", "RIGPORT", "PERMITTEDAPPLS", "HIDE",
|
"IGNOREUNLOCKEDROUTES", "INP3ONLY", "TCPPORT", "RIGPORT", "PERMITTEDAPPLS", "HIDE",
|
||||||
"SMARTID", "KISSCOMMAND", "SendtoM0LTEMap", "PortFreq", "M0LTEMapInfo", "QTSMPort", "ALLOWINP3", "ENABLEINP3"}; /* parameter keywords */
|
"SMARTID", "KISSCOMMAND", "SendtoM0LTEMap", "PortFreq", "M0LTEMapInfo", "QTSMPort", "ALLOWINP3"}; /* parameter keywords */
|
||||||
|
|
||||||
static void * poffset[] =
|
static void * poffset[] =
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ static void * poffset[] =
|
||||||
&xxp.BCALL, &xxp.DIGIMASK, &xxp.DefaultNoKeepAlives, &xxp.IOADDR, &xxp.DLLNAME, &xxp.WL2K, &xxp.UIONLY,
|
&xxp.BCALL, &xxp.DIGIMASK, &xxp.DefaultNoKeepAlives, &xxp.IOADDR, &xxp.DLLNAME, &xxp.WL2K, &xxp.UIONLY,
|
||||||
&xxp.IOADDR, &xxp.IPADDR, &xxp.INTLEVEL, &xxp.IOADDR, &xxp.IOADDR, &xxp.ListenPort, &xxp.NoNormalize,
|
&xxp.IOADDR, &xxp.IPADDR, &xxp.INTLEVEL, &xxp.IOADDR, &xxp.IOADDR, &xxp.ListenPort, &xxp.NoNormalize,
|
||||||
&xxp.IGNOREUNLOCKED, &xxp.INP3ONLY, &xxp.TCPPORT, &xxp.RIGPORT, &xxp.PERMITTEDAPPLS, &xxp.Hide,
|
&xxp.IGNOREUNLOCKED, &xxp.INP3ONLY, &xxp.TCPPORT, &xxp.RIGPORT, &xxp.PERMITTEDAPPLS, &xxp.Hide,
|
||||||
&xxp.SmartID, &xxp.KissParams, &xxp.SendtoM0LTEMap, &xxp.PortFreq, &xxp.M0LTEMapInfo, &xxp.QtSMPort, &xxp.AllowINP3, &xxp.EnableINP3}; /* offset for corresponding data in config file */
|
&xxp.SmartID, &xxp.KissParams, &xxp.SendtoM0LTEMap, &xxp.PortFreq, &xxp.M0LTEMapInfo, &xxp.QtSMPort, &xxp.AllowINP3}; /* offset for corresponding data in config file */
|
||||||
|
|
||||||
static int proutine[] =
|
static int proutine[] =
|
||||||
{
|
{
|
||||||
|
@ -404,7 +404,7 @@ static int proutine[] =
|
||||||
0, 1, 2, 18, 15, 16, 2,
|
0, 1, 2, 18, 15, 16, 2,
|
||||||
1, 17, 1, 1, 1, 1, 2,
|
1, 17, 1, 1, 1, 1, 2,
|
||||||
2, 2, 1, 1, 19, 2,
|
2, 2, 1, 1, 19, 2,
|
||||||
1, 20, 1, 21, 22, 1, 1, 1}; /* routine to process parameter */
|
1, 20, 1, 21, 22, 1, 1}; /* routine to process parameter */
|
||||||
|
|
||||||
int PPARAMLIM = sizeof(proutine)/sizeof(int);
|
int PPARAMLIM = sizeof(proutine)/sizeof(int);
|
||||||
|
|
||||||
|
@ -601,6 +601,7 @@ BOOL ProcessConfig()
|
||||||
|
|
||||||
|
|
||||||
for (i=0;i<24;i++)
|
for (i=0;i<24;i++)
|
||||||
|
|
||||||
paramok[45+i]=1; /* or APPLCALLS, APPLALIASS APPLQUAL */
|
paramok[45+i]=1; /* or APPLCALLS, APPLALIASS APPLQUAL */
|
||||||
|
|
||||||
paramok[69]=1; // BText optional
|
paramok[69]=1; // BText optional
|
||||||
|
@ -629,9 +630,7 @@ BOOL ProcessConfig()
|
||||||
paramok[90]=1; // L2Compress Maxframe
|
paramok[90]=1; // L2Compress Maxframe
|
||||||
paramok[91]=1; // L2Compress Paclen
|
paramok[91]=1; // L2Compress Paclen
|
||||||
paramok[92]=1; // PREFERINP3ROUTES
|
paramok[92]=1; // PREFERINP3ROUTES
|
||||||
paramok[93]=1; // ONLYVer2point0
|
paramok[93]=1; // C_ONLYVer2point0
|
||||||
paramok[94]=1; // DEBUGINP3
|
|
||||||
paramok[95]=1; // EnableOARCAPI
|
|
||||||
|
|
||||||
for (i=0; i < PARAMLIM; i++)
|
for (i=0; i < PARAMLIM; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -82,7 +82,6 @@ struct PORTCONFIG
|
||||||
char * M0LTEMapInfo;
|
char * M0LTEMapInfo;
|
||||||
int QtSMPort;
|
int QtSMPort;
|
||||||
int AllowINP3;
|
int AllowINP3;
|
||||||
int EnableINP3;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ROUTECONFIG
|
struct ROUTECONFIG
|
||||||
|
@ -180,8 +179,6 @@ struct CONFIGTABLE
|
||||||
int C_L2CompPaclen;
|
int C_L2CompPaclen;
|
||||||
int C_PREFERINP3ROUTES;
|
int C_PREFERINP3ROUTES;
|
||||||
int C_OnlyVer2point0;
|
int C_OnlyVer2point0;
|
||||||
int C_DEBUGINP3;
|
|
||||||
int C_OARCAPI;
|
|
||||||
|
|
||||||
|
|
||||||
//#define ApplOffset 80000 // Applications offset in config buffer
|
//#define ApplOffset 80000 // Applications offset in config buffer
|
||||||
|
|
|
@ -35,9 +35,6 @@ int RFOnly = 0;
|
||||||
|
|
||||||
int MAXRTT = 9000; // 90 secs
|
int MAXRTT = 9000; // 90 secs
|
||||||
int MaxHops = 4;
|
int MaxHops = 4;
|
||||||
int DEBUGINP3 = 0;
|
|
||||||
|
|
||||||
int EnableOARCAPI = 0;
|
|
||||||
|
|
||||||
int RTTInterval = 24; // 4 Minutes
|
int RTTInterval = 24; // 4 Minutes
|
||||||
|
|
||||||
|
|
11
debian/NEWS
vendored
11
debian/NEWS
vendored
|
@ -1,11 +0,0 @@
|
||||||
linbpq (6.0.24.22-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
This is quite a big update, with config moving from /opt/oarc/bpq/bpq32.cfg to
|
|
||||||
/etc/bpq32.cfg. The system shall do this automatically for you, however
|
|
||||||
computers and their programmers are not perfect.
|
|
||||||
|
|
||||||
I strongly recommend at this point backing up your entire
|
|
||||||
/opt/oarc/bpq/ directory (cp -r /opt/oarc/bpq/ ~/bpq-backup/) before
|
|
||||||
proceeding with the upgrade
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Sat, 16 Dec 2023 13:30:06 +0000
|
|
23
debian/README.Debian
vendored
23
debian/README.Debian
vendored
|
@ -1,23 +0,0 @@
|
||||||
README for linbpq on Debian
|
|
||||||
===========================
|
|
||||||
|
|
||||||
Please see https://wiki.oarc.uk/packet:linbpq-apt-installation for this guide
|
|
||||||
|
|
||||||
# Set config
|
|
||||||
Copy the config, edit it & set permissions.
|
|
||||||
The permissions are so linbpq web interface can edit the config.
|
|
||||||
|
|
||||||
sudo mv /usr/share/doc/linbpq/examples/bpq32.cfg /etc/bpq32.cfg
|
|
||||||
sudo nano /etc/bpq32.cfg
|
|
||||||
sudo chown :linbpq /etc/bpq32.cfg
|
|
||||||
sudo chmod 644 /etc/bpq32.cfg
|
|
||||||
|
|
||||||
# Start linbpq
|
|
||||||
|
|
||||||
sudo systemctl start linbpq
|
|
||||||
|
|
||||||
# Access your node
|
|
||||||
|
|
||||||
It shall be available by accessing http://localhost:8008 in the browser or telnet localhost 8010
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 26 Mar 2024 00:53:42 +0000
|
|
50
debian/bpq32.cfg
vendored
50
debian/bpq32.cfg
vendored
|
@ -1,50 +0,0 @@
|
||||||
SIMPLE
|
|
||||||
NODECALL=MB7NAA
|
|
||||||
NODEALIAS=AANODE
|
|
||||||
LOCATOR=AA00aa
|
|
||||||
PASSWORD=xxxxxxxx
|
|
||||||
AUTOSAVE=1
|
|
||||||
NODESINTERVAL=10
|
|
||||||
MINQUAL=10
|
|
||||||
CTEXT:
|
|
||||||
Thanks for connecting.
|
|
||||||
Type ? for help.
|
|
||||||
***
|
|
||||||
PORT
|
|
||||||
PORTNUM=1
|
|
||||||
ID=VHF
|
|
||||||
TYPE=ASYNC
|
|
||||||
PROTOCOL=KISS
|
|
||||||
KISSOPTIONS=ACKMODE
|
|
||||||
COMPORT=/dev/ttyACM0
|
|
||||||
SPEED=57600
|
|
||||||
FRACK=4000
|
|
||||||
PACLEN=150
|
|
||||||
DIGIFLAG=0
|
|
||||||
QUALITY=192
|
|
||||||
MINQUAL=20
|
|
||||||
ENDPORT
|
|
||||||
|
|
||||||
|
|
||||||
PORT
|
|
||||||
PORTNUM=9
|
|
||||||
ID=Telnet
|
|
||||||
DRIVER=Telnet
|
|
||||||
CONFIG
|
|
||||||
LOGGING=1
|
|
||||||
CMS=1
|
|
||||||
DisconnectOnClose=1
|
|
||||||
SECURETELNET=1
|
|
||||||
TCPPORT=8010
|
|
||||||
FBBPORT=8011
|
|
||||||
HTTPPORT=8008
|
|
||||||
LOGINPROMPT=user:
|
|
||||||
PASSWORDPROMPT=password:
|
|
||||||
MAXSESSIONS=10
|
|
||||||
CTEXT=Thanks for connecting\n Enter ? for list of commands\n\n
|
|
||||||
USER=username,xxxxxxxx,m0aaa,,SYSOP
|
|
||||||
ENDPORT
|
|
||||||
|
|
||||||
LINCHAT
|
|
||||||
|
|
||||||
APPLICATION 2,CHAT,,MB7NAA-9,AACHAT,255
|
|
317
debian/changelog
vendored
317
debian/changelog
vendored
|
@ -1,317 +0,0 @@
|
||||||
linbpq (6.0.25.06+repack-2~hibbian13+1) UNRELEASED; urgency=medium
|
|
||||||
|
|
||||||
* Build on latest gcc standards
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 10 Oct 2025 23:55:05 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.25.06+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 6.0.25.06+repack
|
|
||||||
* MINI_BUILDD_OPTION: auto-ports=trixie-packetrepo-unstable,bookworm-packetrepo-unstable,bullseye-packetrepo-unstable,noble-packetrepo-unstable,jammy-packetrepo-unstable
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 10 Oct 2025 23:42:04 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.25.1+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 6.0.25.1+repack
|
|
||||||
* MINI_BUILDD_OPTION: auto-ports=trixie-packetrepo-unstable,bookworm-packetrepo-unstable,bullseye-packetrepo-unstable,noble-packetrepo-unstable,jammy-packetrepo-unstable
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Sat, 20 Sep 2025 15:43:32 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.82+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 6.0.24.82+repack
|
|
||||||
* MINI_BUILDD_OPTION: auto-ports=trixie-packetrepo-unstable,bookworm-packetrepo-unstable,bullseye-packetrepo-unstable,noble-packetrepo-unstable,jammy-packetrepo-unstable
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Sun, 17 Aug 2025 22:36:49 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.78+repack-1~hibbian~TRIXIE+1) trixie-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream
|
|
||||||
* New files excluded
|
|
||||||
- No binaries in this release at all maybe!
|
|
||||||
* MINI_BUILDD_OPTION: auto-ports=trixie-packetrepo-unstable,bookworm-packetrepo-unstable,bullseye-packetrepo-unstable,noble-packetrepo-unstable,jammy-packetrepo-unstable
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Thu, 31 Jul 2025 01:31:38 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.77+repack-1~hibbian~TRIXIE+1) trixie-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 6.0.24.77+repack
|
|
||||||
* MINI_BUILDD_OPTION: auto-ports=trixie-packetrepo-unstable,bookworm-packetrepo-unstable,bullseye-packetrepo-unstable,noble-packetrepo-unstable,jammy-packetrepo-unstable
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 22 Jul 2025 21:46:13 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.75+repack-1~hibbian~TRIXIE+2) trixie-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* First trixie release
|
|
||||||
* Drop hard-dep on hibbian-archive-keyring
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Wed, 16 Jul 2025 19:10:33 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.75+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 6.0.25.75+repack
|
|
||||||
* MINI_BUILDD_OPTION: auto-ports=trixie-packetrepo-unstable,bookworm-packetrepo-unstable,bullseye-packetrepo-unstable,noble-packetrepo-unstable,jammy-packetrepo-unstable
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 15 Jul 2025 01:10:43 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.71+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 6.0.24.67+repack
|
|
||||||
* New upstream version 6.0.24.69+repack
|
|
||||||
* New upstream version 6.0.24.69.1+repack
|
|
||||||
* New upstream version 6.0.24.71+repack
|
|
||||||
* Okay that's a lot of updates.
|
|
||||||
* Refreshed d/p/makefile to reflect new CFLAG
|
|
||||||
* MINI_BUILDD_OPTION: auto-ports=trixie-packetrepo-unstable,bookworm-packetrepo-unstable,bullseye-packetrepo-unstable,noble-packetrepo-unstable,jammy-packetrepo-unstable
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Wed, 21 May 2025 21:45:59 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.66+repack-1~hibbian+2) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* Update postinst script to be a little quieter
|
|
||||||
* MINI_BUILDD_OPTION:
|
|
||||||
auto-ports=trixie-packetrepo-unstable,bookworm-packetrepo-unstable,bullseye-packetrepo-unstable,noble-packetrepo-unstable,jammy-packetrepo-unstable
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 11 Mar 2025 00:51:35 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.66+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream version 6.0.24.66+repack
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 04 Mar 2025 22:50:09 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.65+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 25 Feb 2025 09:33:24 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.59a+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream
|
|
||||||
* Little tweaks to makefile patch to account for new -rdynamic
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Mon, 03 Feb 2025 22:32:11 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.56+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Mon, 06 Jan 2025 21:37:44 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.55+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream
|
|
||||||
* d/rules
|
|
||||||
- Increased hardening
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Sun, 05 Jan 2025 23:35:06 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.54+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream
|
|
||||||
* Drop AGW Patch
|
|
||||||
* Drop Spelling Patch
|
|
||||||
* Drop Dynamic Links patch
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 17 Dec 2024 16:46:05 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.53+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream
|
|
||||||
- Patches refreshed
|
|
||||||
- dropped some edits in ftbfs-gcc14
|
|
||||||
- dropped d/patches/headers.patch
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 03 Dec 2024 00:57:57 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.52+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream
|
|
||||||
- Patches happy
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Sat, 30 Nov 2024 21:47:17 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.51.1+repack-1~hibbian+2) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* Iron out an issue with time...
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 29 Nov 2024 19:57:28 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.51.1+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream import after bug report
|
|
||||||
* Roll back some ftbfs-gcc14 edits
|
|
||||||
* Remove some more lib headers
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 29 Nov 2024 19:30:22 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.51+repack-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream import
|
|
||||||
- Patches refreshed
|
|
||||||
* Upstream is now repacked to include less files
|
|
||||||
* Big build system review, now using Debian CFLAGS and LDFLAGS
|
|
||||||
- Hardening enabled, mostly
|
|
||||||
- A debug symbols package is now available
|
|
||||||
* Oh yeah, everything is now dynamic linking
|
|
||||||
- libpng
|
|
||||||
- libpaho-mqtt
|
|
||||||
- libjansson
|
|
||||||
- libminiupnpc
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 29 Nov 2024 13:08:38 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.50-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream import
|
|
||||||
* Files excluded at origtargz generation time for cleanliness
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 12 Nov 2024 21:56:38 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.49-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream import
|
|
||||||
* Patches refreshed
|
|
||||||
* Add mqtt requirements
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 05 Nov 2024 21:52:29 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.45-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream import
|
|
||||||
* Patches refreshed
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 11 Oct 2024 15:48:41 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.42-1~hibbian+3) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* 32bit build error
|
|
||||||
- Patch updated to fix hopefully
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 30 Aug 2024 12:21:57 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.42-1~hibbian+2) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* Forgot to fix the ninotnc-smt issue, fixed now
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 30 Aug 2024 12:05:54 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.42-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
|
||||||
|
|
||||||
* Install config to /etc
|
|
||||||
* New upstream update
|
|
||||||
* Patches refreshed
|
|
||||||
* Debian hardening enabled
|
|
||||||
- 2 new patches created that touch almost every file
|
|
||||||
- Considered experimental.
|
|
||||||
- gcc14 builds for Debian Trixie!
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 30 Aug 2024 10:15:11 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.40-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Fresh upstream release
|
|
||||||
- Patches refreshed
|
|
||||||
* Secure by default patch
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Sun, 07 Jul 2024 16:09:28 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.38-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream
|
|
||||||
* Tweak config file per recommendation from 2M0MQN to make first start simple
|
|
||||||
* Bump standards to 4.7.0.0
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Sun, 09 Jun 2024 22:38:40 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.34-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Fix config permissions bug as reported by Alex 2E1PKY
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Mon, 08 Apr 2024 22:27:02 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.34-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Upstream bump
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Sat, 06 Apr 2024 02:15:28 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.33-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Upstream bump
|
|
||||||
* Moved config file to examples
|
|
||||||
* Updated service to fail on no config
|
|
||||||
* Added helpful README.Debian
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 26 Mar 2024 20:24:08 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.30-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Upstream bump
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Fri, 23 Feb 2024 23:24:46 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.29-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Upstream bump
|
|
||||||
* Added my new details
|
|
||||||
* Tidied up some packaging errors
|
|
||||||
|
|
||||||
-- Dave Hibberd <hibby@debian.org> Tue, 13 Feb 2024 00:06:33 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.27-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Permissions fix for web-config-editor users
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Thu, 18 Jan 2024 10:31:56 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.27-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream Release
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Tue, 16 Jan 2024 20:51:43 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.25-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream Release
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Thu, 28 Dec 2023 10:44:47 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.22-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Moved config file home, caused chaos
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Sat, 16 Dec 2023 14:40:20 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.22-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream Release
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Fri, 08 Dec 2023 12:29:40 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.16-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New Upstream release
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Tue, 31 Oct 2023 22:50:01 +0000
|
|
||||||
|
|
||||||
linbpq (6.0.24.15-2) unstable; urgency=medium
|
|
||||||
|
|
||||||
* debian/conffiles introduced to stop linbpq overwriting config files
|
|
||||||
- Thanks to Mark 2M0IIG for raising concern about this bug!
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Sun, 15 Oct 2023 21:45:24 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.15-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* New upstream release
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Tue, 10 Oct 2023 22:19:48 +0100
|
|
||||||
|
|
||||||
linbpq (6.0.24.2-1) unstable; urgency=medium
|
|
||||||
|
|
||||||
* Initial release.
|
|
||||||
|
|
||||||
-- Dave Hibberd <d@vehibberd.com> Mon, 28 Aug 2023 23:20:45 +0100
|
|
20
debian/control
vendored
20
debian/control
vendored
|
@ -1,20 +0,0 @@
|
||||||
Source: linbpq
|
|
||||||
Section: hamradio
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: Dave Hibberd <hibby@debian.org>
|
|
||||||
Standards-Version: 4.7.2
|
|
||||||
Vcs-Browser: https://git.hibbian.org/Hibbian/linbpq
|
|
||||||
Vcs-Git: https://git.hibbian.org/Hibbian/linbpq.git
|
|
||||||
Homepage: https://www.cantab.net/users/john.wiseman/Documents/
|
|
||||||
Build-Depends: debhelper-compat (= 13)
|
|
||||||
Build-Depends-Arch: libssl-dev, libminiupnpc-dev, libpcap-dev, libconfig-dev, zlib1g-dev, libpaho-mqtt-dev, libjansson-dev, libpng-dev
|
|
||||||
Rules-Requires-Root: no
|
|
||||||
|
|
||||||
Package: linbpq
|
|
||||||
Architecture: linux-any
|
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
|
|
||||||
Description: Packet node and ax25 stack
|
|
||||||
LINBPQ is a Linux version of the BPQ32 Node, BBS and Chat Server components.
|
|
||||||
It is actively developed by John G8BPQ and contains a complete, independent
|
|
||||||
implementation of ax.25 and net/rom as well as BBS and Chat applications and
|
|
||||||
can be used either as a packet switch or as a full featured node.
|
|
37
debian/copyright
vendored
37
debian/copyright
vendored
|
@ -1,37 +0,0 @@
|
||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
||||||
Upstream-Name: linBPQ
|
|
||||||
Upstream-Contact: John Wiseman G8BPQ <john.wiseman@cantab.net>
|
|
||||||
Source: https://www.cantab.net/users/john.wiseman/Documents/
|
|
||||||
Files-Excluded: *.vcproj* *.bak *.lib *.dll *.wav *.asm *.vcxproj* *.pdb *.exe
|
|
||||||
.gitignore XAprs zlib.h zconf.h MQTT* pcap.h miniupnpc.h upnpdev.h
|
|
||||||
igd_desc_parse.h upnpcommands.h upnperrors.h miniupnpctypes.h
|
|
||||||
*.svn-base *.db *.obj
|
|
||||||
|
|
||||||
Files: *
|
|
||||||
Copyright: 1990-2025 John Wiseman G8BPQ <john.wiseman@cantab.net>
|
|
||||||
License: GPL-3
|
|
||||||
|
|
||||||
Files: debian/*
|
|
||||||
Copyright: 2016-2025 Dave Hibberd <d@vehibberd.com>
|
|
||||||
License: GPL-3
|
|
||||||
|
|
||||||
Files: debian/linbpq.service
|
|
||||||
Copyright: 2024-2025 Tom Fanning M0LTE
|
|
||||||
License: GPL-3
|
|
||||||
|
|
||||||
License: GPL-3
|
|
||||||
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
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
.
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
.
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
.
|
|
||||||
The GPL License which applies to this package can be found on your Debian
|
|
||||||
system at /usr/share/common-licenses/GPL-3.
|
|
2
debian/dirs
vendored
2
debian/dirs
vendored
|
@ -1,2 +0,0 @@
|
||||||
usr/sbin
|
|
||||||
opt/oarc/bpq
|
|
3
debian/gbp.conf
vendored
3
debian/gbp.conf
vendored
|
@ -1,3 +0,0 @@
|
||||||
[DEFAULT]
|
|
||||||
debian-branch = hibbian/latest
|
|
||||||
upstream-branch = upstream/latest
|
|
6
debian/gitlab-ci.yml
vendored
6
debian/gitlab-ci.yml
vendored
|
@ -1,6 +0,0 @@
|
||||||
include:
|
|
||||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
|
|
||||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
|
|
||||||
|
|
||||||
reprotest:
|
|
||||||
extends: .test-reprotest-diffoscope
|
|
1
debian/install
vendored
1
debian/install
vendored
|
@ -1 +0,0 @@
|
||||||
debian/bpq32.cfg etc/
|
|
1
debian/linbpq.examples
vendored
1
debian/linbpq.examples
vendored
|
@ -1 +0,0 @@
|
||||||
debian/bpq32.cfg
|
|
14
debian/linbpq.service
vendored
14
debian/linbpq.service
vendored
|
@ -1,14 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Linbpq systemd service file
|
|
||||||
After=network.target
|
|
||||||
ConditionPathExists=/etc/bpq32.cfg
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/sbin/linbpq -c /etc -d /opt/oarc/bpq -l /opt/oarc/bpq
|
|
||||||
WorkingDirectory=/opt/oarc/bpq
|
|
||||||
Restart=always
|
|
||||||
User=linbpq
|
|
||||||
Group=linbpq
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
11
debian/lintian-overrides
vendored
11
debian/lintian-overrides
vendored
|
@ -1,11 +0,0 @@
|
||||||
# weirdness from oarc packaging
|
|
||||||
linbpq: dir-or-file-in-opt [opt/oarc/]
|
|
||||||
linbpq: dir-or-file-in-opt [opt/oarc/bpq/]
|
|
||||||
# i know!
|
|
||||||
linbpq: no-manual-page [usr/sbin/linbpq]
|
|
||||||
# Directory is populated on first run
|
|
||||||
linbpq: package-contains-empty-directory [opt/oarc/bpq/]
|
|
||||||
# Code convenience
|
|
||||||
linbpq: spelling-error-in-binary Dont Don't [usr/sbin/linbpq]
|
|
||||||
linbpq: spelling-error-in-binary Paramters Parameters [usr/sbin/linbpq]
|
|
||||||
linbpq: spelling-error-in-binary lon long [usr/sbin/linbpq]
|
|
57
debian/patches/makefile
vendored
57
debian/patches/makefile
vendored
|
@ -1,57 +0,0 @@
|
||||||
From: Dave Hibberd <hibby@debian.org>
|
|
||||||
Date: Sat, 20 Sep 2025 15:42:15 +0100
|
|
||||||
Subject: makefile
|
|
||||||
|
|
||||||
---
|
|
||||||
makefile | 22 ++++++++++------------
|
|
||||||
1 file changed, 10 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/makefile b/makefile
|
|
||||||
index 0152c9a..0730a2a 100644
|
|
||||||
--- a/makefile
|
|
||||||
+++ b/makefile
|
|
||||||
@@ -2,8 +2,7 @@
|
|
||||||
|
|
||||||
# To exclude i2c support run make noi2c
|
|
||||||
|
|
||||||
-OBJS = pngwtran.o pngrtran.o pngset.o pngrio.o pngwio.o pngtrans.o pngrutil.o pngwutil.o\
|
|
||||||
- pngread.o pngwrite.o png.o pngerror.o pngget.o pngmem.o APRSIconData.o AISCommon.o\
|
|
||||||
+OBJS = APRSIconData.o AISCommon.o\
|
|
||||||
upnp.o APRSStdPages.o HSMODEM.o WinRPR.o KISSHF.o TNCEmulators.o bpqhdlc.o SerialPort.o\
|
|
||||||
adif.o WebMail.o utf8Routines.o VARA.o LzFind.o Alloc.o LzmaDec.o LzmaEnc.o LzmaLib.o \
|
|
||||||
Multicast.o ARDOP.o IPCode.o FLDigi.o linether.o CMSAuth.o APRSCode.o BPQtoAGW.o KAMPactor.o\
|
|
||||||
@@ -17,12 +16,12 @@ OBJS = pngwtran.o pngrtran.o pngset.o pngrio.o pngwio.o pngtrans.o pngrutil.o pn
|
|
||||||
|
|
||||||
# Configuration:
|
|
||||||
|
|
||||||
-#Default to Linux
|
|
||||||
- CC = gcc
|
|
||||||
- LDFLAGS = -Xlinker -Map=output.map -lrt
|
|
||||||
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
|
|
||||||
+CFLAGS+=$(shell dpkg-buildflags --get CPPFLAGS)
|
|
||||||
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
|
|
||||||
|
|
||||||
-all: CFLAGS = -DLINBPQ -MMD -g -fcommon -fasynchronous-unwind-tables $(EXTRA_CFLAGS)
|
|
||||||
-all: LIBS = -lpaho-mqtt3a -ljansson -lminiupnpc -lm -lz -lpthread -lconfig -lpcap
|
|
||||||
+all: CFLAGS += -DLINBPQ -MMD -g -rdynamic -fcommon -fasynchronous-unwind-tables
|
|
||||||
+all: LIBS = -lpaho-mqtt3a -ljansson -lminiupnpc -lrt -lm -lz -lpthread -lconfig -lpcap -lpng
|
|
||||||
all: linbpq
|
|
||||||
|
|
||||||
#other OS
|
|
||||||
@@ -74,12 +73,11 @@ noi2c: linbpq
|
|
||||||
|
|
||||||
|
|
||||||
linbpq: $(OBJS)
|
|
||||||
- cc $(OBJS) $(CFLAGS) $(LDFLAGS) $(LIBS) -o linbpq
|
|
||||||
- sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq
|
|
||||||
+ $(CC) $(OBJS) $(CFLAGS) $(LDFLAGS) $(LIBS) -o linbpq
|
|
||||||
|
|
||||||
-include *.d
|
|
||||||
|
|
||||||
-clean :
|
|
||||||
- rm *.d
|
|
||||||
- rm linbpq $(OBJS)
|
|
||||||
+install:
|
|
||||||
+ install -b -m 755 -D -d debian/linbpq/usr/sbin
|
|
||||||
+ install -b -m 755 -p linbpq debian/linbpq/usr/sbin
|
|
||||||
|
|
2
debian/patches/series
vendored
2
debian/patches/series
vendored
|
@ -1,2 +0,0 @@
|
||||||
spelling-fixes.patch
|
|
||||||
makefile
|
|
21
debian/patches/spelling-fixes.patch
vendored
21
debian/patches/spelling-fixes.patch
vendored
|
@ -1,21 +0,0 @@
|
||||||
From: Dave Hibberd <hibby@debian.org>
|
|
||||||
Date: Sat, 20 Sep 2025 15:42:15 +0100
|
|
||||||
Subject: spelling-fixes
|
|
||||||
|
|
||||||
---
|
|
||||||
UZ7HODrv.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/UZ7HODrv.c b/UZ7HODrv.c
|
|
||||||
index ac33278..c7e463f 100644
|
|
||||||
--- a/UZ7HODrv.c
|
|
||||||
+++ b/UZ7HODrv.c
|
|
||||||
@@ -382,7 +382,7 @@ int UZ7HOSetFreq(int port, struct TNCINFO * TNC, struct AGWINFO * AGW, PDATAMESS
|
|
||||||
|
|
||||||
if (AGW->CenterFreq == 0)
|
|
||||||
{
|
|
||||||
- buffptr->Len = sprintf((UCHAR *)&buffptr->Data[0], "UZ7HO} Invalid Modem Freqency\r");
|
|
||||||
+ buffptr->Len = sprintf((UCHAR *)&buffptr->Data[0], "UZ7HO} Invalid Modem Frequency\r");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
47
debian/postinst
vendored
47
debian/postinst
vendored
|
@ -1,47 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$1" = configure ]; then
|
|
||||||
|
|
||||||
# if ! getent group linbpq >/dev/null; then
|
|
||||||
# addgroup --system --force-badname linbpq || true
|
|
||||||
# fi
|
|
||||||
|
|
||||||
echo "Creating/updating linbpq user account..."
|
|
||||||
adduser --system --group --home /opt/oarc/bpq \
|
|
||||||
--gecos "linbpq system user" --shell /bin/false \
|
|
||||||
--quiet --disabled-password linbpq || {
|
|
||||||
# adduser failed. Why?
|
|
||||||
if getent passwd linbpq >/dev/null ; then
|
|
||||||
echo "Non-system user linbpq found. I will not overwrite a non-system" >&2
|
|
||||||
echo "user. Remove the user and reinstall linbpq." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# unknown adduser error, simply exit
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
if ! id -nGz linbpq | grep -qzxF 'dialout' ; then
|
|
||||||
adduser linbpq dialout
|
|
||||||
fi
|
|
||||||
if ! id -nGz linbpq | grep -qzxF 'plugdev' ; then
|
|
||||||
adduser linbpq plugdev
|
|
||||||
fi
|
|
||||||
chown :linbpq /opt/oarc/bpq
|
|
||||||
chmod 775 /opt/oarc/bpq
|
|
||||||
|
|
||||||
# If we have setcap is installed, set the requirements
|
|
||||||
# which allows us to install our binaries without the setuid
|
|
||||||
# bit.
|
|
||||||
if command -v setcap > /dev/null; then
|
|
||||||
setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" /usr/sbin/linbpq
|
|
||||||
else
|
|
||||||
echo "Setcap failed on /usr/sbin/linbpq, Features may be limited" >&2
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Setcap is not installed, Features may be limited" >&2
|
|
||||||
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
14
debian/preinst
vendored
14
debian/preinst
vendored
|
@ -1,14 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
confile="/etc/bpq32.cfg"
|
|
||||||
node="/opt/oarc/bpq/bpq32.cfg"
|
|
||||||
|
|
||||||
if [ -L $confile ]; then
|
|
||||||
rm $confile
|
|
||||||
cp $node $confile
|
|
||||||
mv $node $node.bak
|
|
||||||
fi
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
6
debian/rules
vendored
6
debian/rules
vendored
|
@ -1,6 +0,0 @@
|
||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@
|
|
1
debian/source/format
vendored
1
debian/source/format
vendored
|
@ -1 +0,0 @@
|
||||||
3.0 (quilt)
|
|
0
debian/source/include-binaries
vendored
0
debian/source/include-binaries
vendored
0
debian/source/lintian-overrides
vendored
0
debian/source/lintian-overrides
vendored
3
debian/watch
vendored
3
debian/watch
vendored
|
@ -1,3 +0,0 @@
|
||||||
version=4
|
|
||||||
opts="pgpmode=none,dversionmangle=s/\+repack//,repacksuffix=+repack,repack,compression=xz" \
|
|
||||||
http://127.0.0.1:8000/linbpq-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
|
|
10
kiss.c
10
kiss.c
|
@ -1905,7 +1905,7 @@ int i2cPoll(struct PORTCONTROL * PORT, NPASYINFO npKISSINFO)
|
||||||
|
|
||||||
// KISS Over TCP Routines
|
// KISS Over TCP Routines
|
||||||
|
|
||||||
VOID ConnecttoTCPThread(void * Param);
|
VOID ConnecttoTCPThread(NPASYINFO ASY);
|
||||||
|
|
||||||
int ConnecttoTCP(NPASYINFO ASY)
|
int ConnecttoTCP(NPASYINFO ASY)
|
||||||
{
|
{
|
||||||
|
@ -1914,9 +1914,8 @@ int ConnecttoTCP(NPASYINFO ASY)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID ConnecttoTCPThread(void * Param)
|
VOID ConnecttoTCPThread(NPASYINFO ASY)
|
||||||
{
|
{
|
||||||
NPASYINFO ASY = (NPASYINFO)Param;
|
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
int err,i;
|
int err,i;
|
||||||
u_long param=1;
|
u_long param=1;
|
||||||
|
@ -2132,7 +2131,7 @@ int KISSGetTCPMessage(NPASYINFO ASY)
|
||||||
// Interface to QtSM Managmemt Interface
|
// Interface to QtSM Managmemt Interface
|
||||||
|
|
||||||
|
|
||||||
VOID QtSMThread(void * Param);
|
VOID QtSMThread(struct PORTCONTROL * PORT);
|
||||||
|
|
||||||
VOID ConnecttoQtSM(struct PORTCONTROL * PORT)
|
VOID ConnecttoQtSM(struct PORTCONTROL * PORT)
|
||||||
{
|
{
|
||||||
|
@ -2142,12 +2141,11 @@ VOID ConnecttoQtSM(struct PORTCONTROL * PORT)
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID QtSMThread(void * Param)
|
VOID QtSMThread(struct PORTCONTROL * PORT)
|
||||||
{
|
{
|
||||||
// This is the Managemt Interface in QtSM. It receives PTT ON/OFF msgs from QtSM and allows changing modem mode and freq.
|
// This is the Managemt Interface in QtSM. It receives PTT ON/OFF msgs from QtSM and allows changing modem mode and freq.
|
||||||
// Also will collect link usage stats
|
// Also will collect link usage stats
|
||||||
|
|
||||||
struct PORTCONTROL * PORT = (struct PORTCONTROL *)Param;
|
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
int err, i, ret;
|
int err, i, ret;
|
||||||
u_long param = 1;
|
u_long param = 1;
|
||||||
|
|
|
@ -852,14 +852,14 @@ double LatFromLOC = 0;
|
||||||
double LonFromLOC = 0;
|
double LonFromLOC = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void SendBBSDataToPktMapThread(void * Param);
|
void SendBBSDataToPktMapThread();
|
||||||
|
|
||||||
void SendBBSDataToPktMap()
|
void SendBBSDataToPktMap()
|
||||||
{
|
{
|
||||||
_beginthread(SendBBSDataToPktMapThread, 0, 0);
|
_beginthread(SendBBSDataToPktMapThread, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendBBSDataToPktMapThread(void * Param)
|
void SendBBSDataToPktMapThread()
|
||||||
{
|
{
|
||||||
char Request[64];
|
char Request[64];
|
||||||
char * Params;
|
char * Params;
|
||||||
|
|
158
nodeapi.c
158
nodeapi.c
|
@ -9,7 +9,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "tncinfo.h"
|
#include "tncinfo.h"
|
||||||
#include "asmstrucs.h"
|
#include "asmstrucs.h"
|
||||||
#include "telnetserver.h"
|
|
||||||
#include "kiss.h"
|
#include "kiss.h"
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
@ -57,7 +56,6 @@ int sendUserList(char * response, char * token, char * Rest, int Local);
|
||||||
int sendInfo(char * response, char * token, char * Rest, int Local);
|
int sendInfo(char * response, char * token, char * Rest, int Local);
|
||||||
int sendLinks(char * response, char * token, char * Rest, int Local);
|
int sendLinks(char * response, char * token, char * Rest, int Local);
|
||||||
int sendPortMHList(char * response, char * token, char * Rest, int Local);
|
int sendPortMHList(char * response, char * token, char * Rest, int Local);
|
||||||
int sendPortQState(char * response, char * token, char * Rest, int Local);
|
|
||||||
int sendWhatsPacState(char * response, char * token, char * param, int Local);
|
int sendWhatsPacState(char * response, char * token, char * param, int Local);
|
||||||
int sendWhatsPacConfig(char * response, char * token, char * param, int Local);
|
int sendWhatsPacConfig(char * response, char * token, char * param, int Local);
|
||||||
|
|
||||||
|
@ -76,7 +74,6 @@ struct API APIList[] =
|
||||||
"/api/links", 10, sendLinks, 0,
|
"/api/links", 10, sendLinks, 0,
|
||||||
"/api/users", 10, sendUserList, 0,
|
"/api/users", 10, sendUserList, 0,
|
||||||
"/api/mheard", 11, sendPortMHList, 0,
|
"/api/mheard", 11, sendPortMHList, 0,
|
||||||
"/api/tcpqueues", 14, sendPortQState, 0,
|
|
||||||
"/api/v1/config", 14, sendWhatsPacConfig, AuthSysop,
|
"/api/v1/config", 14, sendWhatsPacConfig, AuthSysop,
|
||||||
"/api/v1/state", 13, sendWhatsPacState, AuthSysop
|
"/api/v1/state", 13, sendWhatsPacState, AuthSysop
|
||||||
};
|
};
|
||||||
|
@ -830,164 +827,9 @@ int sendPortMHList(char * response, char * token, char * param, int Local)
|
||||||
strcat(response, "\r\n]}\r\n");
|
strcat(response, "\r\n]}\r\n");
|
||||||
// printf("MH for port %d:\r\n%s\r\n", PORTVEC->PORTNUMBER, response);
|
// printf("MH for port %d:\r\n%s\r\n", PORTVEC->PORTNUMBER, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
return strlen(response);
|
return strlen(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sendPortQState(char * response, char * token, char * param, int Local)
|
|
||||||
{
|
|
||||||
struct TNCINFO * TNC;
|
|
||||||
struct TCPINFO * TCP;
|
|
||||||
struct ConnectionInfo * Conn;
|
|
||||||
struct STREAMINFO * STREAM;
|
|
||||||
int Stream;
|
|
||||||
int tcpqueue;
|
|
||||||
int Queued;
|
|
||||||
int n;
|
|
||||||
int port = 0;
|
|
||||||
char Type[10];
|
|
||||||
char Appl[20];
|
|
||||||
int radioport = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (param[0] = '?' || param[0] == '/')
|
|
||||||
port = atoi(¶m[1]);
|
|
||||||
|
|
||||||
TNC = TNCInfo[port];
|
|
||||||
|
|
||||||
// At the moment only supports Telnet Ports
|
|
||||||
|
|
||||||
if (TNC == 0 || TNC->Hardware != H_TELNET)
|
|
||||||
return send_http_response(response, "401 Invalid API Call");
|
|
||||||
|
|
||||||
response[0] = 0;
|
|
||||||
|
|
||||||
|
|
||||||
TCP = TNC->TCPInfo;
|
|
||||||
|
|
||||||
if (TCP == 0)
|
|
||||||
return send_http_response(response, "401 Invalid API Call");
|
|
||||||
|
|
||||||
n = sprintf(response,"{\"QState\":[\r\n");
|
|
||||||
|
|
||||||
for (Stream = 0; Stream <= TCP->MaxSessions; Stream++)
|
|
||||||
{
|
|
||||||
char Call[10];
|
|
||||||
STREAM = &TNC->Streams[Stream];
|
|
||||||
|
|
||||||
Conn = TNC->Streams[Stream].ConnectionInfo;
|
|
||||||
|
|
||||||
|
|
||||||
// if connected to the node
|
|
||||||
|
|
||||||
if (Conn->SocketActive)
|
|
||||||
{
|
|
||||||
TRANSPORTENTRY * Sess1 = TNC->PortRecord->ATTACHEDSESSIONS[Stream];
|
|
||||||
TRANSPORTENTRY * Sess2 = NULL;
|
|
||||||
|
|
||||||
if (Sess1)
|
|
||||||
Sess2 = Sess1->L4CROSSLINK;
|
|
||||||
else
|
|
||||||
continue;
|
|
||||||
|
|
||||||
radioport = 0;
|
|
||||||
|
|
||||||
// Can't use TXCount - it is Semaphored=
|
|
||||||
|
|
||||||
Queued = C_Q_COUNT(&TNC->Streams[Stream].PACTORtoBPQ_Q);
|
|
||||||
Queued += C_Q_COUNT((UINT *)&TNC->PortRecord->PORTCONTROL.PORTRX_Q);
|
|
||||||
|
|
||||||
if (Sess2)
|
|
||||||
Queued += CountFramesQueuedOnSession(Sess2);
|
|
||||||
|
|
||||||
if (Sess1)
|
|
||||||
Queued += CountFramesQueuedOnSession(Sess1);
|
|
||||||
|
|
||||||
|
|
||||||
// CountFramesQueuedOnSession(TRANSPORTENTRY * Session)
|
|
||||||
|
|
||||||
tcpqueue = Conn->FromHostBuffPutptr - Conn->FromHostBuffGetptr;
|
|
||||||
|
|
||||||
if (Sess2)
|
|
||||||
Sess1 = Sess2;
|
|
||||||
|
|
||||||
Call[ConvFromAX25(Sess1->L4USER, Call)] = 0;
|
|
||||||
|
|
||||||
|
|
||||||
if (Sess1->L4CIRCUITTYPE & BPQHOST)
|
|
||||||
strcpy(Type, "Host");
|
|
||||||
|
|
||||||
else if (Sess1->L4CIRCUITTYPE & SESSION)
|
|
||||||
{
|
|
||||||
struct DEST_LIST * DEST = Sess1->L4TARGET.DEST;
|
|
||||||
|
|
||||||
strcpy(Type, "NETROM");
|
|
||||||
|
|
||||||
if (DEST)
|
|
||||||
{
|
|
||||||
int ActiveRoute = DEST->DEST_ROUTE;
|
|
||||||
|
|
||||||
if (ActiveRoute)
|
|
||||||
{
|
|
||||||
struct ROUTE * ROUTE = DEST->NRROUTE[ActiveRoute - 1].ROUT_NEIGHBOUR;
|
|
||||||
|
|
||||||
if (ROUTE)
|
|
||||||
{
|
|
||||||
struct _LINKTABLE * LINK = ROUTE->NEIGHBOUR_LINK;
|
|
||||||
|
|
||||||
if (LINK && LINK->LINKPORT)
|
|
||||||
radioport = LINK->LINKPORT->PORTNUMBER;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (Sess1->L4CIRCUITTYPE & PACTOR)
|
|
||||||
{
|
|
||||||
// PACTOR Type - Frames are queued on the Port Entry
|
|
||||||
|
|
||||||
struct PORTCONTROL * PORT = Sess1->L4TARGET.PORT;
|
|
||||||
strcpy(Type, "HFLINK");
|
|
||||||
|
|
||||||
if (PORT)
|
|
||||||
radioport = PORT->PORTNUMBER;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
struct _LINKTABLE * LINK = Sess1->L4TARGET.LINK;
|
|
||||||
|
|
||||||
strcpy(Type, "L2 Link");
|
|
||||||
|
|
||||||
if (LINK && LINK->LINKPORT)
|
|
||||||
radioport = LINK->LINKPORT->PORTNUMBER;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
memcpy(Appl, Sess1->APPL, 16);
|
|
||||||
strlop(Appl, ' ');
|
|
||||||
|
|
||||||
n += sprintf(&response[n], "{\"APPL\": \"%s\", \"callSign\": \"%s\", \"type\": \"%s\", \"tcpqueue\": %d, \"packets\": %d, \"port\": %d},\r\n" , Appl, Call, Type, tcpqueue, Queued, radioport);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (n < 20) // No entries
|
|
||||||
{
|
|
||||||
response[strlen(response) - 2] = '\0'; // remove \r\n
|
|
||||||
strcat(response, "]}\r\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
response[strlen(response)-3 ] = '\0'; // remove ,\r\n
|
|
||||||
strcat(response, "\r\n]}\r\n");
|
|
||||||
// printf("MH for port %d:\r\n%s\r\n", PORTVEC->PORTNUMBER, response);
|
|
||||||
}
|
|
||||||
return strlen(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// WhatsPac configuration interface
|
// WhatsPac configuration interface
|
||||||
// WhatsPac also uses Paula's Remote Host Protocol (RHP). This is in a separate module
|
// WhatsPac also uses Paula's Remote Host Protocol (RHP). This is in a separate module
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue