Compare commits
177 commits
upstream/6
...
hibbian/la
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f0df4999c | ||
|
|
162b03be13 | ||
|
|
b0660dea06 | ||
|
|
26f10ca1b6 | ||
|
|
dae2bbc721 | ||
|
|
b031f8dedf | ||
|
|
84b34add07 | ||
|
|
d5f8de2e8f | ||
|
|
559d5bbf7c | ||
|
|
d7b0d25ddb | ||
|
|
ee15c1a996 | ||
|
|
944fdfc524 | ||
|
|
52e35f45b4 | ||
|
|
3fbe745ec9 | ||
|
|
1338e2c0a4 | ||
|
|
8dc88bc829 | ||
|
|
58ab380142 | ||
|
|
3c2c1cf9f8 | ||
|
|
367ab8fb01 | ||
|
|
e569b24f9a | ||
|
|
272c31f62b | ||
|
|
f99a060918 | ||
|
|
13c0b79af7 | ||
|
|
2e55f0a4ca | ||
|
|
acbaf26ac1 | ||
|
|
70d9b41cc1 | ||
|
|
c0425ff0e2 | ||
|
|
e4d8eadb91 | ||
|
|
ac03394a07 | ||
|
|
d0f299bc02 | ||
|
|
78f78927ab | ||
|
|
27d95452b1 | ||
|
|
e925e16114 | ||
|
|
d97d9d821b | ||
|
|
a6b3c4bdc9 | ||
|
|
3e1cbdfa4d | ||
|
|
7a5122a60f | ||
|
|
0013c3199a | ||
|
|
5d30fbc104 | ||
|
|
e21707174e | ||
|
|
26324bdc39 | ||
|
|
1cc87cf766 | ||
|
|
30b1e26a04 | ||
|
|
31bda6ce76 | ||
|
|
d2c3489aef | ||
|
|
6371d5385a | ||
|
|
b2315840b2 | ||
|
|
8d3874ec4e | ||
|
|
6a4b588a48 | ||
|
|
426f47ccb6 | ||
|
|
3ecb593511 | ||
|
|
0d3ee7fd56 | ||
|
|
96197688e7 | ||
|
|
d3b4158645 | ||
|
|
fec78cece5 | ||
|
|
bdf8a8367e | ||
|
|
f0ac0675f6 | ||
|
|
329e2f441d | ||
|
|
0b4a17004f | ||
|
|
f0b507a096 | ||
|
|
9d0d20064d | ||
|
|
ead72b2575 | ||
|
|
f1d8b647c7 | ||
|
|
bfcf049c56 | ||
|
|
488e218d34 | ||
|
|
3efea8aa10 | ||
|
|
8e9260b52d | ||
|
|
5105f0adf3 | ||
|
|
b060bf5d39 | ||
|
|
33d8e6f75a | ||
|
|
58d2baad53 | ||
|
|
1f73eb5601 | ||
|
|
a7d635fe2f | ||
|
|
eab73bee95 | ||
|
|
745a9f8e88 | ||
|
|
dd84b546a0 | ||
|
|
3a600bee23 | ||
|
|
d09a168608 | ||
|
|
757c658adc | ||
|
|
37bacc3178 | ||
|
|
7690eb8f59 | ||
|
|
a675c89dc3 | ||
|
|
7433c77604 | ||
|
|
6bd281ab30 | ||
|
|
c0637b3841 | ||
|
|
3a840054a7 | ||
|
|
8a18ca1868 | ||
|
|
49e27728c3 | ||
|
|
8e7a943558 | ||
|
|
e35489a925 | ||
|
|
c77b3e9f47 | ||
|
|
1e83f7e725 | ||
|
|
5d8d8963ef | ||
|
|
96d6e87d12 | ||
|
|
5bd018b10f | ||
|
|
4d14474d92 | ||
|
|
1b40c8c7b5 | ||
|
|
a5ce8b2319 | ||
|
|
6b795ee1f6 | ||
|
|
5767c5f6e8 | ||
|
|
61f49ee46b | ||
|
|
6e6693fde1 | ||
|
|
1a7f29f7d7 | ||
|
|
f527c60884 | ||
|
|
3de6b0150f | ||
|
|
0d48067b82 | ||
|
|
b18a579b0c | ||
|
|
ba9f74d1b8 | ||
|
|
550b4483cb | ||
|
|
383e238d61 | ||
|
|
371dac17ff | ||
|
|
24843bc9cd | ||
|
|
f17801297c | ||
|
|
f62a0288be | ||
|
|
85da9edc16 | ||
|
|
666c2aabb4 | ||
|
|
a47cc11d8a | ||
|
|
b26c87817a | ||
|
|
60585818de | ||
|
|
9dacd97014 | ||
|
|
fc0275b903 | ||
|
|
ca2a16b7fc | ||
|
|
d122a87dd1 | ||
|
|
5b3543c12a | ||
|
|
d37331205e | ||
|
|
026ad61c90 | ||
|
|
5d125856cd | ||
|
|
a7ecf779fc | ||
|
|
c26f6fe9d8 | ||
|
|
91fc60e6f0 | ||
|
|
3b36ba2a06 | ||
|
|
ec1e97d985 | ||
|
|
75eadc6bbe | ||
|
|
eaab24a3c0 | ||
|
|
4b1144ed94 | ||
|
|
37b1c8b074 | ||
|
|
0b5e0e5023 | ||
|
|
66ff00a200 | ||
|
|
566b839fd4 | ||
|
|
5f9fb109ff | ||
|
|
94179f117a | ||
|
|
831f4a75eb | ||
|
|
3f1fd46905 | ||
|
|
5b1c61bd78 | ||
|
|
ee7345ce92 | ||
|
|
733afdfcbc | ||
|
|
2dd6d1f7bf | ||
|
|
6ee8a719cf | ||
|
|
d4d0aaa8ab | ||
|
|
710cc6fde7 | ||
|
|
eec767af84 | ||
|
|
0c8b9a1da7 | ||
|
|
018d733dee | ||
|
|
851dcb6fd8 | ||
|
|
ce4f1b11b0 | ||
|
|
1fbded9d3a | ||
|
|
a4103962fc | ||
|
|
397da35dac | ||
|
|
9c15385cb6 | ||
|
|
fd1249b1e2 | ||
|
|
fda3d6ffac | ||
|
|
37a1ea33be | ||
|
|
78e830ab37 | ||
|
|
9155d3ba64 | ||
|
|
6adcb91ee5 | ||
|
|
77f96f5b63 | ||
|
|
6f53d92599 | ||
|
|
46c6058d94 | ||
|
|
3e029049d7 | ||
|
|
b6a50b9b6c | ||
|
|
fc474c29fe | ||
|
|
6546bac3f5 | ||
|
|
ee2ac63a82 | ||
|
|
95a6ab069f | ||
|
|
055c1c1891 | ||
|
|
964b72495c | ||
|
|
acb26fd980 |
|
|
@ -3256,9 +3256,9 @@ static VOID ADSBConnect(void * unused)
|
||||||
{
|
{
|
||||||
err=WSAGetLastError();
|
err=WSAGetLastError();
|
||||||
#ifdef LINBPQ
|
#ifdef LINBPQ
|
||||||
printf("Connect Failed for ADSB socket - error code = %d\n", err);
|
// printf("Connect Failed for ADSB socket - error code = %d\n", err);
|
||||||
#else
|
#else
|
||||||
Debugprintf("Connect Failed for ADSB socket - error code = %d", err);
|
// Debugprintf("Connect Failed for ADSB socket - error code = %d", err);
|
||||||
#endif
|
#endif
|
||||||
closesocket(TCPSock);
|
closesocket(TCPSock);
|
||||||
ADSBConnected = FALSE;
|
ADSBConnected = FALSE;
|
||||||
|
|
|
||||||
108
APRSCode.c
108
APRSCode.c
|
|
@ -441,112 +441,6 @@ HANDLE hMapFile;
|
||||||
|
|
||||||
// Logging
|
// Logging
|
||||||
|
|
||||||
static int LogAge = 14;
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
|
|
||||||
int DeleteAPRSLogFiles()
|
|
||||||
{
|
|
||||||
WIN32_FIND_DATA ffd;
|
|
||||||
|
|
||||||
char szDir[MAX_PATH];
|
|
||||||
char File[MAX_PATH];
|
|
||||||
HANDLE hFind = INVALID_HANDLE_VALUE;
|
|
||||||
DWORD dwError=0;
|
|
||||||
LARGE_INTEGER ft;
|
|
||||||
time_t now = time(NULL);
|
|
||||||
int Age;
|
|
||||||
|
|
||||||
// Prepare string for use with FindFile functions. First, copy the
|
|
||||||
// string to a buffer, then append '\*' to the directory name.
|
|
||||||
|
|
||||||
strcpy(szDir, GetLogDirectory());
|
|
||||||
strcat(szDir, "/logs/APRS*.log");
|
|
||||||
|
|
||||||
// Find the first file in the directory.
|
|
||||||
|
|
||||||
hFind = FindFirstFile(szDir, &ffd);
|
|
||||||
|
|
||||||
if (INVALID_HANDLE_VALUE == hFind)
|
|
||||||
return dwError;
|
|
||||||
|
|
||||||
// Walk directory
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
|
||||||
{
|
|
||||||
OutputDebugString(ffd.cFileName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ft.HighPart = ffd.ftCreationTime.dwHighDateTime;
|
|
||||||
ft.LowPart = ffd.ftCreationTime.dwLowDateTime;
|
|
||||||
|
|
||||||
ft.QuadPart -= 116444736000000000;
|
|
||||||
ft.QuadPart /= 10000000;
|
|
||||||
|
|
||||||
Age = (int)((now - ft.LowPart) / 86400);
|
|
||||||
|
|
||||||
if (Age > LogAge)
|
|
||||||
{
|
|
||||||
sprintf(File, "%s/logs/%s%c", GetLogDirectory(), ffd.cFileName, 0);
|
|
||||||
Debugprintf("Deleting %s", File);
|
|
||||||
DeleteFile(File);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (FindNextFile(hFind, &ffd) != 0);
|
|
||||||
|
|
||||||
FindClose(hFind);
|
|
||||||
return dwError;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
int APRSFilter(const struct dirent * dir)
|
|
||||||
{
|
|
||||||
return (memcmp(dir->d_name, "APRS", 4) == 0 && strstr(dir->d_name, ".log"));
|
|
||||||
}
|
|
||||||
|
|
||||||
int DeleteAPRSLogFiles()
|
|
||||||
{
|
|
||||||
struct dirent **namelist;
|
|
||||||
int n;
|
|
||||||
struct stat STAT;
|
|
||||||
time_t now = time(NULL);
|
|
||||||
int Age = 0, res;
|
|
||||||
char FN[256];
|
|
||||||
|
|
||||||
n = scandir("logs", &namelist, APRSFilter, alphasort);
|
|
||||||
|
|
||||||
if (n < 0)
|
|
||||||
perror("scandir");
|
|
||||||
else
|
|
||||||
{
|
|
||||||
while(n--)
|
|
||||||
{
|
|
||||||
sprintf(FN, "logs/%s", namelist[n]->d_name);
|
|
||||||
if (stat(FN, &STAT) == 0)
|
|
||||||
{
|
|
||||||
Age = (now - STAT.st_mtime) / 86400;
|
|
||||||
|
|
||||||
if (Age > LogAge)
|
|
||||||
{
|
|
||||||
Debugprintf("Deleting %s\n", FN);
|
|
||||||
unlink(FN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
free(namelist[n]);
|
|
||||||
}
|
|
||||||
free(namelist);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int APRSWriteLog(char * msg)
|
int APRSWriteLog(char * msg)
|
||||||
{
|
{
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
@ -646,8 +540,6 @@ Dll BOOL APIENTRY Init_APRS()
|
||||||
MobileBeaconInterval = 0;
|
MobileBeaconInterval = 0;
|
||||||
BeaconInterval = 0;
|
BeaconInterval = 0;
|
||||||
|
|
||||||
DeleteAPRSLogFiles();
|
|
||||||
|
|
||||||
memset(MHTABLE, 0, sizeof(MHTABLE));
|
memset(MHTABLE, 0, sizeof(MHTABLE));
|
||||||
|
|
||||||
ConvToAX25(MYNODECALL, MYCALL);
|
ConvToAX25(MYNODECALL, MYCALL);
|
||||||
|
|
|
||||||
|
|
@ -1456,7 +1456,7 @@ VOID SaveHousekeeping(struct HTTPConnectionInfo * Session, char * MsgPtr, char *
|
||||||
GetParam(input, "MaxAge=", Temp);
|
GetParam(input, "MaxAge=", Temp);
|
||||||
MaxAge = atoi(Temp);
|
MaxAge = atoi(Temp);
|
||||||
GetParam(input, "LogLife=", Temp);
|
GetParam(input, "LogLife=", Temp);
|
||||||
LogAge = atoi(Temp);
|
BBSLogAge = atoi(Temp);
|
||||||
GetParam(input, "UserLife=", Temp);
|
GetParam(input, "UserLife=", Temp);
|
||||||
UserLifetime= atoi(Temp);
|
UserLifetime= atoi(Temp);
|
||||||
|
|
||||||
|
|
@ -2666,7 +2666,7 @@ VOID SendHouseKeeping(char * Reply, int * ReplyLen, char * Key)
|
||||||
|
|
||||||
*ReplyLen = sprintf(Reply, HousekeepingTemplate,
|
*ReplyLen = sprintf(Reply, HousekeepingTemplate,
|
||||||
BBSName, Key, Key, Key, Key, Key, Key, Key, Key, Key,
|
BBSName, Key, Key, Key, Key, Key, Key, Key, Key, Key,
|
||||||
MaintTime, MaintInterval, MaxMsgno, BidLifetime, LogAge, UserLifetime,
|
MaintTime, MaintInterval, MaxMsgno, BidLifetime, BBSLogAge, UserLifetime,
|
||||||
(DeletetoRecycleBin) ? CHKD : UNC,
|
(DeletetoRecycleBin) ? CHKD : UNC,
|
||||||
(SendNonDeliveryMsgs) ? CHKD : UNC,
|
(SendNonDeliveryMsgs) ? CHKD : UNC,
|
||||||
(SuppressMaintEmail) ? CHKD : UNC,
|
(SuppressMaintEmail) ? CHKD : UNC,
|
||||||
|
|
|
||||||
|
|
@ -9939,8 +9939,8 @@ VOID SaveConfig(char * ConfigName)
|
||||||
SaveIntValue(group, "MaxMsgno", MaxMsgno);
|
SaveIntValue(group, "MaxMsgno", MaxMsgno);
|
||||||
SaveIntValue(group, "BidLifetime", BidLifetime);
|
SaveIntValue(group, "BidLifetime", BidLifetime);
|
||||||
SaveIntValue(group, "MaxAge", MaxAge);
|
SaveIntValue(group, "MaxAge", MaxAge);
|
||||||
SaveIntValue(group, "LogLifetime", LogAge);
|
SaveIntValue(group, "LogLifetime", BBSLogAge);
|
||||||
SaveIntValue(group, "LogLifetime", LogAge);
|
SaveIntValue(group, "LogLifetime", BBSLogAge);
|
||||||
SaveIntValue(group, "MaintInterval", MaintInterval);
|
SaveIntValue(group, "MaintInterval", MaintInterval);
|
||||||
SaveIntValue(group, "UserLifetime", UserLifetime);
|
SaveIntValue(group, "UserLifetime", UserLifetime);
|
||||||
SaveIntValue(group, "MaintTime", MaintTime);
|
SaveIntValue(group, "MaintTime", MaintTime);
|
||||||
|
|
@ -10601,7 +10601,7 @@ BOOL GetConfig(char * ConfigName)
|
||||||
LastHouseKeepingTime = GetIntValue(group, "LastHouseKeepingTime");
|
LastHouseKeepingTime = GetIntValue(group, "LastHouseKeepingTime");
|
||||||
LastTrafficTime = GetIntValue(group, "LastTrafficTime");
|
LastTrafficTime = GetIntValue(group, "LastTrafficTime");
|
||||||
MaxMsgno = GetIntValue(group, "MaxMsgno");
|
MaxMsgno = GetIntValue(group, "MaxMsgno");
|
||||||
LogAge = GetIntValue(group, "LogLifetime");
|
BBSLogAge = GetIntValue(group, "LogLifetime");
|
||||||
BidLifetime = GetIntValue(group, "BidLifetime");
|
BidLifetime = GetIntValue(group, "BidLifetime");
|
||||||
MaxAge = GetIntValue(group, "MaxAge");
|
MaxAge = GetIntValue(group, "MaxAge");
|
||||||
if (MaxAge == 0)
|
if (MaxAge == 0)
|
||||||
|
|
|
||||||
|
|
@ -731,7 +731,7 @@ VOID WINAPI OnSelChanged(HWND hwndDlg)
|
||||||
SetDlgItemInt(pHdr->hwndDisplay, IDC_MAXMSG, MaxMsgno, FALSE);
|
SetDlgItemInt(pHdr->hwndDisplay, IDC_MAXMSG, MaxMsgno, FALSE);
|
||||||
SetDlgItemInt(pHdr->hwndDisplay, IDC_BIDLIFETIME, BidLifetime, FALSE);
|
SetDlgItemInt(pHdr->hwndDisplay, IDC_BIDLIFETIME, BidLifetime, FALSE);
|
||||||
SetDlgItemInt(pHdr->hwndDisplay, IDC_USERLIFETIME, UserLifetime, FALSE);
|
SetDlgItemInt(pHdr->hwndDisplay, IDC_USERLIFETIME, UserLifetime, FALSE);
|
||||||
SetDlgItemInt(pHdr->hwndDisplay, IDC_LOGLIFETIME, LogAge, FALSE);
|
SetDlgItemInt(pHdr->hwndDisplay, IDC_LOGLIFETIME, BBSLogAge, FALSE);
|
||||||
SetDlgItemInt(pHdr->hwndDisplay, IDC_MAINTINTERVAL, MaintInterval, FALSE);
|
SetDlgItemInt(pHdr->hwndDisplay, IDC_MAINTINTERVAL, MaintInterval, FALSE);
|
||||||
sprintf(Time, "%04d", MaintTime);
|
sprintf(Time, "%04d", MaintTime);
|
||||||
SetDlgItemText(pHdr->hwndDisplay, IDC_MAINTTIME, Time);
|
SetDlgItemText(pHdr->hwndDisplay, IDC_MAINTTIME, Time);
|
||||||
|
|
@ -1979,7 +1979,7 @@ VOID SaveMAINTConfigFromDialog()
|
||||||
if (MaxMsgno > 99000) MaxMsgno = 99000;
|
if (MaxMsgno > 99000) MaxMsgno = 99000;
|
||||||
|
|
||||||
BidLifetime = GetDlgItemInt(hwndDisplay, IDC_BIDLIFETIME, &OK1, FALSE);
|
BidLifetime = GetDlgItemInt(hwndDisplay, IDC_BIDLIFETIME, &OK1, FALSE);
|
||||||
LogAge = GetDlgItemInt(hwndDisplay, IDC_LOGLIFETIME, &OK1, FALSE);
|
BBSLogAge = GetDlgItemInt(hwndDisplay, IDC_LOGLIFETIME, &OK1, FALSE);
|
||||||
UserLifetime = GetDlgItemInt(hwndDisplay, IDC_USERLIFETIME, &OK1, FALSE);
|
UserLifetime = GetDlgItemInt(hwndDisplay, IDC_USERLIFETIME, &OK1, FALSE);
|
||||||
MaintInterval = GetDlgItemInt(hwndDisplay, IDC_MAINTINTERVAL, &OK1, FALSE);
|
MaintInterval = GetDlgItemInt(hwndDisplay, IDC_MAINTINTERVAL, &OK1, FALSE);
|
||||||
MaintTime = GetDlgItemInt(hwndDisplay, IDC_MAINTTIME, &OK1, FALSE);
|
MaintTime = GetDlgItemInt(hwndDisplay, IDC_MAINTTIME, &OK1, FALSE);
|
||||||
|
|
@ -2657,7 +2657,7 @@ BOOL GetConfigFromRegistry()
|
||||||
|
|
||||||
Vallen=4;
|
Vallen=4;
|
||||||
RegQueryValueEx(hKey,"LogLifetime",0,
|
RegQueryValueEx(hKey,"LogLifetime",0,
|
||||||
(ULONG *)&Type,(UCHAR *)&LogAge,(ULONG *)&Vallen);
|
(ULONG *)&Type,(UCHAR *)&BBSLogAge,(ULONG *)&Vallen);
|
||||||
|
|
||||||
Vallen=4;
|
Vallen=4;
|
||||||
retCode += RegQueryValueEx(hKey,"BidLifetime",0,
|
retCode += RegQueryValueEx(hKey,"BidLifetime",0,
|
||||||
|
|
|
||||||
31
Bpq32.c
31
Bpq32.c
|
|
@ -1292,6 +1292,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
// Improvments to INP3 (4, 5)
|
// Improvments to INP3 (4, 5)
|
||||||
// Add Node API /api/tcpqueues (5)
|
// Add Node API /api/tcpqueues (5)
|
||||||
// Add sending link events to OARC API (disabled by default) (6)
|
// Add sending link events to OARC API (disabled by default) (6)
|
||||||
|
// Add option to write monitor output to a file (6)
|
||||||
// Fix possible program error in Telnet_Connected (7)
|
// Fix possible program error in Telnet_Connected (7)
|
||||||
// Close links when program is closed down (7)
|
// Close links when program is closed down (7)
|
||||||
// Fix possible problem with deleting routes when using both NODES and INP3 routing on same link (7)
|
// Fix possible problem with deleting routes when using both NODES and INP3 routing on same link (7)
|
||||||
|
|
@ -1300,6 +1301,14 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
// Fix FRMR caused by sending SREJ when no frames outstanding (8)
|
// Fix FRMR caused by sending SREJ when no frames outstanding (8)
|
||||||
// Fix some issues with NetromX connects and Route Selection when running INP3 and NODES routing (9)
|
// Fix some issues with NetromX connects and Route Selection when running INP3 and NODES routing (9)
|
||||||
// Fix connecting to a netrom node with c p node command (10)
|
// Fix connecting to a netrom node with c p node command (10)
|
||||||
|
// Add validation of INP3 RTT messages and various INP3 fixes (12)
|
||||||
|
// Change NetromX connect syntax to Service@Node to fix passing commands to local applications (12)
|
||||||
|
// Add config file option to enable writing monitor data to a file at startup (13)
|
||||||
|
// Add option to use V2.0 on a route (14)
|
||||||
|
// Don't reset NS on RR R(F) following I(P) just on RR poll following timeout. Can get problems with delayed RR R(F) (reverted) (14)
|
||||||
|
// Ignore packets that would cause an FRMR and respond to FRMR with DM (14)
|
||||||
|
// Add option to send periodic INP3 RIF refresh (15)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define CKernel
|
#define CKernel
|
||||||
|
|
@ -1540,7 +1549,6 @@ extern char ReportDest[7];
|
||||||
|
|
||||||
extern UCHAR ConfigDirectory[260];
|
extern UCHAR ConfigDirectory[260];
|
||||||
|
|
||||||
extern uint64_t INP3timeLoadedMS;
|
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
VOID __cdecl Consoleprintf(const char * format, ...);
|
VOID __cdecl Consoleprintf(const char * format, ...);
|
||||||
|
|
@ -2481,8 +2489,6 @@ FirstInit()
|
||||||
EnumProcessesPtr = (FARPROCX)GetProcAddress(ExtDriver,"EnumProcesses");
|
EnumProcessesPtr = (FARPROCX)GetProcAddress(ExtDriver,"EnumProcesses");
|
||||||
}
|
}
|
||||||
|
|
||||||
INP3timeLoadedMS = GetTickCount();
|
|
||||||
|
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
INITIALISEPORTS();
|
INITIALISEPORTS();
|
||||||
|
|
@ -2822,7 +2828,13 @@ BOOL APIENTRY DllMain(HANDLE hInst, DWORD ul_reason_being_called, LPVOID lpReser
|
||||||
MessageBox(NULL,"NODES Table .c and .asm mismatch - fix and rebuild", "BPQ32", MB_OK);
|
MessageBox(NULL,"NODES Table .c and .asm mismatch - fix and rebuild", "BPQ32", MB_OK);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sizeof(struct NR_DEST_ROUTE_ENTRY) != sizeof(struct INP3_DEST_ROUTE_ENTRY))
|
||||||
|
{
|
||||||
|
MessageBox(NULL,"Route Entry mismatch - fix and rebuild", "BPQ32", MB_OK);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
GetSemaphore(&Semaphore, 4);
|
GetSemaphore(&Semaphore, 4);
|
||||||
|
|
||||||
BPQHOSTVECPTR = &BPQHOSTVECTOR[0];
|
BPQHOSTVECPTR = &BPQHOSTVECTOR[0];
|
||||||
|
|
@ -4220,13 +4232,12 @@ int APIENTRY Restart()
|
||||||
|
|
||||||
hProc = OpenProcess(PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, TimerInst);
|
hProc = OpenProcess(PROCESS_TERMINATE | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, TimerInst);
|
||||||
|
|
||||||
if (hProc)
|
if (hProc)
|
||||||
{
|
{
|
||||||
TerminateProcess(hProc, 0);
|
TerminateProcess(hProc, 0);
|
||||||
CloseHandle(hProc);
|
CloseHandle(hProc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
230
Cmd.c
230
Cmd.c
|
|
@ -71,6 +71,7 @@ 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);
|
void SendVARANetromNodes(struct TNCINFO * TNC, MESSAGE *Buffer);
|
||||||
VOID DoNetromConnect(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIST * Dest, BOOL Spy, int Service);
|
VOID DoNetromConnect(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIST * Dest, BOOL Spy, int Service);
|
||||||
|
VOID sendAlltoOneNeigbour(struct ROUTE * Route);
|
||||||
|
|
||||||
extern VOID KISSTX(struct KISSINFO * KISS, PMESSAGE Buffer);
|
extern VOID KISSTX(struct KISSINFO * KISS, PMESSAGE Buffer);
|
||||||
|
|
||||||
|
|
@ -84,6 +85,7 @@ UCHAR SAVEDAPPLFLAGS = 0;
|
||||||
UCHAR ALIASINVOKED = 0;
|
UCHAR ALIASINVOKED = 0;
|
||||||
|
|
||||||
extern int MONTOFILEFLAG;
|
extern int MONTOFILEFLAG;
|
||||||
|
extern int RIFInterval;
|
||||||
|
|
||||||
VOID * CMDPTR = 0;
|
VOID * CMDPTR = 0;
|
||||||
|
|
||||||
|
|
@ -357,6 +359,36 @@ VOID POLLNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struc
|
||||||
|
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID SENDRIF(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
|
{
|
||||||
|
struct ROUTE * Route;
|
||||||
|
int Portnum = atoi(CmdTail);
|
||||||
|
unsigned char axCall[7];
|
||||||
|
|
||||||
|
char * Call = strlop(CmdTail, ' ');
|
||||||
|
|
||||||
|
if (Call && Portnum)
|
||||||
|
{
|
||||||
|
ConvToAX25(Call, axCall);
|
||||||
|
|
||||||
|
if (FindNeighbour(axCall, Portnum, &Route))
|
||||||
|
{
|
||||||
|
sendAlltoOneNeigbour(Route);
|
||||||
|
|
||||||
|
strcpy(Bufferptr, OKMSG);
|
||||||
|
Bufferptr += (int)strlen(OKMSG);
|
||||||
|
|
||||||
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bufferptr = Cmdprintf(Session, Bufferptr, "Route not found\r");
|
||||||
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
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);
|
int Portnum = atoi(CmdTail);
|
||||||
|
|
@ -838,13 +870,14 @@ BOOL cATTACHTOBBS(TRANSPORTENTRY * Session, UINT Mask, int Paclen, int * AnySess
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnecttoService(TRANSPORTENTRY * Session, char * Bufferptr, int ServiceIndex, char * Node, int Stay)
|
void ConnecttoService(TRANSPORTENTRY * Session, char * Bufferptr, int Service, char * Node, int Stay)
|
||||||
{
|
{
|
||||||
struct DEST_LIST * Dest = DESTS;
|
struct DEST_LIST * Dest = DESTS;
|
||||||
int n = MAXDESTS;
|
int n = MAXDESTS;
|
||||||
int gotDest = 0;
|
int gotDest = 0;
|
||||||
unsigned char axcall[7];
|
unsigned char axcall[7];
|
||||||
int Service = -1;
|
char cmdName[80];
|
||||||
|
int i;
|
||||||
|
|
||||||
// Make Sure Node is Known
|
// Make Sure Node is Known
|
||||||
|
|
||||||
|
|
@ -889,9 +922,20 @@ void ConnecttoService(TRANSPORTENTRY * Session, char * Bufferptr, int ServiceInd
|
||||||
|
|
||||||
Session->STAYFLAG = Stay;
|
Session->STAYFLAG = Stay;
|
||||||
|
|
||||||
Service = SERVICES[ServiceIndex].ServiceNo;
|
// Get command name if a named command
|
||||||
|
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, "Connecting to Service %s on Node %s \r", SERVICES[ServiceIndex].ServiceName, Node);
|
sprintf(cmdName, "%d", Service); // default to number
|
||||||
|
|
||||||
|
for (i = 0; i < NUMBEROFSSERVICES; i++)
|
||||||
|
{
|
||||||
|
if (SERVICES[i].ServiceNo == Service)
|
||||||
|
{
|
||||||
|
strcpy(cmdName, SERVICES[i].ServiceName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bufferptr = Cmdprintf(Session, Bufferptr, "Connecting to Service %s on Node %s \r", cmdName, Node);
|
||||||
|
|
||||||
DoNetromConnect(Session, Bufferptr, Dest, 0, Service);
|
DoNetromConnect(Session, Bufferptr, Dest, 0, Service);
|
||||||
|
|
||||||
|
|
@ -930,7 +974,7 @@ int checkifService(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, s
|
||||||
{
|
{
|
||||||
if (strcmp(APPName, SERVICES[i].ServiceName) == 0)
|
if (strcmp(APPName, SERVICES[i].ServiceName) == 0)
|
||||||
{
|
{
|
||||||
ConnecttoService(Session, Bufferptr, i, ptr, Stay);
|
ConnecttoService(Session, Bufferptr, SERVICES[i].ServiceNo, ptr, Stay);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -948,7 +992,6 @@ VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct
|
||||||
char * ptr1, *ptr2;
|
char * ptr1, *ptr2;
|
||||||
int n = 12;
|
int n = 12;
|
||||||
BOOL Stay = FALSE;
|
BOOL Stay = FALSE;
|
||||||
char * ptr, *Context;
|
|
||||||
|
|
||||||
// Copy Appl and Null Terminate
|
// Copy Appl and Null Terminate
|
||||||
|
|
||||||
|
|
@ -967,14 +1010,17 @@ VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = strtok_s(CmdTail, " ", &Context);
|
|
||||||
|
|
||||||
// ptr is first param. Context is rest of string;
|
if (CmdTail[0] == 'S')
|
||||||
|
Stay = TRUE;
|
||||||
|
|
||||||
|
// could be Node for NETROMX connect or S flag
|
||||||
|
|
||||||
|
// We now use service@node, so can't get here
|
||||||
|
|
||||||
|
/*
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
// could be Node for NETROMX connect or S flag
|
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (strlen(ptr) > 1)
|
if (strlen(ptr) > 1)
|
||||||
|
|
@ -983,6 +1029,8 @@ VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct
|
||||||
Session->STAYFLAG = Stay;
|
Session->STAYFLAG = Stay;
|
||||||
|
|
||||||
// See if APPL is one of Paula's service
|
// See if APPL is one of Paula's service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < NUMBEROFSSERVICES; i++)
|
for (i = 0; i < NUMBEROFSSERVICES; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -1003,7 +1051,7 @@ VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct
|
||||||
else if (ptr[0] == 'S')
|
else if (ptr[0] == 'S')
|
||||||
Session->STAYFLAG = Stay;
|
Session->STAYFLAG = Stay;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
memcpy(Session->APPL, CMD->String, 12);
|
memcpy(Session->APPL, CMD->String, 12);
|
||||||
|
|
||||||
// SEE IF THERE IS AN ALIAS DEFINDED FOR THIS COMMAND
|
// SEE IF THERE IS AN ALIAS DEFINDED FOR THIS COMMAND
|
||||||
|
|
@ -1894,9 +1942,13 @@ char * DisplayRoute(TRANSPORTENTRY * Session, char * Bufferptr, struct ROUTE *
|
||||||
double srtt = Routes->SRTT/100.0;
|
double srtt = Routes->SRTT/100.0;
|
||||||
double nsrtt = Routes->NeighbourSRTT/100.0;
|
double nsrtt = Routes->NeighbourSRTT/100.0;
|
||||||
|
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, " %4.2fs %4.2fs", srtt, nsrtt);
|
Bufferptr = Cmdprintf(Session, Bufferptr, " %4.2fs %4.2fs %X", srtt, nsrtt, Routes->Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Routes->TCPPort)
|
||||||
|
Bufferptr = Cmdprintf(Session, Bufferptr, " %d", Routes->localport);
|
||||||
|
|
||||||
|
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, "\r");
|
Bufferptr = Cmdprintf(Session, Bufferptr, "\r");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2572,6 +2624,56 @@ VOID CMDC00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct C
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// See if NETROMX connect c service@node
|
||||||
|
|
||||||
|
if (strchr(ptr, '@'))
|
||||||
|
{
|
||||||
|
// We now use service@node, unlike xr
|
||||||
|
|
||||||
|
char * Context1;
|
||||||
|
|
||||||
|
char * Cmd = strtok_s(ptr, "@", &Context1);
|
||||||
|
char * Node = strtok_s(NULL, " ", &Context1);
|
||||||
|
int i;
|
||||||
|
int Stay = 0;
|
||||||
|
|
||||||
|
if (Context1 && Context1[0] == 'S')
|
||||||
|
Session->STAYFLAG = Stay;
|
||||||
|
|
||||||
|
for (i = 0; i < NUMBEROFSSERVICES; i++)
|
||||||
|
{
|
||||||
|
if (strcmp(Cmd, SERVICES[i].ServiceName) == 0)
|
||||||
|
{
|
||||||
|
if (Node)
|
||||||
|
{
|
||||||
|
ConnecttoService(Session, Bufferptr, SERVICES[i].ServiceNo, Node, Stay);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// May be numeric service
|
||||||
|
|
||||||
|
for (i = 0; i < strlen(Cmd); i++)
|
||||||
|
{
|
||||||
|
if (!isdigit(Cmd[i]))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i == strlen(Cmd))
|
||||||
|
{
|
||||||
|
if (Node)
|
||||||
|
{
|
||||||
|
ConnecttoService(Session, Bufferptr, atoi(Cmd), Node, Stay);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Bufferptr = Cmdprintf(Session, Bufferptr, "Invalid NetromX command\r");
|
||||||
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Port = atoi(ptr);
|
Port = atoi(ptr);
|
||||||
|
|
||||||
if (Port)
|
if (Port)
|
||||||
|
|
@ -2671,7 +2773,6 @@ NoPort:
|
||||||
|
|
||||||
// SEE IF CALL TO ANY OF OUR HOST SESSIONS - UNLESS DIGIS SPECIFIED
|
// SEE IF CALL TO ANY OF OUR HOST SESSIONS - UNLESS DIGIS SPECIFIED
|
||||||
|
|
||||||
// if (axcalls[7] == 0 && axcalls[9])
|
|
||||||
if (axcalls[7] == 0)
|
if (axcalls[7] == 0)
|
||||||
{
|
{
|
||||||
// If this connect is as a result of a command alias, don't check appls or we will loop
|
// If this connect is as a result of a command alias, don't check appls or we will loop
|
||||||
|
|
@ -2723,33 +2824,7 @@ NoPort:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no digis see if connect to known node.
|
if (axcalls[7] == 0)
|
||||||
|
|
||||||
// But now could have a single numeric param as a service number (Paula's Netromx)
|
|
||||||
// cmdCopy is command tail (after call)
|
|
||||||
|
|
||||||
// Make sure field is numeric
|
|
||||||
|
|
||||||
if (cmdCopy[0] != ' ')
|
|
||||||
{
|
|
||||||
i = 0;
|
|
||||||
|
|
||||||
while (cmdCopy[i] >= '0' && cmdCopy[i]<= '9')
|
|
||||||
i++;
|
|
||||||
|
|
||||||
if (i && cmdCopy[i] != ' ') // have an all digit param = probably a service
|
|
||||||
goto Downlink;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (i > 0) // Some digits
|
|
||||||
{
|
|
||||||
haveService = 1;
|
|
||||||
Service = atoi(cmdCopy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (axcalls[7] == 0 || haveService)
|
|
||||||
{
|
{
|
||||||
// SEE IF CALL TO ANOTHER NODE
|
// SEE IF CALL TO ANOTHER NODE
|
||||||
|
|
||||||
|
|
@ -2792,9 +2867,6 @@ Downlink:
|
||||||
// L2 NEEDS PORT NUMBER
|
// L2 NEEDS PORT NUMBER
|
||||||
|
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, "Downlink connect needs port number - C P CALLSIGN\r");
|
Bufferptr = Cmdprintf(Session, Bufferptr, "Downlink connect needs port number - C P CALLSIGN\r");
|
||||||
|
|
||||||
// Send Port List
|
|
||||||
|
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -3270,7 +3342,7 @@ char * DoOneNode(TRANSPORTENTRY * Session, char * Bufferptr, struct DEST_LIST *
|
||||||
|
|
||||||
if (Neighbour)
|
if (Neighbour)
|
||||||
{
|
{
|
||||||
double srtt = Route->SRTT/100.0;
|
double srtt = Route->STT/100.0;
|
||||||
|
|
||||||
len = ConvFromAX25(Neighbour->NEIGHBOUR_CALL, Normcall);
|
len = ConvFromAX25(Neighbour->NEIGHBOUR_CALL, Normcall);
|
||||||
Normcall[len] = 0;
|
Normcall[len] = 0;
|
||||||
|
|
@ -3290,7 +3362,7 @@ int DoViaEntry(struct DEST_LIST * Dest, int n, char * line, int cursor)
|
||||||
char Portcall[10];
|
char Portcall[10];
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (Dest->NRROUTE[n].ROUT_NEIGHBOUR != 0 && Dest->NRROUTE[n].ROUT_NEIGHBOUR->INP3Node == 0)
|
if (Dest->NRROUTE[n].ROUT_NEIGHBOUR != 0)
|
||||||
{
|
{
|
||||||
len=ConvFromAX25(Dest->NRROUTE[n].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Portcall);
|
len=ConvFromAX25(Dest->NRROUTE[n].ROUT_NEIGHBOUR->NEIGHBOUR_CALL, Portcall);
|
||||||
Portcall[len]=0;
|
Portcall[len]=0;
|
||||||
|
|
@ -3319,7 +3391,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].STT/100.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;
|
||||||
|
|
@ -4593,6 +4665,7 @@ struct CMDX COMMANDS[] =
|
||||||
"RESTARTTNC ",10,&RESTARTTNC,0,
|
"RESTARTTNC ",10,&RESTARTTNC,0,
|
||||||
"POLLNODES ",8, &POLLNODES,0,
|
"POLLNODES ",8, &POLLNODES,0,
|
||||||
"SENDNODES ",8, &SENDNODES,0,
|
"SENDNODES ",8, &SENDNODES,0,
|
||||||
|
"SENDRIF ",7, &SENDRIF,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),
|
||||||
"MAXFRAME ",3, PORTVAL, offsetof(PORTCONTROLX, PORTWINDOW),
|
"MAXFRAME ",3, PORTVAL, offsetof(PORTCONTROLX, PORTWINDOW),
|
||||||
|
|
@ -4650,6 +4723,7 @@ struct CMDX COMMANDS[] =
|
||||||
"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,
|
"DEBUGINP3 ",8,SWITCHVAL,(size_t)&DEBUGINP3,
|
||||||
|
"RIFINTERVAL ",11,SWITCHVALW,(size_t)&RIFInterval,
|
||||||
"MAXHOPS ",7,SWITCHVAL,(size_t)&MaxHops,
|
"MAXHOPS ",7,SWITCHVAL,(size_t)&MaxHops,
|
||||||
"PREFERINP3 ",10,SWITCHVAL,(size_t)&PREFERINP3ROUTES,
|
"PREFERINP3 ",10,SWITCHVAL,(size_t)&PREFERINP3ROUTES,
|
||||||
"MAXRTT ",6,SWITCHVALW,(size_t)&MAXRTT,
|
"MAXRTT ",6,SWITCHVALW,(size_t)&MAXRTT,
|
||||||
|
|
@ -5082,6 +5156,7 @@ VOID DoTheCommand(TRANSPORTENTRY * Session)
|
||||||
int n;
|
int n;
|
||||||
int i, Service = -1;
|
int i, Service = -1;
|
||||||
char * Cmd, *Node, *Context;
|
char * Cmd, *Node, *Context;
|
||||||
|
int Stay = 0;
|
||||||
|
|
||||||
ptr1 = &COMMANDBUFFER[0]; //
|
ptr1 = &COMMANDBUFFER[0]; //
|
||||||
|
|
||||||
|
|
@ -5176,28 +5251,47 @@ VOID DoTheCommand(TRANSPORTENTRY * Session)
|
||||||
|
|
||||||
// See if a NETROMX Service
|
// See if a NETROMX Service
|
||||||
|
|
||||||
Cmd = strtok_s(ptr1, " ", &Context);
|
// We now use service@node, unlike xr
|
||||||
Node = strtok_s(NULL, " ", &Context);
|
|
||||||
|
if (strchr(ptr1, '@'))
|
||||||
for (i = 0; i < NUMBEROFSSERVICES; i++)
|
|
||||||
{
|
{
|
||||||
if (strcmp(Cmd, SERVICES[i].ServiceName) == 0)
|
Cmd = strtok_s(ptr1, "@", &Context);
|
||||||
|
Node = strtok_s(NULL, " ", &Context);
|
||||||
|
|
||||||
|
if (Cmd && Node)
|
||||||
{
|
{
|
||||||
int Stay = 0;
|
|
||||||
|
|
||||||
if (Context && Context[0] == 'S')
|
if (Context && Context[0] == 'S')
|
||||||
Session->STAYFLAG = Stay;
|
Session->STAYFLAG = Stay;
|
||||||
|
|
||||||
if (Node)
|
for (i = 0; i < NUMBEROFSSERVICES; i++)
|
||||||
{
|
{
|
||||||
ConnecttoService(Session, ReplyPointer, i, Node, Stay);
|
if (strcmp(Cmd, SERVICES[i].ServiceName) == 0)
|
||||||
|
{
|
||||||
|
ConnecttoService(Session, ReplyPointer, SERVICES[i].ServiceNo, Node, Stay);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// May be numeric service
|
||||||
|
|
||||||
|
for (i = 0; i < strlen(Cmd); i++)
|
||||||
|
{
|
||||||
|
if (!isdigit(Cmd[i]))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i == strlen(Cmd))
|
||||||
|
{
|
||||||
|
ConnecttoService(Session, ReplyPointer, atoi(Cmd), Node, Stay);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connecting to service on local node - msy be possible sometime
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
ReplyPointer = Cmdprintf(Session, ReplyPointer, "Invalid NetromX command\r");
|
||||||
|
SendCommandReply(Session, REPLYBUFFER, (int)(ReplyPointer - (char *)REPLYBUFFER));
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
Session->BADCOMMANDS++;
|
Session->BADCOMMANDS++;
|
||||||
|
|
||||||
if (Session->BADCOMMANDS > 6) // TOO MANY ERRORS
|
if (Session->BADCOMMANDS > 6) // TOO MANY ERRORS
|
||||||
|
|
@ -5214,19 +5308,19 @@ VOID DoTheCommand(TRANSPORTENTRY * Session)
|
||||||
ptr1 += CMDERRLEN;
|
ptr1 += CMDERRLEN;
|
||||||
|
|
||||||
SendCommandReply(Session, Buffer, (int)(ptr1 - (char *)Buffer));
|
SendCommandReply(Session, Buffer, (int)(ptr1 - (char *)Buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID StatsTimer()
|
VOID StatsTimer()
|
||||||
{
|
|
||||||
struct PORTCONTROL * PORT = PORTTABLE;
|
|
||||||
uint64_t sum, sum2;
|
|
||||||
|
|
||||||
// Interval is 60 secs
|
|
||||||
|
|
||||||
while(PORT)
|
|
||||||
{
|
{
|
||||||
int index = PORT->StatsPointer++;
|
struct PORTCONTROL * PORT = PORTTABLE;
|
||||||
|
uint64_t sum, sum2;
|
||||||
|
|
||||||
|
// Interval is 60 secs
|
||||||
|
|
||||||
|
while(PORT)
|
||||||
|
{
|
||||||
|
int index = PORT->StatsPointer++;
|
||||||
|
|
||||||
if (index == 1439)
|
if (index == 1439)
|
||||||
PORT->StatsPointer = 0; // Cyclic through 24 hours (1440 Mins)
|
PORT->StatsPointer = 0; // Cyclic through 24 hours (1440 Mins)
|
||||||
|
|
|
||||||
10
CommonCode.c
10
CommonCode.c
|
|
@ -76,6 +76,7 @@ char * FormatMH(PMHSTRUC MH, char Format);
|
||||||
void WriteConnectLog(char * fromCall, char * toCall, UCHAR * Mode);
|
void WriteConnectLog(char * fromCall, char * toCall, UCHAR * Mode);
|
||||||
void SendDataToPktMap();
|
void SendDataToPktMap();
|
||||||
void NETROMTCPResolve();
|
void NETROMTCPResolve();
|
||||||
|
VOID FindLostBuffers();
|
||||||
|
|
||||||
extern BOOL LogAllConnects;
|
extern BOOL LogAllConnects;
|
||||||
extern BOOL M0LTEMap;
|
extern BOOL M0LTEMap;
|
||||||
|
|
@ -565,6 +566,15 @@ VOID * _GetBuff(char * File, int Line)
|
||||||
Msg->Linkptr = NULL;
|
Msg->Linkptr = NULL;
|
||||||
Msg->Padding[0] = 0; // Used for modem status info
|
Msg->Padding[0] = 0; // Used for modem status info
|
||||||
}
|
}
|
||||||
|
else if (QCOUNT != 0)
|
||||||
|
{
|
||||||
|
// Queue must be corrupt
|
||||||
|
|
||||||
|
Debugprintf("Fatal - Getbuff returned NULL and Q not empty - exit");
|
||||||
|
FindLostBuffers();
|
||||||
|
WriteMiniDump();
|
||||||
|
Restart();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Debugprintf("Warning - Getbuff returned NULL");
|
Debugprintf("Warning - Getbuff returned NULL");
|
||||||
|
|
||||||
|
|
|
||||||
4
Events.c
4
Events.c
|
|
@ -944,9 +944,9 @@ void APIL2Trace(struct _MESSAGE * Message, char * Dirn)
|
||||||
// supervisory
|
// supervisory
|
||||||
|
|
||||||
if (PF[0])
|
if (PF[0])
|
||||||
udplen += snprintf(&UDPMsg[udplen], 2048 - udplen, ", \"pf\": \"%s\", \"rseq\": %d, \"tseq\": %d", PF, NR, NS);
|
udplen += snprintf(&UDPMsg[udplen], 2048 - udplen, ", \"pf\": \"%s\", \"rseq\": %d", PF, NR);
|
||||||
else
|
else
|
||||||
udplen += snprintf(&UDPMsg[udplen], 2048 - udplen, ", \"rseq\": %d, \"tseq\": %d", NR, NS);
|
udplen += snprintf(&UDPMsg[udplen], 2048 - udplen, ", \"rseq\": %d", NR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4187,7 +4187,7 @@ static BOOL RestartTNC(struct TNCINFO * TNC)
|
||||||
SOCKET sock = socket(AF_INET,SOCK_DGRAM,0);
|
SOCKET sock = socket(AF_INET,SOCK_DGRAM,0);
|
||||||
struct sockaddr_in destaddr;
|
struct sockaddr_in destaddr;
|
||||||
|
|
||||||
Debugprintf("trying to restart TNC %s", TNC->ProgramPath);
|
// Debugprintf("trying to restart TNC %s", TNC->ProgramPath);
|
||||||
|
|
||||||
if (sock == INVALID_SOCKET)
|
if (sock == INVALID_SOCKET)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -4210,7 +4210,7 @@ static BOOL RestartTNC(struct TNCINFO * TNC)
|
||||||
|
|
||||||
n = sendto(sock, TNC->ProgramPath, (int)strlen(TNC->ProgramPath), 0, (struct sockaddr *)&destaddr, sizeof(destaddr));
|
n = sendto(sock, TNC->ProgramPath, (int)strlen(TNC->ProgramPath), 0, (struct sockaddr *)&destaddr, sizeof(destaddr));
|
||||||
|
|
||||||
Debugprintf("Restart TNC - sendto returned %d", n);
|
// Debugprintf("Restart TNC - sendto returned %d", n);
|
||||||
|
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
closesocket(sock);
|
closesocket(sock);
|
||||||
|
|
|
||||||
65
HTTPcode.c
65
HTTPcode.c
|
|
@ -147,9 +147,15 @@ char IndexNoAPRS[] = "<meta http-equiv=\"refresh\" content=\"0;url=/Node/NodeInd
|
||||||
char Tail[] = "</body></html>";
|
char Tail[] = "</body></html>";
|
||||||
|
|
||||||
char RouteHddr[] = "<h2 align=center>Routes</h2><table align=center border=2 style=font-family:monospace bgcolor=white>"
|
char RouteHddr[] = "<h2 align=center>Routes</h2><table align=center border=2 style=font-family:monospace bgcolor=white>"
|
||||||
"<tr><th>Port</th><th>Call</th><th>Quality</th><th>Node Count</th><th>Frame Count</th><th>Retries</th><th>Percent</th><th>Maxframe</th><th>Frack</th><th>Last Heard</th><th>Queued</th><th>Rem Qual</th></tr>";
|
"<tr><th>Port</th><th>Call</th><th>Quality</th><th>Node Count</th><th>Frame Count</th><th>Retries</th><th>Percent</th><th>Maxframe</th>"
|
||||||
|
"<th>Frack</th><th>Last Heard</th><th>Queued</th><th>Rem Qual</th><th>SRTT</th><th>Rem SRTT</th></tr>";
|
||||||
|
|
||||||
|
char RouteLine[] = "<tr><td>%s%d</td><td>%s%s</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td><td>%d%</td><td>%d</td><td>%d</td>"
|
||||||
|
"<td>%02d:%02d<td>%d</td><td>%d</td></td><td></td><td></td></tr>";
|
||||||
|
|
||||||
|
char RouteLineINP3[] = "<tr><td>%s%d</td><td>%s%s</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td><td>%d%</td><td>%d</td><td>%d</td>"
|
||||||
|
"<td>%02d:%02d</td><td>%d</td><td>%d</td><td>%4.2fs</td><td>%4.2fs</td></tr>";
|
||||||
|
|
||||||
char RouteLine[] = "<tr><td>%s%d</td><td>%s%s</td><td>%d</td><td>%d</td><td>%d</td><td>%d</td><td>%d%</td><td>%d</td><td>%d</td><td>%02d:%02d</td><td>%d</td><td>%d</td></tr>";
|
|
||||||
char xNodeHddr[] = "<align=center><form align=center method=get action=/Node/Nodes.html>"
|
char xNodeHddr[] = "<align=center><form align=center method=get action=/Node/Nodes.html>"
|
||||||
"<table align=center bgcolor=white>"
|
"<table align=center bgcolor=white>"
|
||||||
"<tr><td><input type=submit class='btn' name=a value=\"Nodes Sorted by Alias\"></td><td>"
|
"<tr><td><input type=submit class='btn' name=a value=\"Nodes Sorted by Alias\"></td><td>"
|
||||||
|
|
@ -1390,23 +1396,23 @@ int SetupNodeMenu(char * Buff, int LOCAL)
|
||||||
char SigninBit[] = "<td><a href=/Node/Signon.html>SYSOP Signin</a></td>";
|
char SigninBit[] = "<td><a href=/Node/Signon.html>SYSOP Signin</a></td>";
|
||||||
|
|
||||||
char NodeTail[] =
|
char NodeTail[] =
|
||||||
"<td><a href=/Node/EditCfg.html>Edit Config</a></td>"
|
"<td><a href=/Node/EditCfg.html>Edit Config</a></td>\
|
||||||
"<td><div onmouseover=myShow() class='dropdown'>"
|
<td><div onmouseover=myShow() class='dropdown'>\
|
||||||
"<button class=\"dropbtn\">View Logs</button>"
|
<button class=\"dropbtn\">View Logs</button>\
|
||||||
"<div id=\"myDropdown\" class=\"dropdown-content\">"
|
<div id=\"myDropdown\" class=\"dropdown-content\">\
|
||||||
"<form id = doDate form action='/node/ShowLog.html'><label>"
|
<form id = doDate form action='/node/ShowLog.html'><label>\
|
||||||
"Select Date: <input type='date' name='date' id=e>"
|
Select Date: <input type='date' name='date' id=e>\
|
||||||
"<script>"
|
<script>\
|
||||||
"document.getElementById('e').value = new Date().toISOString().substring(0, 10);"
|
document.getElementById('e').value = new Date().toISOString().substring(0, 10);\
|
||||||
"</script></label>"
|
</script></label>\
|
||||||
"<input type=submit class='btn' name='BBS' value='BBS Log'></br>"
|
<input type=submit class='btn' name='BBS' value='BBS Log'></br>\
|
||||||
"<input type=submit class='btn' name='Debug' value='BBS Debug Log'></br>"
|
<input type=submit class='btn' name='Debug' value='BBS Debug Log'></br>\
|
||||||
"<input type=submit class='btn' name='Telnet' value='Telnet Log'></br>"
|
<input type=submit class='btn' name='Telnet' value='Telnet Log'></br>\
|
||||||
"<input type=submit class='btn' name='CMS' value='CMS Log'></br>"
|
<input type=submit class='btn' name='CMS' value='CMS Log'></br>\
|
||||||
"<input type=submit class='btn' name='Chat' value='Chat Log'></br>"
|
<input type=submit class='btn' name='Chat' value='Chat Log'></br>\
|
||||||
"</form></div>"
|
</form></div>\
|
||||||
"</div>"
|
</div>\
|
||||||
"</td></tr></table>";
|
</td></tr></table>";
|
||||||
|
|
||||||
|
|
||||||
Len = sprintf(Buff, NodeMenuHeader, Mycall);
|
Len = sprintf(Buff, NodeMenuHeader, Mycall);
|
||||||
|
|
@ -1560,10 +1566,9 @@ VOID SaveConfigFile(SOCKET sock , char * MsgPtr, char * Rest, int LOCAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
ReplyLen = sprintf(Reply, "<html><script>alert(\"%s\");window.close();</script></html>", Mess);
|
ReplyLen = sprintf(Reply, "<html><script>alert(\"%s\");window.close();</script></html>", Mess);
|
||||||
HeaderLen = sprintf(Header, "HTTP/1.1 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html\r\n\r\n", ReplyLen + (int)strlen(Tail));
|
HeaderLen = sprintf(Header, "HTTP/1.1 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html\r\n\r\n", ReplyLen);
|
||||||
send(sock, Header, HeaderLen, 0);
|
send(sock, Header, HeaderLen, 0);
|
||||||
send(sock, Reply, ReplyLen, 0);
|
send(sock, Reply, ReplyLen, 0);
|
||||||
send(sock, Tail, (int)strlen(Tail), 0);
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -3942,9 +3947,21 @@ doHeader:
|
||||||
else
|
else
|
||||||
Percent = 0;
|
Percent = 0;
|
||||||
|
|
||||||
ReplyLen += sprintf(&_REPLYBUFFER[ReplyLen], RouteLine, Active, Routes->NEIGHBOUR_PORT, Normcall, locked,
|
if (Routes->INP3Node) // INP3 Enabled?
|
||||||
Routes->NEIGHBOUR_QUAL, NodeCount, Iframes, Retries, Percent, Routes->NBOUR_MAXFRAME, Routes->NBOUR_FRACK,
|
{
|
||||||
Routes->NEIGHBOUR_TIME >> 8, Routes->NEIGHBOUR_TIME & 0xff, Queued, Routes->OtherendsRouteQual);
|
double srtt = Routes->SRTT/100.0;
|
||||||
|
double nsrtt = Routes->NeighbourSRTT/100.0;
|
||||||
|
|
||||||
|
ReplyLen += sprintf(&_REPLYBUFFER[ReplyLen], RouteLineINP3, Active, Routes->NEIGHBOUR_PORT, Normcall, locked,
|
||||||
|
Routes->NEIGHBOUR_QUAL, NodeCount, Iframes, Retries, Percent, Routes->NBOUR_MAXFRAME, Routes->NBOUR_FRACK,
|
||||||
|
Routes->NEIGHBOUR_TIME >> 8, Routes->NEIGHBOUR_TIME & 0xff, Queued, Routes->OtherendsRouteQual, srtt, nsrtt);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ReplyLen += sprintf(&_REPLYBUFFER[ReplyLen], RouteLine, Active, Routes->NEIGHBOUR_PORT, Normcall, locked,
|
||||||
|
Routes->NEIGHBOUR_QUAL, NodeCount, Iframes, Retries, Percent, Routes->NBOUR_MAXFRAME, Routes->NBOUR_FRACK,
|
||||||
|
Routes->NEIGHBOUR_TIME >> 8, Routes->NEIGHBOUR_TIME & 0xff, Queued, Routes->OtherendsRouteQual);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Routes+=1;
|
Routes+=1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
|
|
||||||
char * APIENTRY GetBPQDirectory();
|
char * APIENTRY GetBPQDirectory();
|
||||||
|
|
||||||
int LogAge = 7;
|
int BBSLogAge = 7;
|
||||||
|
|
||||||
BOOL DeletetoRecycleBin = FALSE;
|
BOOL DeletetoRecycleBin = FALSE;
|
||||||
BOOL SuppressMaintEmail = FALSE;
|
BOOL SuppressMaintEmail = FALSE;
|
||||||
|
|
@ -61,7 +61,7 @@ struct Override ** LTFROM;
|
||||||
struct Override ** LTTO;
|
struct Override ** LTTO;
|
||||||
struct Override ** LTAT;
|
struct Override ** LTAT;
|
||||||
|
|
||||||
int DeleteLogFiles();
|
int DeleteBBSLogFiles();
|
||||||
|
|
||||||
VOID SendNonDeliveryMessage(struct MsgInfo * OldMsg, BOOL Forwarded, int Age);
|
VOID SendNonDeliveryMessage(struct MsgInfo * OldMsg, BOOL Forwarded, int Age);
|
||||||
int CreateWPMessage();
|
int CreateWPMessage();
|
||||||
|
|
@ -281,7 +281,7 @@ VOID DoHouseKeeping(BOOL Manual)
|
||||||
|
|
||||||
UpdateWP();
|
UpdateWP();
|
||||||
|
|
||||||
DeleteLogFiles();
|
DeleteBBSLogFiles();
|
||||||
|
|
||||||
RemoveKilledMessages();
|
RemoveKilledMessages();
|
||||||
ExpireMessages();
|
ExpireMessages();
|
||||||
|
|
@ -799,7 +799,7 @@ VOID MailHousekeepingResults()
|
||||||
|
|
||||||
extern UCHAR LogDirectory[260];
|
extern UCHAR LogDirectory[260];
|
||||||
|
|
||||||
int DeleteLogFiles()
|
int DeleteBBSLogFiles()
|
||||||
{
|
{
|
||||||
WIN32_FIND_DATA ffd;
|
WIN32_FIND_DATA ffd;
|
||||||
|
|
||||||
|
|
@ -848,7 +848,7 @@ int DeleteLogFiles()
|
||||||
|
|
||||||
Age = (int)((now - ft.LowPart) / 86400);
|
Age = (int)((now - ft.LowPart) / 86400);
|
||||||
|
|
||||||
if (Age > LogAge)
|
if (Age > BBSLogAge)
|
||||||
{
|
{
|
||||||
sprintf(File, "%s/logs/%s%c", GetLogDirectory(), ffd.cFileName, 0);
|
sprintf(File, "%s/logs/%s%c", GetLogDirectory(), ffd.cFileName, 0);
|
||||||
if (DeletetoRecycleBin)
|
if (DeletetoRecycleBin)
|
||||||
|
|
@ -875,7 +875,7 @@ int Filter(const struct dirent * dir)
|
||||||
return memcmp(dir->d_name, "log", 3) == 0 && strstr(dir->d_name, ".txt");
|
return memcmp(dir->d_name, "log", 3) == 0 && strstr(dir->d_name, ".txt");
|
||||||
}
|
}
|
||||||
|
|
||||||
int DeleteLogFiles()
|
int DeleteBBSLogFiles()
|
||||||
{
|
{
|
||||||
struct dirent **namelist;
|
struct dirent **namelist;
|
||||||
int n;
|
int n;
|
||||||
|
|
@ -897,7 +897,7 @@ int DeleteLogFiles()
|
||||||
{
|
{
|
||||||
Age = (now - STAT.st_mtime) / 86400;
|
Age = (now - STAT.st_mtime) / 86400;
|
||||||
|
|
||||||
if (Age > LogAge)
|
if (Age > BBSLogAge)
|
||||||
{
|
{
|
||||||
printf("Deleting %s\n", FN);
|
printf("Deleting %s\n", FN);
|
||||||
unlink(FN);
|
unlink(FN);
|
||||||
|
|
|
||||||
49
L2Code.c
49
L2Code.c
|
|
@ -20,6 +20,9 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
//
|
//
|
||||||
// C replacement for L2Code.asm
|
// C replacement for L2Code.asm
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#define FRMRHACK
|
||||||
|
|
||||||
#define Kernel
|
#define Kernel
|
||||||
|
|
||||||
#define _CRT_SECURE_NO_DEPRECATE
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
|
|
@ -1215,7 +1218,18 @@ VOID L2LINKACTIVE(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE *
|
||||||
LINK->L2STATE = 2;
|
LINK->L2STATE = 2;
|
||||||
LINK->Ver2point2 = FALSE;
|
LINK->Ver2point2 = FALSE;
|
||||||
LINK->L2TIMER = 1; // Use retry to send SABM
|
LINK->L2TIMER = 1; // Use retry to send SABM
|
||||||
|
LINK->L2RETRIES--; // Make sure at least one is sent
|
||||||
|
|
||||||
|
// if an L3 link mark neighbour as not V2.2
|
||||||
|
|
||||||
|
if (LINK->LINKTYPE == 3)
|
||||||
|
{
|
||||||
|
struct ROUTE * ROUTE = LINK->NEIGHBOUR; // TO NEIGHBOUR
|
||||||
|
|
||||||
|
if (ROUTE)
|
||||||
|
ROUTE->noV2point2 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1901,7 +1915,7 @@ BOOL InternalL2SETUPCROSSLINK(PROUTE ROUTE, int Retries)
|
||||||
else
|
else
|
||||||
LINK->LINKWINDOW = PORT->PORTWINDOW;
|
LINK->LINKWINDOW = PORT->PORTWINDOW;
|
||||||
|
|
||||||
if (SUPPORT2point2)
|
if (SUPPORT2point2 && (ROUTE->noV2point2 == 0))
|
||||||
LINK->L2STATE = 1; // Send XID
|
LINK->L2STATE = 1; // Send XID
|
||||||
else
|
else
|
||||||
LINK->L2STATE = 2;
|
LINK->L2STATE = 2;
|
||||||
|
|
@ -2156,7 +2170,27 @@ VOID L2_PROCESS(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * B
|
||||||
|
|
||||||
// FRAME REJECT RECEIVED - LOG IT AND RESET LINK
|
// FRAME REJECT RECEIVED - LOG IT AND RESET LINK
|
||||||
|
|
||||||
RESET2(LINK);
|
//#ifdef FRMRHACK
|
||||||
|
|
||||||
|
// Treat as DM and break link
|
||||||
|
|
||||||
|
Debugprintf("BPQ32 FRMR received, disconnecting link");
|
||||||
|
|
||||||
|
InformPartner(LINK, LINKLOST); // SEND DISC TO OTHER END
|
||||||
|
L2SENDCOMMAND(LINK, DM);
|
||||||
|
|
||||||
|
CLEAROUTLINK(LINK);
|
||||||
|
|
||||||
|
if (PORT->TNC && PORT->TNC->Hardware == H_KISSHF)
|
||||||
|
DetachKISSHF(PORT);
|
||||||
|
|
||||||
|
PORT->L2FRMRRX++;
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
//#endif
|
||||||
|
|
||||||
|
/* RESET2(LINK);
|
||||||
|
|
||||||
LINK->L2STATE = 2; // INITIALISING
|
LINK->L2STATE = 2; // INITIALISING
|
||||||
LINK->L2ACKREQ = 0; // DONT SEND ANYTHING ELSE
|
LINK->L2ACKREQ = 0; // DONT SEND ANYTHING ELSE
|
||||||
|
|
@ -2166,7 +2200,7 @@ VOID L2_PROCESS(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * B
|
||||||
|
|
||||||
L2SENDCOMMAND(LINK, SABM | PFBIT);
|
L2SENDCOMMAND(LINK, SABM | PFBIT);
|
||||||
return;
|
return;
|
||||||
|
*/
|
||||||
default:
|
default:
|
||||||
|
|
||||||
// ANY OTHER - IGNORE
|
// ANY OTHER - IGNORE
|
||||||
|
|
@ -3829,6 +3863,13 @@ VOID SENDFRMR(struct _LINKTABLE * LINK)
|
||||||
MESSAGE * Buffer;
|
MESSAGE * Buffer;
|
||||||
UCHAR * ptr;
|
UCHAR * ptr;
|
||||||
|
|
||||||
|
#ifdef FRMRHACK // Ignore any frames with invalid n(r). If spurious error retry should fix it. If not link will retry out and reset
|
||||||
|
|
||||||
|
if (LINK->SDREJF & SDNRER)
|
||||||
|
return;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
Buffer = SETUPL2MESSAGE(LINK, FRMR);
|
Buffer = SETUPL2MESSAGE(LINK, FRMR);
|
||||||
|
|
||||||
if (Buffer == NULL)
|
if (Buffer == NULL)
|
||||||
|
|
|
||||||
14
L3Code.c
14
L3Code.c
|
|
@ -620,7 +620,7 @@ VOID PROCROUTES(struct DEST_LIST * DEST, struct ROUTE * ROUTE, int Qual)
|
||||||
if (DEST->DEST_STATE & 0x80) // BBS ENTRY
|
if (DEST->DEST_STATE & 0x80) // BBS ENTRY
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (Index = 0; Index < 4; Index++)
|
for (Index = 0; Index < 3; Index++)
|
||||||
{
|
{
|
||||||
if (DEST->NRROUTE[Index].ROUT_NEIGHBOUR == ROUTE)
|
if (DEST->NRROUTE[Index].ROUT_NEIGHBOUR == ROUTE)
|
||||||
{
|
{
|
||||||
|
|
@ -692,6 +692,7 @@ UpdatateThisEntry:
|
||||||
// IT DID - THIS IS ALSO CALLED BY CHECKL3TABLES. TRY RESETING
|
// IT DID - THIS IS ALSO CALLED BY CHECKL3TABLES. TRY RESETING
|
||||||
// OBS, BUT NOT QUALITY
|
// OBS, BUT NOT QUALITY
|
||||||
|
|
||||||
|
|
||||||
if ((DEST->NRROUTE[Index].ROUT_OBSCOUNT & 0x80) == 0)
|
if ((DEST->NRROUTE[Index].ROUT_OBSCOUNT & 0x80) == 0)
|
||||||
DEST->NRROUTE[Index].ROUT_OBSCOUNT = OBSINIT; // SET OBSOLESCENCE COUNT
|
DEST->NRROUTE[Index].ROUT_OBSCOUNT = OBSINIT; // SET OBSOLESCENCE COUNT
|
||||||
|
|
||||||
|
|
@ -1432,7 +1433,8 @@ VOID L3TRYNEXTDEST(struct ROUTE * ROUTE)
|
||||||
{
|
{
|
||||||
// not Locked
|
// not Locked
|
||||||
|
|
||||||
DEST->NRROUTE[ActiveRoute].ROUT_OBSCOUNT--;
|
if (ActiveRoute < 3) // Not INP3 Route
|
||||||
|
DEST->NRROUTE[ActiveRoute].ROUT_OBSCOUNT--;
|
||||||
|
|
||||||
// if ROUTE HAS EXPIRED - WE SHOULD CLEAR IT, AND MOVE OTHERS (IF ANY) UP
|
// if ROUTE HAS EXPIRED - WE SHOULD CLEAR IT, AND MOVE OTHERS (IF ANY) UP
|
||||||
}
|
}
|
||||||
|
|
@ -1563,7 +1565,10 @@ struct DEST_LIST * CHECKL3TABLES(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * Msg
|
||||||
if (DEST->DEST_ROUTE)
|
if (DEST->DEST_ROUTE)
|
||||||
{
|
{
|
||||||
int Index = DEST->DEST_ROUTE -1;
|
int Index = DEST->DEST_ROUTE -1;
|
||||||
|
|
||||||
|
if (Index > 2) // INP3 Route
|
||||||
|
return DEST;
|
||||||
|
|
||||||
if (DEST->NRROUTE[Index].ROUT_OBSCOUNT & 0x80) // Locked:
|
if (DEST->NRROUTE[Index].ROUT_OBSCOUNT & 0x80) // Locked:
|
||||||
return DEST;
|
return DEST;
|
||||||
|
|
||||||
|
|
@ -1592,6 +1597,9 @@ VOID REFRESHROUTE(TRANSPORTENTRY * Session)
|
||||||
|
|
||||||
Index--;
|
Index--;
|
||||||
|
|
||||||
|
if (Index > 2) // INP3 Route
|
||||||
|
return;
|
||||||
|
|
||||||
if (DEST->NRROUTE[Index].ROUT_OBSCOUNT & 0x80)
|
if (DEST->NRROUTE[Index].ROUT_OBSCOUNT & 0x80)
|
||||||
return; // Locked
|
return; // Locked
|
||||||
|
|
||||||
|
|
|
||||||
31
L4Code.c
31
L4Code.c
|
|
@ -1929,19 +1929,34 @@ void L3SWAPADDRESSES(L3MESSAGEBUFFER * L3MSG)
|
||||||
|
|
||||||
void SendConNAK(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG)
|
void SendConNAK(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG)
|
||||||
{
|
{
|
||||||
|
struct TNCINFO * TNC;
|
||||||
|
|
||||||
L3MSG->L4FLAGS = L4CACK | L4BUSY; // REJECT
|
L3MSG->L4FLAGS = L4CACK | L4BUSY; // REJECT
|
||||||
L3MSG->L4DATA[0] = 0; // WINDOW
|
L3MSG->L4DATA[0] = 0; // WINDOW
|
||||||
|
|
||||||
L3SWAPADDRESSES(L3MSG);
|
L3SWAPADDRESSES(L3MSG);
|
||||||
L3MSG->L3TTL = L3LIVES;
|
L3MSG->L3TTL = L3LIVES;
|
||||||
|
|
||||||
C_Q_ADD(&LINK->TX_Q, L3MSG);
|
TNC = LINK->LINKPORT->TNC;
|
||||||
|
|
||||||
|
if (LINK->NEIGHBOUR && LINK->NEIGHBOUR->TCPPort)
|
||||||
|
{
|
||||||
|
TCPNETROMSend(LINK->NEIGHBOUR, L3MSG);
|
||||||
|
ReleaseBuffer(L3MSG);
|
||||||
|
}
|
||||||
|
else if (TNC && TNC->NetRomMode)
|
||||||
|
SendVARANetromMsg(TNC, L3MSG);
|
||||||
|
else
|
||||||
|
C_Q_ADD(&LINK->TX_Q, L3MSG);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SendL4RESET(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG)
|
VOID SendL4RESET(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG)
|
||||||
{
|
{
|
||||||
// Paula's extension
|
// Paula's extension
|
||||||
|
|
||||||
|
struct TNCINFO * TNC;
|
||||||
|
|
||||||
L3MSG->L4RXNO = L3MSG->L4ID;
|
L3MSG->L4RXNO = L3MSG->L4ID;
|
||||||
L3MSG->L4TXNO = L3MSG->L4INDEX;
|
L3MSG->L4TXNO = L3MSG->L4INDEX;
|
||||||
|
|
||||||
|
|
@ -1951,7 +1966,19 @@ VOID SendL4RESET(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG)
|
||||||
L3MSG->L3TTL = L3LIVES;
|
L3MSG->L3TTL = L3LIVES;
|
||||||
|
|
||||||
L3MSG->LENGTH = (int)(&L3MSG->L4DATA[0] - (UCHAR *)L3MSG);
|
L3MSG->LENGTH = (int)(&L3MSG->L4DATA[0] - (UCHAR *)L3MSG);
|
||||||
C_Q_ADD(&LINK->TX_Q, L3MSG);
|
|
||||||
|
TNC = LINK->LINKPORT->TNC;
|
||||||
|
|
||||||
|
if (LINK->NEIGHBOUR && LINK->NEIGHBOUR->TCPPort)
|
||||||
|
{
|
||||||
|
TCPNETROMSend(LINK->NEIGHBOUR, L3MSG);
|
||||||
|
ReleaseBuffer(L3MSG);
|
||||||
|
}
|
||||||
|
else if (TNC && TNC->NetRomMode)
|
||||||
|
SendVARANetromMsg(TNC, L3MSG);
|
||||||
|
else
|
||||||
|
C_Q_ADD(&LINK->TX_Q, L3MSG);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
5
LinBPQ.c
5
LinBPQ.c
|
|
@ -87,8 +87,6 @@ void CloseAllLinks();
|
||||||
void hookNodeClosing(char * Reason);
|
void hookNodeClosing(char * Reason);
|
||||||
void NETROMTCPResolve();
|
void NETROMTCPResolve();
|
||||||
|
|
||||||
extern uint64_t INP3timeLoadedMS;
|
|
||||||
|
|
||||||
BOOL IncludesMail = FALSE;
|
BOOL IncludesMail = FALSE;
|
||||||
BOOL IncludesChat = FALSE;
|
BOOL IncludesChat = FALSE;
|
||||||
|
|
||||||
|
|
@ -861,8 +859,6 @@ int main(int argc, char * argv[])
|
||||||
if (!isatty(STDOUT_FILENO) || !isatty(STDIN_FILENO))
|
if (!isatty(STDOUT_FILENO) || !isatty(STDIN_FILENO))
|
||||||
Redirected = 1;
|
Redirected = 1;
|
||||||
|
|
||||||
INP3timeLoadedMS = GetTickCount();
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
printf("G8BPQ AX25 Packet Switch System Version %s %s\n", TextVerstring, Datestring);
|
printf("G8BPQ AX25 Packet Switch System Version %s %s\n", TextVerstring, Datestring);
|
||||||
|
|
@ -870,7 +866,6 @@ int main(int argc, char * argv[])
|
||||||
|
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
|
|
||||||
|
|
||||||
// look for optarg format parameters
|
// look for optarg format parameters
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
0
MHSave.txt
Normal file
0
MHSave.txt
Normal file
|
|
@ -1020,8 +1020,7 @@ void WritePacketLogThread(void * param)
|
||||||
int MsgLen;
|
int MsgLen;
|
||||||
MESSAGE * MSG;
|
MESSAGE * MSG;
|
||||||
MESSAGE * Q;
|
MESSAGE * Q;
|
||||||
char buffer[512];
|
char buffer[2048];
|
||||||
|
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
|
|
@ -1075,6 +1074,8 @@ void WritePacketLogThread(void * param)
|
||||||
MsgLen = IntDecodeFrame(MSG, buffer, MSG->Timestamp, 0xffffffffffffffff, FALSE, FALSE);
|
MsgLen = IntDecodeFrame(MSG, buffer, MSG->Timestamp, 0xffffffffffffffff, FALSE, FALSE);
|
||||||
IntSetTraceOptionsEx(MMASK, SaveMTX, SaveMCOM, SaveMUI);
|
IntSetTraceOptionsEx(MMASK, SaveMTX, SaveMCOM, SaveMUI);
|
||||||
|
|
||||||
|
buffer[MsgLen++] = 0x0a; // Add lf
|
||||||
|
|
||||||
fwrite(buffer , 1, MsgLen, Handle);
|
fwrite(buffer , 1, MsgLen, Handle);
|
||||||
|
|
||||||
GetSemaphore(&Semaphore, 101);
|
GetSemaphore(&Semaphore, 101);
|
||||||
|
|
|
||||||
186
NETROMTCP.c
186
NETROMTCP.c
|
|
@ -60,6 +60,7 @@ VOID NETROMMSG(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * L3MSG);
|
||||||
int BPQTRACE(MESSAGE * Msg, BOOL TOAPRS);
|
int BPQTRACE(MESSAGE * Msg, BOOL TOAPRS);
|
||||||
VOID L3LINKCLOSED(struct _LINKTABLE * LINK, int Reason);
|
VOID L3LINKCLOSED(struct _LINKTABLE * LINK, int Reason);
|
||||||
void NetromTCPTrace(struct _MESSAGE * Message, char * Dirn);
|
void NetromTCPTrace(struct _MESSAGE * Message, char * Dirn);
|
||||||
|
void NETROMCloseTCP(struct ROUTE * Route);
|
||||||
|
|
||||||
extern SOCKET NodeAPISocket;
|
extern SOCKET NodeAPISocket;
|
||||||
|
|
||||||
|
|
@ -98,11 +99,11 @@ struct ConnectionInfo * AllocateNRTCPRec()
|
||||||
Info = NRTCPInfo[i] = (struct NRTCPSTRUCT *)zalloc(sizeof(struct NRTCPSTRUCT));
|
Info = NRTCPInfo[i] = (struct NRTCPSTRUCT *)zalloc(sizeof(struct NRTCPSTRUCT));
|
||||||
Info->sockptr = (struct ConnectionInfo *)zalloc(sizeof(struct ConnectionInfo));
|
Info->sockptr = (struct ConnectionInfo *)zalloc(sizeof(struct ConnectionInfo));
|
||||||
Info->LINK = (struct _LINKTABLE *)zalloc(sizeof(struct _LINKTABLE));
|
Info->LINK = (struct _LINKTABLE *)zalloc(sizeof(struct _LINKTABLE));
|
||||||
Info->sockptr->Number = i;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Info = NRTCPInfo[i];
|
Info = NRTCPInfo[i];
|
||||||
|
|
||||||
|
Info->sockptr->Number = i;
|
||||||
sockptr = Info->sockptr;
|
sockptr = Info->sockptr;
|
||||||
|
|
||||||
if (sockptr->SocketActive == FALSE)
|
if (sockptr->SocketActive == FALSE)
|
||||||
|
|
@ -124,6 +125,7 @@ void checkNRTCPSockets(int portNo)
|
||||||
SOCKET maxsock;
|
SOCKET maxsock;
|
||||||
int retval;
|
int retval;
|
||||||
int i;
|
int i;
|
||||||
|
time_t Now = time(NULL);
|
||||||
|
|
||||||
struct timeval timeout;
|
struct timeval timeout;
|
||||||
fd_set readfd, writefd, exceptfd;
|
fd_set readfd, writefd, exceptfd;
|
||||||
|
|
@ -149,9 +151,23 @@ void checkNRTCPSockets(int portNo)
|
||||||
if (sockptr->SocketActive == 0)
|
if (sockptr->SocketActive == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (sockptr->Connected && (Now - sockptr->LastReceiveTime) > 600)
|
||||||
|
{
|
||||||
|
struct NRTCPSTRUCT * Info = NRTCPInfo[sockptr->Number];
|
||||||
|
|
||||||
|
if (Info)
|
||||||
|
Debugprintf("NETROMTCP link to %s idle for too long, closing", Info->Call);
|
||||||
|
else
|
||||||
|
Debugprintf("NETROMTCP link idle for too long, closing");
|
||||||
|
|
||||||
|
NETROMConnectionLost(sockptr);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (sockptr->Connecting)
|
if (sockptr->Connecting)
|
||||||
{
|
{
|
||||||
// look for complete or failed
|
// look for complete or failed
|
||||||
|
|
||||||
FD_SET(sockptr->socket, &writefd);
|
FD_SET(sockptr->socket, &writefd);
|
||||||
FD_SET(sockptr->socket, &exceptfd);
|
FD_SET(sockptr->socket, &exceptfd);
|
||||||
|
|
@ -217,37 +233,26 @@ int NETROMOpenConnection(struct ROUTE * Route)
|
||||||
|
|
||||||
farCall[ConvFromAX25(Route->NEIGHBOUR_CALL, farCall)] = 0;
|
farCall[ConvFromAX25(Route->NEIGHBOUR_CALL, farCall)] = 0;
|
||||||
|
|
||||||
Debugprintf("Opening NRTCP Connection to %s", farCall);
|
|
||||||
|
|
||||||
if (Route->TCPSession)
|
sockptr = AllocateNRTCPRec();
|
||||||
{
|
|
||||||
// SESSION ALREADY EXISTS
|
|
||||||
|
|
||||||
sockptr = Route->TCPSession->sockptr;
|
if (sockptr == NULL)
|
||||||
|
return 0;
|
||||||
if (sockptr->Connected || sockptr->Connecting)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
// previous connect failed
|
Debugprintf("Opening NRTCP Connection to %s index %d", farCall, sockptr->Number);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sockptr = AllocateNRTCPRec();
|
|
||||||
|
|
||||||
if (sockptr == NULL)
|
Info = Route->TCPSession = NRTCPInfo[sockptr->Number];
|
||||||
return 0;
|
memcpy(Info->Call, farCall, 10);
|
||||||
|
Route->NEIGHBOUR_LINK = Info->LINK;
|
||||||
|
|
||||||
Info = Route->TCPSession = NRTCPInfo[sockptr->Number];
|
Info->Route = Route;
|
||||||
memcpy(Info->Call, farCall, 10);
|
Info->LINK->NEIGHBOUR = Route;
|
||||||
Route->NEIGHBOUR_LINK = Info->LINK;
|
Info->LINK->LINKPORT = GetPortTableEntryFromPortNum(Route->NEIGHBOUR_PORT);
|
||||||
|
memcpy(Route->NEIGHBOUR_LINK->LINKCALL, Route->NEIGHBOUR_CALL, 7);
|
||||||
|
|
||||||
Info->Route = Route;
|
Route->NEIGHBOUR_LINK = Route->TCPSession->LINK; // Just in case!
|
||||||
Info->LINK->NEIGHBOUR = Route;
|
|
||||||
Info->LINK->LINKPORT = GetPortTableEntryFromPortNum(Route->NEIGHBOUR_PORT);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NETROMTCPConnect(Route, sockptr);
|
return NETROMTCPConnect(Route, sockptr);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETROMTCPResolve()
|
void NETROMTCPResolve()
|
||||||
|
|
@ -300,6 +305,14 @@ int NETROMTCPConnect(struct ROUTE * Route, struct ConnectionInfo * sockptr)
|
||||||
char PortString[20];
|
char PortString[20];
|
||||||
struct addrinfo * res = Route->TCPAddress;
|
struct addrinfo * res = Route->TCPAddress;
|
||||||
int Port = Route->TCPPort;
|
int Port = Route->TCPPort;
|
||||||
|
struct sockaddr_in my_addr;
|
||||||
|
socklen_t len = sizeof(my_addr);
|
||||||
|
struct NRTCPSTRUCT * Info = NRTCPInfo[sockptr->Number];
|
||||||
|
|
||||||
|
// Get my ip address and port
|
||||||
|
|
||||||
|
memset(&my_addr, 0, sizeof(my_addr));
|
||||||
|
getsockname(sockptr->socket, (struct sockaddr *) &my_addr, &len);
|
||||||
|
|
||||||
sprintf(PortString, "%d", Port);
|
sprintf(PortString, "%d", Port);
|
||||||
|
|
||||||
|
|
@ -332,6 +345,7 @@ int NETROMTCPConnect(struct ROUTE * Route, struct ConnectionInfo * sockptr)
|
||||||
//
|
//
|
||||||
|
|
||||||
sockptr->Connected = TRUE;
|
sockptr->Connected = TRUE;
|
||||||
|
sockptr->LastReceiveTime = time(NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -341,8 +355,15 @@ int NETROMTCPConnect(struct ROUTE * Route, struct ConnectionInfo * sockptr)
|
||||||
if (err == 10035 || err == 115 || err == 36) //EWOULDBLOCK
|
if (err == 10035 || err == 115 || err == 36) //EWOULDBLOCK
|
||||||
{
|
{
|
||||||
// Connect in Progress
|
// Connect in Progress
|
||||||
|
|
||||||
sockptr->Connecting = TRUE;
|
sockptr->Connecting = TRUE;
|
||||||
|
|
||||||
|
// Get my ip address and port
|
||||||
|
memset(&my_addr, 0, sizeof(my_addr));
|
||||||
|
getsockname(sockptr->socket, (struct sockaddr *) &my_addr, &len);
|
||||||
|
Route->localport = htons(my_addr.sin_port);
|
||||||
|
|
||||||
|
Debugprintf("NRTCP Connection in progress %s local port %d", Info->Call, Route->localport);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -365,18 +386,32 @@ void NETROMConnectionAccepted(struct ConnectionInfo * sockptr)
|
||||||
{
|
{
|
||||||
// Not sure we can do much here until first message arrives with callsign
|
// Not sure we can do much here until first message arrives with callsign
|
||||||
|
|
||||||
|
struct sockaddr_in my_addr;
|
||||||
|
socklen_t len = sizeof(my_addr);
|
||||||
|
|
||||||
|
// Get my ip address and port
|
||||||
|
|
||||||
|
memset(&my_addr, 0, sizeof(my_addr));
|
||||||
|
// getsockname(sockptr->socket, (struct sockaddr *) &my_addr, &len);
|
||||||
|
|
||||||
|
Debugprintf("INP3 Accept() Local port %d", htons(sockptr->sin.sin_port));
|
||||||
|
|
||||||
sockptr->Connected = TRUE;
|
sockptr->Connected = TRUE;
|
||||||
Debugprintf("NRTCP Connection Accepted");
|
sockptr->LastReceiveTime = time(NULL);
|
||||||
|
// Debugprintf("NRTCP Connection Accepted");
|
||||||
}
|
}
|
||||||
|
|
||||||
void NETROMConnected(struct ConnectionInfo * sockptr, SOCKET sock, struct NRTCPSTRUCT * Info)
|
void NETROMConnected(struct ConnectionInfo * sockptr, SOCKET sock, struct NRTCPSTRUCT * Info)
|
||||||
{
|
{
|
||||||
// Connection Complete
|
// Connection Complete
|
||||||
|
|
||||||
Debugprintf("NRTCP Connected");
|
// Debugprintf("NRTCP Connected");
|
||||||
|
|
||||||
|
Debugprintf("NRTCP Connection Complete %s Local port %d", Info->Call, Info->Route->localport);
|
||||||
|
|
||||||
sockptr->Connecting = FALSE;
|
sockptr->Connecting = FALSE;
|
||||||
sockptr->Connected = TRUE;
|
sockptr->Connected = TRUE;
|
||||||
|
sockptr->LastReceiveTime = time(NULL);
|
||||||
|
|
||||||
Info->LINK->L2STATE = 5;
|
Info->LINK->L2STATE = 5;
|
||||||
|
|
||||||
|
|
@ -409,6 +444,8 @@ int DataSocket_ReadNETROM(struct ConnectionInfo * sockptr, SOCKET sock, struct N
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sockptr->LastReceiveTime = time(NULL);
|
||||||
|
|
||||||
sockptr->InputLen += len;
|
sockptr->InputLen += len;
|
||||||
|
|
||||||
// Process data
|
// Process data
|
||||||
|
|
@ -428,8 +465,6 @@ checkLen:
|
||||||
|
|
||||||
// This must be an incoming connection as Call is set before calling so need to find route record and set things up.
|
// This must be an incoming connection as Call is set before calling so need to find route record and set things up.
|
||||||
|
|
||||||
Debugprintf("New NRTCP Connection from %s", Msg->Call);
|
|
||||||
|
|
||||||
memcpy(Info->Call, Msg->Call, 10);
|
memcpy(Info->Call, Msg->Call, 10);
|
||||||
|
|
||||||
ConvToAX25(Msg->Call, axCall);
|
ConvToAX25(Msg->Call, axCall);
|
||||||
|
|
@ -443,7 +478,12 @@ checkLen:
|
||||||
Info->LINK->LINKPORT = GetPortTableEntryFromPortNum(portNo);
|
Info->LINK->LINKPORT = GetPortTableEntryFromPortNum(portNo);
|
||||||
Route->TCPSession = Info;
|
Route->TCPSession = Info;
|
||||||
Info->LINK->L2STATE = 5;
|
Info->LINK->L2STATE = 5;
|
||||||
|
memcpy(Route->NEIGHBOUR_LINK->LINKCALL, axCall, 7);
|
||||||
|
Route->localport = htons(sockptr->sin.sin_port);
|
||||||
|
|
||||||
|
Debugprintf("New NRTCP Connection from %s port %d", Msg->Call, Route->localport);
|
||||||
|
|
||||||
|
|
||||||
if (Info->Route->INP3Node)
|
if (Info->Route->INP3Node)
|
||||||
SendRTTMsg(Info->Route);
|
SendRTTMsg(Info->Route);
|
||||||
}
|
}
|
||||||
|
|
@ -458,11 +498,15 @@ checkLen:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (memcmp(Info->Call, Msg->Call, 10) != 0)
|
if (memcmp(Info->Call, Msg->Call, 10) != 0)
|
||||||
{
|
{
|
||||||
Debugprintf("Mismatch");
|
Debugprintf("NRTCP Mismatch - closing connection");
|
||||||
// something wrong - maybe connection reused
|
|
||||||
|
closesocket(sockptr->socket);
|
||||||
|
sockptr->SocketActive = FALSE;
|
||||||
|
memset(sockptr, 0, sizeof(struct ConnectionInfo));
|
||||||
|
Info->Call[0] = 0;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Format as if come from an ax.25 link
|
// Format as if come from an ax.25 link
|
||||||
|
|
@ -505,6 +549,8 @@ checkLen:
|
||||||
ReleaseBuffer(Buffer);
|
ReleaseBuffer(Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info->Route->NEIGHBOUR_LINK = Info->LINK; // Just in case!
|
||||||
|
|
||||||
NETROMMSG(Info->LINK, L3Msg);
|
NETROMMSG(Info->LINK, L3Msg);
|
||||||
|
|
||||||
seeifMore:
|
seeifMore:
|
||||||
|
|
@ -527,6 +573,9 @@ VOID TCPNETROMSend(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Frame)
|
||||||
int DataLen = Frame->LENGTH - (MSGHDDRLEN + 1); // Not including PID
|
int DataLen = Frame->LENGTH - (MSGHDDRLEN + 1); // Not including PID
|
||||||
int Ret;
|
int Ret;
|
||||||
PMESSAGE Buffer;
|
PMESSAGE Buffer;
|
||||||
|
struct sockaddr_in my_addr;
|
||||||
|
socklen_t len = sizeof(my_addr);
|
||||||
|
struct ConnectionInfo * sockptr;
|
||||||
|
|
||||||
Msg.Length = DataLen + 13; // include PID
|
Msg.Length = DataLen + 13; // include PID
|
||||||
memcpy(Msg.Call, MYNETROMCALL, 10);
|
memcpy(Msg.Call, MYNETROMCALL, 10);
|
||||||
|
|
@ -536,6 +585,47 @@ VOID TCPNETROMSend(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Frame)
|
||||||
if (Route->TCPSession == 0)
|
if (Route->TCPSession == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
sockptr = Route->TCPSession->sockptr;
|
||||||
|
|
||||||
|
// Get other port
|
||||||
|
|
||||||
|
if (strcmp(Route->TCPHost, "0.0.0.0") == 0)
|
||||||
|
{
|
||||||
|
// incoming
|
||||||
|
|
||||||
|
// Debugprintf("INP3 Remote port %d", htons(sockptr->sin.sin_port));
|
||||||
|
|
||||||
|
if (Route->localport != htons(sockptr->sin.sin_port))
|
||||||
|
{
|
||||||
|
// Route is linked to wrong session. Close it
|
||||||
|
|
||||||
|
// Route->TCPSession = 0;
|
||||||
|
// Route->NEIGHBOUR_LINK = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// outgoing
|
||||||
|
|
||||||
|
memset(&my_addr, 0, sizeof(my_addr));
|
||||||
|
|
||||||
|
getsockname(sockptr->socket, (struct sockaddr *) &my_addr, &len);
|
||||||
|
// Debugprintf("INP3 Local port %d", htons(my_addr.sin_port));
|
||||||
|
|
||||||
|
if (Route->localport != htons(my_addr.sin_port))
|
||||||
|
{
|
||||||
|
// Route is linked to wrong session. Close it
|
||||||
|
|
||||||
|
// if (sockptr->Connecting == 0)
|
||||||
|
// {
|
||||||
|
// Route->TCPSession = 0;
|
||||||
|
// Route->NEIGHBOUR_LINK = 0;
|
||||||
|
// }
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Ret = send(Route->TCPSession->sockptr->socket, (char *)&Msg, DataLen + 13, 0);
|
Ret = send(Route->TCPSession->sockptr->socket, (char *)&Msg, DataLen + 13, 0);
|
||||||
|
|
||||||
// Create a dummy L2 message so we can trace it
|
// Create a dummy L2 message so we can trace it
|
||||||
|
|
@ -548,7 +638,7 @@ VOID TCPNETROMSend(struct ROUTE * Route, struct _L3MESSAGEBUFFER * Frame)
|
||||||
Buffer->CTL = 0;
|
Buffer->CTL = 0;
|
||||||
Buffer->PORT = Route->NEIGHBOUR_PORT;
|
Buffer->PORT = Route->NEIGHBOUR_PORT;
|
||||||
|
|
||||||
ConvToAX25(Route->TCPSession->Call, Buffer->DEST);
|
memcpy(Buffer->DEST, Route->NEIGHBOUR_CALL, 7);
|
||||||
ConvToAX25(MYNETROMCALL, Buffer->ORIGIN);
|
ConvToAX25(MYNETROMCALL, Buffer->ORIGIN);
|
||||||
|
|
||||||
memcpy(Buffer->L2DATA, &Frame->L3SRCE[0], DataLen);
|
memcpy(Buffer->L2DATA, &Frame->L3SRCE[0], DataLen);
|
||||||
|
|
@ -583,16 +673,15 @@ void NETROMConnectionLost(struct ConnectionInfo * sockptr)
|
||||||
{
|
{
|
||||||
Route = Info->Route;
|
Route = Info->Route;
|
||||||
|
|
||||||
if (sockptr->Connected)
|
|
||||||
L3LINKCLOSED(Info->LINK, LINKLOST);
|
|
||||||
|
|
||||||
if (sockptr->Connecting)
|
|
||||||
L3LINKCLOSED(Info->LINK, SETUPFAILED);
|
|
||||||
|
|
||||||
if (Route)
|
if (Route)
|
||||||
|
{
|
||||||
|
Route->NEIGHBOUR_LINK = 0;
|
||||||
Route->TCPSession = 0;
|
Route->TCPSession = 0;
|
||||||
|
Route->localport = 0;
|
||||||
|
}
|
||||||
|
|
||||||
Info->Call[0] = 0;
|
Info->Call[0] = 0;
|
||||||
|
Info->LINK->L2STATE = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sockptr->SocketActive = FALSE;
|
sockptr->SocketActive = FALSE;
|
||||||
|
|
@ -600,3 +689,18 @@ void NETROMConnectionLost(struct ConnectionInfo * sockptr)
|
||||||
memset(sockptr, 0, sizeof(struct ConnectionInfo));
|
memset(sockptr, 0, sizeof(struct ConnectionInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NETROMCloseTCP(struct ROUTE * Route)
|
||||||
|
{
|
||||||
|
if (Route->TCPSession)
|
||||||
|
{
|
||||||
|
struct ConnectionInfo * sockptr = Route->TCPSession->sockptr;
|
||||||
|
NETROMConnectionLost(sockptr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Route->NEIGHBOUR_LINK = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
6
RHP.c
6
RHP.c
|
|
@ -387,6 +387,12 @@ int processRHCPOpen(struct ConnectionInfo * sockptr, SOCKET Socket, char * Msg,
|
||||||
if (_stricmp(pfam, "ax25") != 0)
|
if (_stricmp(pfam, "ax25") != 0)
|
||||||
return sprintf(ReplyBuffer, "{\"type\": \"openReply\", \"id\": %d, \"handle\": %d, \"errCode\": 12, \"errText\": \"Bad parameter\"}", ID, 0);
|
return sprintf(ReplyBuffer, "{\"type\": \"openReply\", \"id\": %d, \"handle\": %d, \"errCode\": 12, \"errText\": \"Bad parameter\"}", ID, 0);
|
||||||
|
|
||||||
|
if (strlen(Local) > 10)
|
||||||
|
return sprintf(ReplyBuffer, "{\"type\": \"openReply\", \"id\": %d, \"handle\": %d, \"errCode\": 6, \"errText\": \"%s\"}", ID, 0, ErrCodes[6]);
|
||||||
|
|
||||||
|
if (strlen(Remote) > 10)
|
||||||
|
return sprintf(ReplyBuffer, "{\"type\": \"openReply\", \"id\": %d, \"handle\": %d, \"errCode\": 7, \"errText\": \"%s\"}", ID, 0, ErrCodes[7]);
|
||||||
|
|
||||||
if (_stricmp(Mode, "stream") == 0)
|
if (_stricmp(Mode, "stream") == 0)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|
|
||||||
145
TelnetV6.c
145
TelnetV6.c
|
|
@ -56,6 +56,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
|
|
||||||
extern UCHAR LogDirectory[];
|
extern UCHAR LogDirectory[];
|
||||||
|
|
||||||
|
extern int MONTOFILEFLAG;
|
||||||
|
|
||||||
static char ClassName[]="TELNETSERVER";
|
static char ClassName[]="TELNETSERVER";
|
||||||
static char WindowTitle[] = "Telnet Server";
|
static char WindowTitle[] = "Telnet Server";
|
||||||
|
|
@ -177,77 +178,73 @@ void NETROMConnectionLost(struct ConnectionInfo * sockptr);
|
||||||
void NETROMConnectionAccepted(struct ConnectionInfo * sockptr);
|
void NETROMConnectionAccepted(struct ConnectionInfo * sockptr);
|
||||||
struct ConnectionInfo * AllocateNRTCPRec();
|
struct ConnectionInfo * AllocateNRTCPRec();
|
||||||
|
|
||||||
static int LogAge = 13;
|
int DeleteLogFile(char * Log, int KeepDays);
|
||||||
|
|
||||||
|
void DeleteLogFiles(int Age)
|
||||||
|
{
|
||||||
|
DeleteLogFile("Telnet", Age);
|
||||||
|
DeleteLogFile("CMSAccess_", Age);
|
||||||
|
DeleteLogFile("ConnectLog_",Age);
|
||||||
|
DeleteLogFile("APRS_", Age);
|
||||||
|
if (MONTOFILEFLAG)
|
||||||
|
DeleteLogFile("PacketLog_", MONTOFILEFLAG);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
int DeleteLogFile(char * Log);
|
int DeleteLogFile(char * Log, int KeepDays)
|
||||||
|
|
||||||
void DeleteTelnetLogFiles()
|
|
||||||
{
|
{
|
||||||
DeleteLogFile("/logs/Telnet*.log");
|
|
||||||
DeleteLogFile("/logs/CMSAccess_*.log");
|
|
||||||
DeleteLogFile("/logs/ConnectLog_*.log");
|
|
||||||
}
|
|
||||||
|
|
||||||
int DeleteLogFile(char * Log)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
WIN32_FIND_DATA ffd;
|
WIN32_FIND_DATA ffd;
|
||||||
|
|
||||||
char szDir[MAX_PATH];
|
char szDir[MAX_PATH];
|
||||||
char File[MAX_PATH];
|
char File[MAX_PATH];
|
||||||
HANDLE hFind = INVALID_HANDLE_VALUE;
|
HANDLE hFind = INVALID_HANDLE_VALUE;
|
||||||
DWORD dwError=0;
|
DWORD dwError=0;
|
||||||
LARGE_INTEGER ft;
|
LARGE_INTEGER ft;
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
int Age;
|
int Age;
|
||||||
|
|
||||||
// Prepare string for use with FindFile functions. First, copy the
|
|
||||||
// string to a buffer, then append '\*' to the directory name.
|
|
||||||
|
|
||||||
strcpy(szDir, GetLogDirectory());
|
strcpy(szDir, GetLogDirectory());
|
||||||
strcat(szDir, Log);
|
strcat(szDir, "/Logs/");
|
||||||
|
strcat(szDir, Log);
|
||||||
|
strcat(szDir, "*.log");
|
||||||
|
|
||||||
// Find the first file in the directory.
|
// Find the first file in the directory.
|
||||||
|
|
||||||
hFind = FindFirstFile(szDir, &ffd);
|
hFind = FindFirstFile(szDir, &ffd);
|
||||||
|
|
||||||
if (INVALID_HANDLE_VALUE == hFind)
|
if (INVALID_HANDLE_VALUE == hFind)
|
||||||
return dwError;
|
return dwError;
|
||||||
|
|
||||||
// List all the files in the directory with some info about them.
|
do
|
||||||
|
{
|
||||||
|
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||||
|
{
|
||||||
|
OutputDebugString(ffd.cFileName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ft.HighPart = ffd.ftCreationTime.dwHighDateTime;
|
||||||
|
ft.LowPart = ffd.ftCreationTime.dwLowDateTime;
|
||||||
|
|
||||||
do
|
ft.QuadPart -= 116444736000000000;
|
||||||
{
|
ft.QuadPart /= 10000000;
|
||||||
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
|
||||||
{
|
|
||||||
OutputDebugString(ffd.cFileName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ft.HighPart = ffd.ftCreationTime.dwHighDateTime;
|
|
||||||
ft.LowPart = ffd.ftCreationTime.dwLowDateTime;
|
|
||||||
|
|
||||||
ft.QuadPart -= 116444736000000000;
|
Age = (int)((now - ft.LowPart) / 86400);
|
||||||
ft.QuadPart /= 10000000;
|
|
||||||
|
|
||||||
Age = (int)((now - ft.LowPart) / 86400);
|
if (Age > KeepDays)
|
||||||
|
{
|
||||||
|
sprintf(File, "%s/logs/%s%c", GetLogDirectory(), ffd.cFileName, 0);
|
||||||
|
Debugprintf("Deleting %s", File);
|
||||||
|
DeleteFile(File);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (FindNextFile(hFind, &ffd) != 0);
|
||||||
|
|
||||||
if (Age > LogAge)
|
FindClose(hFind);
|
||||||
{
|
return dwError;
|
||||||
sprintf(File, "%s/logs/%s%c", GetLogDirectory(), ffd.cFileName, 0);
|
|
||||||
Debugprintf("Deleting %s", File);
|
|
||||||
DeleteFile(File);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
while (FindNextFile(hFind, &ffd) != 0);
|
|
||||||
|
|
||||||
FindClose(hFind);
|
|
||||||
return dwError;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
@ -256,22 +253,19 @@ int DeleteLogFile(char * Log)
|
||||||
|
|
||||||
int TelFilter(const struct dirent * dir)
|
int TelFilter(const struct dirent * dir)
|
||||||
{
|
{
|
||||||
return (memcmp(dir->d_name, "CMSAccess", 9) == 0
|
return strstr(dir->d_name, ".log") != 0;
|
||||||
|| memcmp(dir->d_name, "Telnet", 6) == 0
|
|
||||||
|| memcmp(dir->d_name, "ConnectLog", 6) == 0)
|
|
||||||
&& strstr(dir->d_name, ".log");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int DeleteTelnetLogFiles()
|
int DeleteLogFile(char * Log, int KeepDays)
|
||||||
{
|
{
|
||||||
struct dirent **namelist;
|
struct dirent **namelist;
|
||||||
int n;
|
int n;
|
||||||
struct stat STAT;
|
struct stat STAT;
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
int Age = 0, res;
|
int Age = 0, res;
|
||||||
char FN[256];
|
char FN[256];
|
||||||
|
|
||||||
n = scandir("logs", &namelist, TelFilter, alphasort);
|
n = scandir("logs", &namelist, TelFilter, alphasort);
|
||||||
|
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
perror("scandir");
|
perror("scandir");
|
||||||
|
|
@ -279,21 +273,25 @@ int DeleteTelnetLogFiles()
|
||||||
{
|
{
|
||||||
while(n--)
|
while(n--)
|
||||||
{
|
{
|
||||||
sprintf(FN, "logs/%s", namelist[n]->d_name);
|
if (memcmp(namelist[n]->d_name, Log, strlen(Log)) == 0)
|
||||||
if (stat(FN, &STAT) == 0)
|
|
||||||
{
|
{
|
||||||
Age = (now - STAT.st_mtime) / 86400;
|
sprintf(FN, "logs/%s", namelist[n]->d_name);
|
||||||
|
|
||||||
if (Age > LogAge)
|
if (stat(FN, &STAT) == 0)
|
||||||
{
|
{
|
||||||
Debugprintf("Deleting %s\n", FN);
|
Age = (now - STAT.st_mtime) / 86400;
|
||||||
unlink(FN);
|
|
||||||
|
if (Age > KeepDays)
|
||||||
|
{
|
||||||
|
Debugprintf("Deleting %s", FN);
|
||||||
|
unlink(FN);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(namelist[n]);
|
free(namelist[n]);
|
||||||
}
|
}
|
||||||
free(namelist);
|
free(namelist);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -320,7 +318,7 @@ void BuffertoNode(struct ConnectionInfo * sockptr, char * MsgPtr, int InputLen)
|
||||||
sockptr->InputLen = 0;
|
sockptr->InputLen = 0;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL SendAndCheck(struct ConnectionInfo * sockptr, unsigned char * MsgPtr, int len, int flags)
|
BOOL SendAndCheck(struct ConnectionInfo * sockptr, unsigned char * MsgPtr, int len, int flags)
|
||||||
{
|
{
|
||||||
|
|
@ -331,7 +329,7 @@ BOOL SendAndCheck(struct ConnectionInfo * sockptr, unsigned char * MsgPtr, int l
|
||||||
return TRUE; // OK
|
return TRUE; // OK
|
||||||
|
|
||||||
err = WSAGetLastError();
|
err = WSAGetLastError();
|
||||||
|
|
||||||
Debugprintf("TCP Send Failed - Sent %d should be %d err %d - requeue data", sent, len, err);
|
Debugprintf("TCP Send Failed - Sent %d should be %d err %d - requeue data", sent, len, err);
|
||||||
|
|
||||||
if (err == 10035 || err == 115 || err == 36) //EWOULDBLOCK
|
if (err == 10035 || err == 115 || err == 36) //EWOULDBLOCK
|
||||||
|
|
@ -1194,6 +1192,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
|
|
||||||
TNC = TNCInfo[n];
|
TNC = TNCInfo[n];
|
||||||
TNC->Port = n;
|
TNC->Port = n;
|
||||||
|
TNC->PortRecord = PortRecord;
|
||||||
TNC->PortRecord->PORTCONTROL.HWType = TNC->Hardware = H_TELNET;
|
TNC->PortRecord->PORTCONTROL.HWType = TNC->Hardware = H_TELNET;
|
||||||
TNC->RIG = &TNC->DummyRig; // Not using Rig control, so use Dummy
|
TNC->RIG = &TNC->DummyRig; // Not using Rig control, so use Dummy
|
||||||
|
|
||||||
|
|
@ -1445,8 +1444,6 @@ void * TelnetExtInit(EXTPORTDATA * PortEntry)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DeleteTelnetLogFiles();
|
|
||||||
|
|
||||||
initUTF8();
|
initUTF8();
|
||||||
|
|
||||||
sprintf(msg,"Telnet Server ");
|
sprintf(msg,"Telnet Server ");
|
||||||
|
|
|
||||||
|
|
@ -10,15 +10,15 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KVers 6,0,25,11
|
#define KVers 6,0,25,15
|
||||||
#define KVerstring "6.0.25.11\0"
|
#define KVerstring "6.0.25.15\0"
|
||||||
|
|
||||||
|
|
||||||
#ifdef CKernel
|
#ifdef CKernel
|
||||||
|
|
||||||
#define Vers KVers
|
#define Vers KVers
|
||||||
#define Verstring KVerstring
|
#define Verstring KVerstring
|
||||||
#define Datestring "October 2025"
|
#define Datestring "December 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"
|
||||||
|
|
|
||||||
4
WINMOR.c
4
WINMOR.c
|
|
@ -2929,7 +2929,7 @@ BOOL RestartTNC(struct TNCINFO * TNC)
|
||||||
SOCKET sock = socket(AF_INET,SOCK_DGRAM,0);
|
SOCKET sock = socket(AF_INET,SOCK_DGRAM,0);
|
||||||
struct sockaddr_in destaddr;
|
struct sockaddr_in destaddr;
|
||||||
|
|
||||||
Debugprintf("trying to restart TNC %s", TNC->ProgramPath);
|
// Debugprintf("trying to restart TNC %s", TNC->ProgramPath);
|
||||||
|
|
||||||
if (sock == INVALID_SOCKET)
|
if (sock == INVALID_SOCKET)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -2952,7 +2952,7 @@ BOOL RestartTNC(struct TNCINFO * TNC)
|
||||||
|
|
||||||
n = sendto(sock, TNC->ProgramPath, (int)strlen(TNC->ProgramPath), 0, (struct sockaddr *)&destaddr, sizeof(destaddr));
|
n = sendto(sock, TNC->ProgramPath, (int)strlen(TNC->ProgramPath), 0, (struct sockaddr *)&destaddr, sizeof(destaddr));
|
||||||
|
|
||||||
Debugprintf("Restart TNC - sendto returned %d", n);
|
// Debugprintf("Restart TNC - sendto returned %d", n);
|
||||||
|
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
closesocket(sock);
|
closesocket(sock);
|
||||||
|
|
|
||||||
4
WinRPR.c
4
WinRPR.c
|
|
@ -120,7 +120,7 @@ static BOOL RestartTNC(struct TNCINFO * TNC)
|
||||||
SOCKET sock = socket(AF_INET,SOCK_DGRAM,0);
|
SOCKET sock = socket(AF_INET,SOCK_DGRAM,0);
|
||||||
struct sockaddr_in destaddr;
|
struct sockaddr_in destaddr;
|
||||||
|
|
||||||
Debugprintf("trying to restart TNC %s", TNC->ProgramPath);
|
// Debugprintf("trying to restart TNC %s", TNC->ProgramPath);
|
||||||
|
|
||||||
if (sock == INVALID_SOCKET)
|
if (sock == INVALID_SOCKET)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -143,7 +143,7 @@ static BOOL RestartTNC(struct TNCINFO * TNC)
|
||||||
|
|
||||||
n = sendto(sock, TNC->ProgramPath, (int)strlen(TNC->ProgramPath), 0, (struct sockaddr *)&destaddr, sizeof(destaddr));
|
n = sendto(sock, TNC->ProgramPath, (int)strlen(TNC->ProgramPath), 0, (struct sockaddr *)&destaddr, sizeof(destaddr));
|
||||||
|
|
||||||
Debugprintf("Restart TNC - sendto returned %d", n);
|
// Debugprintf("Restart TNC - sendto returned %d", n);
|
||||||
|
|
||||||
Sleep(100);
|
Sleep(100);
|
||||||
closesocket(sock);
|
closesocket(sock);
|
||||||
|
|
|
||||||
21
asmstrucs.h
21
asmstrucs.h
|
|
@ -258,6 +258,9 @@ typedef struct ROUTE
|
||||||
int TCPPort;
|
int TCPPort;
|
||||||
struct NRTCPSTRUCT * TCPSession;
|
struct NRTCPSTRUCT * TCPSession;
|
||||||
struct addrinfo * TCPAddress; // Resolved Address
|
struct addrinfo * TCPAddress; // Resolved Address
|
||||||
|
int localport; // for consistancy check
|
||||||
|
int recNum; // This entry's index it Routes table
|
||||||
|
int noV2point2; // Set to force V2.0 connect. Can be set in config or dynamically learned
|
||||||
|
|
||||||
} *PROUTE;
|
} *PROUTE;
|
||||||
|
|
||||||
|
|
@ -265,10 +268,8 @@ typedef struct ROUTE
|
||||||
|
|
||||||
#define GotRTTRequest 1 // Other end has sent us a RTT Packet
|
#define GotRTTRequest 1 // Other end has sent us a RTT Packet
|
||||||
#define GotRTTResponse 2 // Other end has sent us a RTT Response
|
#define GotRTTResponse 2 // Other end has sent us a RTT Response
|
||||||
#define GotRIF 4 // Other end has sent RIF, so is probably an INP3 Node
|
#define SentRTTRequest 4
|
||||||
// (could just be monitoring RTT for some reason
|
#define SentOurRIF 8 // Set when we have sent a rif for our Call and any ApplCalls
|
||||||
#define SentRTTRequest 8
|
|
||||||
#define SentOurRIF 16 // Set when we have sent a rif for our Call and any ApplCalls
|
|
||||||
// (only sent when we have seen both a request and response)
|
// (only sent when we have seen both a request and response)
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
@ -480,18 +481,18 @@ typedef struct _APPLCALLS
|
||||||
typedef struct NR_DEST_ROUTE_ENTRY
|
typedef struct NR_DEST_ROUTE_ENTRY
|
||||||
{
|
{
|
||||||
struct ROUTE * ROUT_NEIGHBOUR; // POINTER TO NEXT NODE IN PATH
|
struct ROUTE * ROUT_NEIGHBOUR; // POINTER TO NEXT NODE IN PATH
|
||||||
UCHAR ROUT_QUALITY; // QUALITY
|
uint16_t * Dummy; // Padding so records are same length
|
||||||
|
UCHAR ROUT_QUALITY; // QUALITY
|
||||||
UCHAR ROUT_OBSCOUNT;
|
UCHAR ROUT_OBSCOUNT;
|
||||||
UCHAR ROUT_LOCKED;
|
UCHAR ROUT_LOCKED;
|
||||||
UCHAR Padding[4]; // So Entries are the same length
|
|
||||||
} *PNR_DEST_ROUTE_ENTRY;
|
} *PNR_DEST_ROUTE_ENTRY;
|
||||||
|
|
||||||
typedef struct INP3_DEST_ROUTE_ENTRY
|
typedef struct INP3_DEST_ROUTE_ENTRY
|
||||||
{
|
{
|
||||||
struct ROUTE * ROUT_NEIGHBOUR; // POINTER TO NEXT NODE IN PATH
|
struct ROUTE * ROUT_NEIGHBOUR; // POINTER TO NEXT NODE IN PATH
|
||||||
USHORT LastRTT; // Last Value Reported
|
uint16_t * RouteLastTT; // Last time sent should be saved for each neighbour. Area is mallod'ed as needed
|
||||||
USHORT RTT; // Current
|
USHORT STT; // Current time to dest from here (was called RTT but is one way not round trip.
|
||||||
USHORT SRTT; // Smoothed RTT
|
// Is actually a smoothed value as is calculated from smoothed link times)
|
||||||
UCHAR Hops;
|
UCHAR Hops;
|
||||||
} *PDEST_ROUTE_ENTRY;
|
} *PDEST_ROUTE_ENTRY;
|
||||||
|
|
||||||
|
|
@ -744,6 +745,8 @@ typedef struct PORTCONTROL
|
||||||
|
|
||||||
int Hardware; // TNC H_TYPE. Copied here for access from application context
|
int Hardware; // TNC H_TYPE. Copied here for access from application context
|
||||||
int isRF; // For API reporting. -1 is unspecified
|
int isRF; // For API reporting. -1 is unspecified
|
||||||
|
int SENDRIFTIMER;
|
||||||
|
time_t LastRIFTime;
|
||||||
|
|
||||||
|
|
||||||
} PORTCONTROLX, *PPORTCONTROL;
|
} PORTCONTROLX, *PPORTCONTROL;
|
||||||
|
|
|
||||||
|
|
@ -1591,7 +1591,7 @@ extern RECT DebugRect;
|
||||||
extern HWND hMonitor;
|
extern HWND hMonitor;
|
||||||
//extern HWND hConsole;
|
//extern HWND hConsole;
|
||||||
//extern RECT ConsoleRect;
|
//extern RECT ConsoleRect;
|
||||||
extern int LogAge;
|
extern int BBSLogAge;
|
||||||
extern BOOL DeletetoRecycleBin;
|
extern BOOL DeletetoRecycleBin;
|
||||||
extern BOOL SuppressMaintEmail;
|
extern BOOL SuppressMaintEmail;
|
||||||
extern BOOL SaveRegDuringMaint;
|
extern BOOL SaveRegDuringMaint;
|
||||||
|
|
|
||||||
41
cMain.c
41
cMain.c
|
|
@ -58,6 +58,7 @@ VOID L2SENDCOMMAND(struct _LINKTABLE * LINK, int CMD);
|
||||||
void WritePacketLogThread(void * param);
|
void WritePacketLogThread(void * param);
|
||||||
void hookNodeStarted();
|
void hookNodeStarted();
|
||||||
void hookNodeRunning();
|
void hookNodeRunning();
|
||||||
|
void DeleteLogFiles(int Age);
|
||||||
void APIL2Trace(struct _MESSAGE * Message, char * Dirn);
|
void APIL2Trace(struct _MESSAGE * Message, char * Dirn);
|
||||||
|
|
||||||
#include "configstructs.h"
|
#include "configstructs.h"
|
||||||
|
|
@ -71,11 +72,15 @@ extern int nodeStartedSent;
|
||||||
extern SOCKADDR_IN UDPreportdest;
|
extern SOCKADDR_IN UDPreportdest;
|
||||||
extern char NodeAPIServer[80];
|
extern char NodeAPIServer[80];
|
||||||
extern int NodeAPIPort;
|
extern int NodeAPIPort;
|
||||||
|
extern int RIFInterval;
|
||||||
|
|
||||||
time_t LastNodeStatus = 0;
|
time_t LastNodeStatus = 0;
|
||||||
|
|
||||||
int nodeStatusTimer = 20 * 60; // 20 mins
|
int nodeStatusTimer = 20 * 60; // 20 mins
|
||||||
|
|
||||||
|
|
||||||
|
int LogAge = 10;
|
||||||
|
|
||||||
struct PORTCONFIG * PortRec;
|
struct PORTCONFIG * PortRec;
|
||||||
|
|
||||||
#define RNRSET 0x2 // RNR RECEIVED FROM OTHER END
|
#define RNRSET 0x2 // RNR RECEIVED FROM OTHER END
|
||||||
|
|
@ -675,6 +680,7 @@ BOOL Start()
|
||||||
struct CMDX * CMD;
|
struct CMDX * CMD;
|
||||||
int PortSlot = 1;
|
int PortSlot = 1;
|
||||||
uintptr_t int3;
|
uintptr_t int3;
|
||||||
|
int index = 0; // Entry No. in ROUTES
|
||||||
|
|
||||||
unsigned char * ptr2 = 0, * ptr3, * ptr4;
|
unsigned char * ptr2 = 0, * ptr3, * ptr4;
|
||||||
USHORT * CWPTR;
|
USHORT * CWPTR;
|
||||||
|
|
@ -844,6 +850,10 @@ BOOL Start()
|
||||||
MAXLINKS = cfg->C_MAXLINKS;
|
MAXLINKS = cfg->C_MAXLINKS;
|
||||||
MAXDESTS = cfg->C_MAXDESTS;
|
MAXDESTS = cfg->C_MAXDESTS;
|
||||||
MAXNEIGHBOURS = cfg->C_MAXNEIGHBOURS;
|
MAXNEIGHBOURS = cfg->C_MAXNEIGHBOURS;
|
||||||
|
|
||||||
|
if (MAXNEIGHBOURS == 0)
|
||||||
|
MAXNEIGHBOURS = 1;
|
||||||
|
|
||||||
MAXCIRCUITS = cfg->C_MAXCIRCUITS;
|
MAXCIRCUITS = cfg->C_MAXCIRCUITS;
|
||||||
HIDENODES = cfg->C_HIDENODES;
|
HIDENODES = cfg->C_HIDENODES;
|
||||||
|
|
||||||
|
|
@ -882,11 +892,14 @@ BOOL Start()
|
||||||
|
|
||||||
PREFERINP3ROUTES = cfg->C_PREFERINP3ROUTES;
|
PREFERINP3ROUTES = cfg->C_PREFERINP3ROUTES;
|
||||||
|
|
||||||
if (cfg->C_DEBUGINP3)
|
DEBUGINP3 = cfg->C_DEBUGINP3;
|
||||||
DEBUGINP3 = 0;
|
|
||||||
|
|
||||||
EnableOARCAPI = cfg->C_OARCAPI;
|
EnableOARCAPI = cfg->C_OARCAPI;
|
||||||
|
|
||||||
|
MONTOFILEFLAG = cfg->C_MONTOFILE;
|
||||||
|
|
||||||
|
RIFInterval = cfg->C_RIFInterval;
|
||||||
|
|
||||||
if (cfg->C_OnlyVer2point0)
|
if (cfg->C_OnlyVer2point0)
|
||||||
SUPPORT2point2 = 0;
|
SUPPORT2point2 = 0;
|
||||||
|
|
||||||
|
|
@ -1361,6 +1374,7 @@ BOOL Start()
|
||||||
char * VIA;
|
char * VIA;
|
||||||
char axcall[8];
|
char axcall[8];
|
||||||
|
|
||||||
|
|
||||||
ConvToAX25(Rcfg->call, ROUTE->NEIGHBOUR_CALL);
|
ConvToAX25(Rcfg->call, ROUTE->NEIGHBOUR_CALL);
|
||||||
|
|
||||||
// if VIA convert digis
|
// if VIA convert digis
|
||||||
|
|
@ -1405,6 +1419,9 @@ BOOL Start()
|
||||||
ROUTE->NoKeepAlive = 0; // Cant have INP3 and NOKEEPALIVES
|
ROUTE->NoKeepAlive = 0; // Cant have INP3 and NOKEEPALIVES
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Rcfg->noV2point2)
|
||||||
|
ROUTE->noV2point2 = 1;
|
||||||
|
|
||||||
ROUTE->NBOUR_MAXFRAME = Rcfg->pwind & 0x3f;
|
ROUTE->NBOUR_MAXFRAME = Rcfg->pwind & 0x3f;
|
||||||
|
|
||||||
FRACK = Rcfg->pfrack;
|
FRACK = Rcfg->pfrack;
|
||||||
|
|
@ -1422,6 +1439,8 @@ BOOL Start()
|
||||||
ROUTE->TCPAddress = (struct addrinfo *)zalloc(sizeof(struct addrinfo));
|
ROUTE->TCPAddress = (struct addrinfo *)zalloc(sizeof(struct addrinfo));
|
||||||
ROUTE->TCPAddress->ai_addr = (struct sockaddr *) zalloc(sizeof(struct sockaddr));
|
ROUTE->TCPAddress->ai_addr = (struct sockaddr *) zalloc(sizeof(struct sockaddr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ROUTE->recNum = index++;
|
||||||
|
|
||||||
Rcfg++;
|
Rcfg++;
|
||||||
ROUTE++;
|
ROUTE++;
|
||||||
|
|
@ -1582,6 +1601,11 @@ BOOL Start()
|
||||||
if (AUTOSAVEMH)
|
if (AUTOSAVEMH)
|
||||||
ReadMH(); // Only if AutoSave configured
|
ReadMH(); // Only if AutoSave configured
|
||||||
|
|
||||||
|
// Tidy Log Files
|
||||||
|
|
||||||
|
DeleteLogFiles(LogAge);
|
||||||
|
|
||||||
|
|
||||||
// set up stream number in BPQHOSTVECTOR
|
// set up stream number in BPQHOSTVECTOR
|
||||||
|
|
||||||
for (i = 0; i < 64; i++)
|
for (i = 0; i < 64; i++)
|
||||||
|
|
@ -1656,14 +1680,19 @@ BOOL FindNeighbour(UCHAR * Call, int Port, struct ROUTE ** REQROUTE)
|
||||||
{
|
{
|
||||||
struct ROUTE * ROUTE = NEIGHBOURS;
|
struct ROUTE * ROUTE = NEIGHBOURS;
|
||||||
struct ROUTE * FIRSTSPARE = NULL;
|
struct ROUTE * FIRSTSPARE = NULL;
|
||||||
int n = MAXNEIGHBOURS;
|
|
||||||
char Normcall[10];
|
char Normcall[10];
|
||||||
|
int n;
|
||||||
|
|
||||||
while (n--)
|
for (n = 0; n < MAXNEIGHBOURS; n++)
|
||||||
{
|
{
|
||||||
if (ROUTE->NEIGHBOUR_CALL[0] == 0) // Spare
|
if (ROUTE->NEIGHBOUR_CALL[0] == 0) // Spare
|
||||||
|
{
|
||||||
if (FIRSTSPARE == NULL)
|
if (FIRSTSPARE == NULL)
|
||||||
|
{
|
||||||
FIRSTSPARE = ROUTE;
|
FIRSTSPARE = ROUTE;
|
||||||
|
ROUTE->recNum = n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ROUTE->NEIGHBOUR_PORT != Port)
|
if (ROUTE->NEIGHBOUR_PORT != Port)
|
||||||
{
|
{
|
||||||
|
|
@ -1671,7 +1700,6 @@ BOOL FindNeighbour(UCHAR * Call, int Port, struct ROUTE ** REQROUTE)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Normcall[ConvFromAX25(ROUTE->NEIGHBOUR_CALL, Normcall)] = 0;
|
Normcall[ConvFromAX25(ROUTE->NEIGHBOUR_CALL, Normcall)] = 0;
|
||||||
|
|
||||||
if (CompareCalls(ROUTE->NEIGHBOUR_CALL, Call))
|
if (CompareCalls(ROUTE->NEIGHBOUR_CALL, Call))
|
||||||
|
|
@ -1685,6 +1713,7 @@ BOOL FindNeighbour(UCHAR * Call, int Port, struct ROUTE ** REQROUTE)
|
||||||
// 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
|
||||||
|
|
||||||
*REQROUTE = FIRSTSPARE;
|
*REQROUTE = FIRSTSPARE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2398,7 +2427,7 @@ L2Packet:
|
||||||
if (MQTT && PORT->PROTOCOL == 0)
|
if (MQTT && PORT->PROTOCOL == 0)
|
||||||
MQTTKISSRX(Buffer);
|
MQTTKISSRX(Buffer);
|
||||||
|
|
||||||
if(NodeAPISocket &&PORT->PROTOCOL == 0)
|
if(NodeAPISocket && PORT->PROTOCOL == 0)
|
||||||
APIL2Trace(Message, "rcvd");
|
APIL2Trace(Message, "rcvd");
|
||||||
|
|
||||||
// Bridge if requested
|
// Bridge if requested
|
||||||
|
|
|
||||||
27
compatbits.c
27
compatbits.c
|
|
@ -25,6 +25,8 @@ Stuff to make compiling on WINDOWS and LINUX easier
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
typedef unsigned int uint32_t;
|
typedef unsigned int uint32_t;
|
||||||
|
|
||||||
#define pthread_t uint32_t
|
#define pthread_t uint32_t
|
||||||
|
|
@ -41,6 +43,7 @@ int pthread_equal(pthread_t T1, pthread_t T2)
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#define BOOL int
|
#define BOOL int
|
||||||
|
|
||||||
|
|
@ -188,3 +191,27 @@ void closesocket(int sock)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
|
||||||
|
uint32_t GetTickCountINP3()
|
||||||
|
{
|
||||||
|
// Returns system uptime in 10 mS, lower 20 bits only
|
||||||
|
|
||||||
|
return (GetTickCount() / 10) & 0xfffff;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
uint64_t GetTickCount();
|
||||||
|
|
||||||
|
uint32_t GetTickCountINP3()
|
||||||
|
{
|
||||||
|
uint64_t Ticks = GetTickCount();
|
||||||
|
|
||||||
|
// Returns system uptime in 10 mS, lower 20 bits only
|
||||||
|
|
||||||
|
return (Ticks / 10) & 0xfffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ Stuff to make compiling on WINDOWS and LINUX easier
|
||||||
|
|
||||||
#define strtoll _strtoi64
|
#define strtoll _strtoi64
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
#include "stdint.h"
|
#include "stdint.h"
|
||||||
#else
|
#else
|
||||||
|
|
@ -219,7 +220,7 @@ typedef struct tagRECT
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
uint32_t GetTickCountINP3();
|
||||||
|
|
||||||
#ifdef LINBPQ
|
#ifdef LINBPQ
|
||||||
|
|
||||||
|
|
|
||||||
101
config.c
101
config.c
|
|
@ -310,7 +310,9 @@ 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", "DEBUGINP3", "ENABLEOARCAPI", "MONTOFILE",
|
||||||
|
"RIFInterval"
|
||||||
|
|
||||||
}; /* parameter keywords */
|
}; /* parameter keywords */
|
||||||
|
|
||||||
static void * offset[] =
|
static void * offset[] =
|
||||||
|
|
@ -334,7 +336,8 @@ 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, &xxcfg.C_DEBUGINP3, &xxcfg.C_OARCAPI, &xxcfg.C_MONTOFILE,
|
||||||
|
&xxcfg.C_RIFInterval}; /* offset for corresponding data in config file */
|
||||||
|
|
||||||
static int routine[] =
|
static int routine[] =
|
||||||
{
|
{
|
||||||
|
|
@ -357,7 +360,8 @@ 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, 1, 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);
|
||||||
|
|
@ -560,7 +564,6 @@ BOOL ProcessConfig()
|
||||||
heading = 1;
|
heading = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
paramok[6]=1; /* dont need BUFFERS */
|
paramok[6]=1; /* dont need BUFFERS */
|
||||||
paramok[8]=1; /* dont need TRANSDELAY */
|
paramok[8]=1; /* dont need TRANSDELAY */
|
||||||
paramok[13]=1; // NodeAlias
|
paramok[13]=1; // NodeAlias
|
||||||
|
|
@ -610,35 +613,35 @@ BOOL ProcessConfig()
|
||||||
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
|
||||||
paramok[70]=1; // IPGateway optional
|
paramok[70]=1; // NETROMCALL optional
|
||||||
paramok[71]=1; // C_IS_CHAT optional
|
paramok[71]=1; // C_IS_CHAT optional
|
||||||
|
|
||||||
paramok[72]=1; // MAXRTT optional
|
paramok[72]=1; // MAXRTT optional
|
||||||
paramok[73]=1; // MAXHOPS optional
|
paramok[73]=1; // MAXTT optional
|
||||||
paramok[74]=1; // LogL4Connects optional
|
paramok[74]=1; // MAXHOPS optional
|
||||||
paramok[75]=1; // LogAllConnects optional
|
paramok[75]=1; // LogL4Connects optional
|
||||||
paramok[76]=1; // SAVEMH optional
|
paramok[76]=1; // LogAllConnects optional
|
||||||
paramok[77]=1; // ENABLEADIFLOG optional
|
paramok[77]=1; // SAVEMH optional
|
||||||
paramok[78]=1; // EnableEvents optional
|
paramok[78]=1; // ENABLEADIFLOG optional
|
||||||
paramok[79]=1; // SaveAPRSMsgs optional
|
paramok[79]=1; // EnableEvents optional
|
||||||
paramok[79]=1; // SaveAPRSMsgs optional
|
paramok[80]=1; // SaveAPRSMsgs optional
|
||||||
paramok[80]=1; // EnableM0LTEMap optional
|
paramok[81]=1; // EnableM0LTEMap optional
|
||||||
paramok[81]=1; // MQTT Params
|
|
||||||
paramok[82]=1; // MQTT Params
|
paramok[82]=1; // MQTT Params
|
||||||
paramok[83]=1; // MQTT Params
|
paramok[83]=1; // MQTT Params
|
||||||
paramok[84]=1; // MQTT Params
|
paramok[84]=1; // MQTT Params
|
||||||
paramok[85]=1; // MQTT Params
|
paramok[85]=1; // MQTT Params
|
||||||
paramok[86]=1; // L4Compress
|
paramok[86]=1; // MQTT Params
|
||||||
paramok[87]=1; // L4Compress Maxframe
|
paramok[87]=1; // L4Compress
|
||||||
paramok[88]=1; // L4Compress Paclen
|
paramok[88]=1; // L4Compress Maxframe
|
||||||
paramok[89]=1; // L2Compress
|
paramok[89]=1; // L4Compress Paclen
|
||||||
paramok[90]=1; // L2Compress Maxframe
|
paramok[90]=1; // L2Compress
|
||||||
paramok[91]=1; // L2Compress Paclen
|
paramok[91]=1; // L2Compress Maxframe
|
||||||
paramok[92]=1; // PREFERINP3ROUTES
|
paramok[92]=1; // L2Compress Paclen
|
||||||
paramok[93]=1; // ONLYVer2point0
|
paramok[93]=1; // PREFERINP3ROUTES
|
||||||
paramok[94]=1; // DEBUGINP3
|
paramok[94]=1; // ONLYVer2point0
|
||||||
paramok[95]=1; // EnableOARCAPI
|
paramok[95]=1; // DEBUGINP3
|
||||||
paramok[96]=1; // OARCAPI
|
paramok[96]=1; // EnableOARCAPI
|
||||||
|
paramok[97]=1; // MONTOFILE
|
||||||
|
paramok[98]=1; // RIFInterval
|
||||||
|
|
||||||
|
|
||||||
for (i=0; i < PARAMLIM; i++)
|
for (i=0; i < PARAMLIM; i++)
|
||||||
|
|
@ -651,7 +654,7 @@ BOOL ProcessConfig()
|
||||||
Consoleprintf("The following parameters were not correctly specified");
|
Consoleprintf("The following parameters were not correctly specified");
|
||||||
heading = 1;
|
heading = 1;
|
||||||
}
|
}
|
||||||
Consoleprintf(keywords[i]);
|
Consoleprintf("%s", keywords[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1680,7 +1683,15 @@ int routes(int i)
|
||||||
char * val = strtok_s(NULL, " ,=", &context);
|
char * val = strtok_s(NULL, " ,=", &context);
|
||||||
|
|
||||||
if (val)
|
if (val)
|
||||||
Route->farQual = atoi(val);
|
Route->nokeepalives = atoi(val);
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (strcmp(ptr, "NOV2.2") == 0)
|
||||||
|
{
|
||||||
|
char * val = strtok_s(NULL, " ,=", &context);
|
||||||
|
|
||||||
|
if (val)
|
||||||
|
Route->noV2point2 = atoi(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3069,13 +3080,39 @@ int simple(int i)
|
||||||
|
|
||||||
/* Set PARAMOK flags on all values that are defaulted */
|
/* Set PARAMOK flags on all values that are defaulted */
|
||||||
|
|
||||||
for (i=0; i < PARAMLIM; i++)
|
|
||||||
paramok[i]=1;
|
|
||||||
|
|
||||||
paramok[15] = 0; // Must have callsign
|
paramok[15] = 0; // Must have callsign
|
||||||
paramok[45] = 0; // Dont Have Appl1Call
|
paramok[45] = 0; // Dont Have Appl1Call
|
||||||
paramok[53] = 0; // or APPL1ALIAS
|
paramok[53] = 0; // or APPL1ALIAS
|
||||||
|
|
||||||
|
// Set defined flag on defaulted params
|
||||||
|
|
||||||
|
paramok[0] = 1; // OBSINIT
|
||||||
|
paramok[1] = 1; // OBSMIN
|
||||||
|
paramok[2] = 1; // NODESINTERVAL
|
||||||
|
paramok[3] = 1; // L3TIMETOLIVE
|
||||||
|
paramok[4] = 1; // L4RETRIES
|
||||||
|
paramok[5] = 1; // L4TIMEOUT
|
||||||
|
paramok[7] = 1; // PACLEN
|
||||||
|
paramok[9] = 1; // T3
|
||||||
|
paramok[10] = 1; // IDLETIME
|
||||||
|
paramok[11] = 1; // BBS
|
||||||
|
paramok[12] = 1; // NODE
|
||||||
|
paramok[18] = 1; // IDMSG:
|
||||||
|
paramok[19] = 1; // INFOMSG:
|
||||||
|
paramok[22] = 1; // MAXLINKS
|
||||||
|
paramok[23] = 1; // MAXNODES
|
||||||
|
paramok[24] = 1; // MAXROUTES
|
||||||
|
paramok[25] = 1; // MAXCIRCUITS
|
||||||
|
paramok[26] = 1; // IDINTERVAL
|
||||||
|
paramok[27] = 1; // MINQUAL
|
||||||
|
paramok[28] = 1; // HIDENODES
|
||||||
|
paramok[29] = 1; // L4DELAY
|
||||||
|
paramok[30] = 1; // L4WINDOW
|
||||||
|
paramok[31] = 1; // BTINTERVAL
|
||||||
|
paramok[36] = 1; // CTEXT:
|
||||||
|
paramok[39] = 1; // ENABLE_LINKED
|
||||||
|
paramok[41] = 1; // FULL_CTEXT
|
||||||
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,7 @@ struct ROUTECONFIG
|
||||||
int farQual;
|
int farQual;
|
||||||
int inp3;
|
int inp3;
|
||||||
int nokeepalives;
|
int nokeepalives;
|
||||||
|
int noV2point2;
|
||||||
char * tcphost;
|
char * tcphost;
|
||||||
int tcpport;
|
int tcpport;
|
||||||
};
|
};
|
||||||
|
|
@ -187,6 +188,9 @@ struct CONFIGTABLE
|
||||||
int C_OnlyVer2point0;
|
int C_OnlyVer2point0;
|
||||||
int C_DEBUGINP3;
|
int C_DEBUGINP3;
|
||||||
int C_OARCAPI;
|
int C_OARCAPI;
|
||||||
|
int C_MONTOFILE;
|
||||||
|
int C_RIFInterval;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#define ApplOffset 80000 // Applications offset in config buffer
|
//#define ApplOffset 80000 // Applications offset in config buffer
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int DEBUGINP3 = 0;
|
||||||
|
|
||||||
int EnableOARCAPI = 0;
|
int EnableOARCAPI = 0;
|
||||||
|
|
||||||
int RTTInterval = 24; // 4 Minutes
|
int RTTInterval = 30; // 10 second increments - 5 Minutes
|
||||||
|
|
||||||
BOOL IPRequired = FALSE;
|
BOOL IPRequired = FALSE;
|
||||||
BOOL PMRequired = FALSE;
|
BOOL PMRequired = FALSE;
|
||||||
|
|
|
||||||
11
debian/NEWS
vendored
Normal file
11
debian/NEWS
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
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
Normal file
23
debian/README.Debian
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
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
Normal file
50
debian/bpq32.cfg
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
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
|
||||||
359
debian/changelog
vendored
Normal file
359
debian/changelog
vendored
Normal file
|
|
@ -0,0 +1,359 @@
|
||||||
|
linbpq (6.0.25.15+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version 6.0.25.15+repack
|
||||||
|
* Remove Patch for TelnetV6, fixed upstream
|
||||||
|
* 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, 07 Jan 2026 21:53:20 +0000
|
||||||
|
|
||||||
|
linbpq (6.0.25.13+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
||||||
|
|
||||||
|
* 6.0.25.12 hacky merge due t it not ffing.
|
||||||
|
* New upstream version 6.0.25.13+repack
|
||||||
|
* Patch TelnetV6 to build
|
||||||
|
* 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, 23 Dec 2025 16:45:56 +0000
|
||||||
|
|
||||||
|
linbpq (6.0.25.12+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version 6.0.25.12+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, 22 Nov 2025 15:11:09 +0000
|
||||||
|
|
||||||
|
linbpq (6.0.25.11+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version 6.0.25.11+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, 11 Nov 2025 21:52:58 +0000
|
||||||
|
|
||||||
|
linbpq (6.0.25.9+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version 6.0.25.9+repack
|
||||||
|
* Refresh patches
|
||||||
|
* 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, 09 Nov 2025 22:45:07 +0000
|
||||||
|
|
||||||
|
linbpq (6.0.25.8+repack-1~hibbian13+1) trixie-hibbian-unstable; urgency=medium
|
||||||
|
|
||||||
|
* Build on latest gcc standards
|
||||||
|
* New upstream version 6.0.25.8+repack
|
||||||
|
* Refresh patches with gbp pq!
|
||||||
|
* 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, 24 Oct 2025 00:45:16 +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
Normal file
20
debian/control
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
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
Normal file
37
debian/copyright
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
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
Normal file
2
debian/dirs
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
usr/sbin
|
||||||
|
opt/oarc/bpq
|
||||||
3
debian/gbp.conf
vendored
Normal file
3
debian/gbp.conf
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[DEFAULT]
|
||||||
|
debian-branch = hibbian/latest
|
||||||
|
upstream-branch = upstream/latest
|
||||||
6
debian/gitlab-ci.yml
vendored
Normal file
6
debian/gitlab-ci.yml
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
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
Normal file
1
debian/install
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
debian/bpq32.cfg etc/
|
||||||
1
debian/linbpq.examples
vendored
Normal file
1
debian/linbpq.examples
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
debian/bpq32.cfg
|
||||||
14
debian/linbpq.service
vendored
Normal file
14
debian/linbpq.service
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[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
Normal file
11
debian/lintian-overrides
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
# 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
Normal file
57
debian/patches/makefile
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
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 26403e5..0f15cc0 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
Normal file
2
debian/patches/series
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
spelling-fixes.patch
|
||||||
|
makefile
|
||||||
21
debian/patches/spelling-fixes.patch
vendored
Normal file
21
debian/patches/spelling-fixes.patch
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
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 2adfe12..75e40ee 100644
|
||||||
|
--- a/UZ7HODrv.c
|
||||||
|
+++ b/UZ7HODrv.c
|
||||||
|
@@ -387,7 +387,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
Normal file
47
debian/postinst
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
#!/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
Normal file
14
debian/preinst
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/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
Executable file
6
debian/rules
vendored
Executable file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@
|
||||||
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
3.0 (quilt)
|
||||||
0
debian/source/include-binaries
vendored
Normal file
0
debian/source/include-binaries
vendored
Normal file
0
debian/source/lintian-overrides
vendored
Normal file
0
debian/source/lintian-overrides
vendored
Normal file
3
debian/watch
vendored
Normal file
3
debian/watch
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
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)))
|
||||||
|
|
@ -66,6 +66,7 @@ struct ConnectionInfo
|
||||||
char Signon[100]; // User/Pass/Appl for Outgoing Connects
|
char Signon[100]; // User/Pass/Appl for Outgoing Connects
|
||||||
BOOL Keepalive; // For HOST (esp CCC) Keepalives
|
BOOL Keepalive; // For HOST (esp CCC) Keepalives
|
||||||
time_t LastSendTime;
|
time_t LastSendTime;
|
||||||
|
time_t LastReceiveTime;
|
||||||
BOOL NoCallsign; // Don't Send Callsign to host if no Signon
|
BOOL NoCallsign; // Don't Send Callsign to host if no Signon
|
||||||
UCHAR * ResendBuffer; // Used if send() returns EWOULDBLOCK
|
UCHAR * ResendBuffer; // Used if send() returns EWOULDBLOCK
|
||||||
int ResendLen; // Len to resend
|
int ResendLen; // Len to resend
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue