Compare commits
33 Commits
50-build-r
...
hibbian/la
Author | SHA1 | Date |
---|---|---|
Hibby | 33d8e6f75a | |
Hibby | 58d2baad53 | |
Hibby | 1f73eb5601 | |
Hibby | a7d635fe2f | |
Hibby | eab73bee95 | |
Hibby | 745a9f8e88 | |
Hibby | 96c573931d | |
Hibby | 697fde3123 | |
Hibby | dd84b546a0 | |
Hibby | 3a600bee23 | |
Hibby | d1c36fce6e | |
Hibby | d09a168608 | |
Hibby | 93a10a982d | |
Hibby | 757c658adc | |
Hibby | f62edf7675 | |
Hibby | 37bacc3178 | |
Hibby | 7690eb8f59 | |
Hibby | a675c89dc3 | |
Hibby | 57c66b1c61 | |
Hibby | 7433c77604 | |
Hibby | 6bd281ab30 | |
Hibby | c0637b3841 | |
Hibby | 3a840054a7 | |
Hibby | c7958a2d87 | |
Hibby | 8a18ca1868 | |
Hibby | ae8dbe4097 | |
Hibby | 49e27728c3 | |
Hibby | 8e7a943558 | |
Hibby | e35489a925 | |
Hibby | c77b3e9f47 | |
Hibby | 1e83f7e725 | |
Hibby | 5d8d8963ef | |
Hibby | e2a62732f5 |
|
@ -1 +0,0 @@
|
||||||
.pc/
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- a/APRSCode.c
|
--- APRSCode.c
|
||||||
+++ b/APRSCode.c
|
+++ APRSCode.c
|
||||||
@@ -3673,7 +3673,7 @@
|
@@ -3674,7 +3674,7 @@
|
||||||
if (ptr1)
|
if (ptr1)
|
||||||
*ptr1 = 0;
|
*ptr1 = 0;
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@
|
||||||
return TRUE; // Duplicate
|
return TRUE; // Duplicate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--- a/BPQChat.rc
|
--- BPQChat.rc
|
||||||
+++ b/BPQChat.rc
|
+++ BPQChat.rc
|
||||||
@@ -162,7 +162,7 @@
|
@@ -162,7 +162,7 @@
|
||||||
WS_VSCROLL
|
WS_VSCROLL
|
||||||
DEFPUSHBUTTON "Save Welcome Message",SAVEWELCOME,140,296,91,14,
|
DEFPUSHBUTTON "Save Welcome Message",SAVEWELCOME,140,296,91,14,
|
||||||
|
@ -20,8 +20,8 @@
|
||||||
IDC_STATIC,9,52,355,24
|
IDC_STATIC,9,52,355,24
|
||||||
END
|
END
|
||||||
|
|
||||||
--- a/BPQMail.rc
|
--- BPQMail.rc
|
||||||
+++ b/BPQMail.rc
|
+++ BPQMail.rc
|
||||||
@@ -1045,7 +1045,7 @@
|
@@ -1045,7 +1045,7 @@
|
||||||
CONTROL "Delete Log and Message Files to Recycle Bin",
|
CONTROL "Delete Log and Message Files to Recycle Bin",
|
||||||
IDC_DELETETORECYCLE,"Button",BS_AUTOCHECKBOX |
|
IDC_DELETETORECYCLE,"Button",BS_AUTOCHECKBOX |
|
||||||
|
@ -31,8 +31,8 @@
|
||||||
IDC_MAINTNOMAIL,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
|
IDC_MAINTNOMAIL,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
|
||||||
BS_MULTILINE | WS_TABSTOP,5,182,115,20
|
BS_MULTILINE | WS_TABSTOP,5,182,115,20
|
||||||
CONTROL "Generate Traffic Report",IDC_MAINTTRAFFIC,"Button",
|
CONTROL "Generate Traffic Report",IDC_MAINTTRAFFIC,"Button",
|
||||||
--- a/HanksRT.c
|
--- HanksRT.c
|
||||||
+++ b/HanksRT.c
|
+++ HanksRT.c
|
||||||
@@ -1186,7 +1186,7 @@
|
@@ -1186,7 +1186,7 @@
|
||||||
// Duplicate, so discard, but save time
|
// Duplicate, so discard, but save time
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@
|
||||||
|
|
||||||
return TRUE; // Duplicate
|
return TRUE; // Duplicate
|
||||||
}
|
}
|
||||||
--- a/RigControl.c
|
--- RigControl.c
|
||||||
+++ b/RigControl.c
|
+++ RigControl.c
|
||||||
@@ -8385,7 +8385,7 @@
|
@@ -8385,7 +8385,7 @@
|
||||||
|
|
||||||
switch (Msg[0])
|
switch (Msg[0])
|
||||||
|
@ -53,8 +53,8 @@
|
||||||
|
|
||||||
HLGetFreq(Sock, RIG, sep);
|
HLGetFreq(Sock, RIG, sep);
|
||||||
return 0;
|
return 0;
|
||||||
--- a/UZ7HODrv.c
|
--- UZ7HODrv.c
|
||||||
+++ b/UZ7HODrv.c
|
+++ UZ7HODrv.c
|
||||||
@@ -374,7 +374,7 @@
|
@@ -374,7 +374,7 @@
|
||||||
{
|
{
|
||||||
// Read Freq
|
// Read Freq
|
||||||
|
@ -73,8 +73,8 @@
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
--- a/WinRPRHelper.c
|
--- WinRPRHelper.c
|
||||||
+++ b/WinRPRHelper.c
|
+++ WinRPRHelper.c
|
||||||
@@ -111,7 +111,7 @@
|
@@ -111,7 +111,7 @@
|
||||||
|
|
||||||
if (argc < 3)
|
if (argc < 3)
|
||||||
|
@ -84,9 +84,9 @@
|
||||||
" WinRPRHelper com10 192.168.1.64:4532\r\n\r\n"
|
" WinRPRHelper com10 192.168.1.64:4532\r\n\r\n"
|
||||||
"Press any key to exit\r\n");
|
"Press any key to exit\r\n");
|
||||||
|
|
||||||
--- a/config.c
|
--- config.c
|
||||||
+++ b/config.c
|
+++ config.c
|
||||||
@@ -644,7 +644,7 @@
|
@@ -649,7 +649,7 @@
|
||||||
if (LOCATOR[0] == 0 && LocSpecified == 0 && RFOnly == 0)
|
if (LOCATOR[0] == 0 && LocSpecified == 0 && RFOnly == 0)
|
||||||
{
|
{
|
||||||
Consoleprintf("");
|
Consoleprintf("");
|
||||||
|
@ -95,8 +95,8 @@
|
||||||
Consoleprintf("If you really don't want to be on the Node Map you can enter LOCATOR=NONE");
|
Consoleprintf("If you really don't want to be on the Node Map you can enter LOCATOR=NONE");
|
||||||
Consoleprintf("");
|
Consoleprintf("");
|
||||||
|
|
||||||
--- a/kiss.c
|
--- kiss.c
|
||||||
+++ b/kiss.c
|
+++ kiss.c
|
||||||
@@ -1485,7 +1485,7 @@
|
@@ -1485,7 +1485,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,8 +106,8 @@
|
||||||
KISS->POLLPOINTER->OURCTRL, (Port->RXMSG[0] & 0xf0));
|
KISS->POLLPOINTER->OURCTRL, (Port->RXMSG[0] & 0xf0));
|
||||||
|
|
||||||
goto SeeifMore; // SEE IF ANYTHING ELSE
|
goto SeeifMore; // SEE IF ANYTHING ELSE
|
||||||
--- a/templatedefs.c
|
--- templatedefs.c
|
||||||
+++ b/templatedefs.c
|
+++ templatedefs.c
|
||||||
@@ -1165,7 +1165,7 @@
|
@@ -1165,7 +1165,7 @@
|
||||||
"Send Non-delivery Notifications<br>\r\n"
|
"Send Non-delivery Notifications<br>\r\n"
|
||||||
"for P and T messages <input %sname=\"SendND\" value=\"SendND\" type=\"checkbox\" /><br>\r\n"
|
"for P and T messages <input %sname=\"SendND\" value=\"SendND\" type=\"checkbox\" /><br>\r\n"
|
||||||
|
@ -126,3 +126,14 @@
|
||||||
|
|
||||||
"<br><br>The Callsign of the Chat Node is not defined here - it is obtained from the bpq32.cfg APPLICATION line corresponding to the Chat Appl Number.<br>\r\n"
|
"<br><br>The Callsign of the Chat Node is not defined here - it is obtained from the bpq32.cfg APPLICATION line corresponding to the Chat Appl Number.<br>\r\n"
|
||||||
"<br></div>\n"
|
"<br></div>\n"
|
||||||
|
--- WebMail.c
|
||||||
|
+++ WebMail.c
|
||||||
|
@@ -2020,7 +2020,7 @@
|
||||||
|
"document.getElementById('myform').action = '/WebMail/QuoteOriginal' + '?%s';"
|
||||||
|
" document.getElementById('myform').submit();}</script>"
|
||||||
|
"<input type=button class='btn' onclick='myfunc()' "
|
||||||
|
- "value='Include Orignal Msg'>";
|
||||||
|
+ "value='Include Original Msg'>";
|
||||||
|
|
||||||
|
char Temp[1024];
|
||||||
|
char ReplyAddr[128];
|
|
@ -292,8 +292,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
{
|
{
|
||||||
// Send Error Response
|
// Send Error Response
|
||||||
|
|
||||||
buffptr->Len = 36;
|
buffptr->Len = sprintf(buffptr->Data, "No Connection to PACTOR TNC\r");
|
||||||
memcpy(buffptr->Data, "No Connection to PACTOR TNC\r", 36);
|
|
||||||
|
|
||||||
C_Q_ADD(&TNC->Streams[Stream].PACTORtoBPQ_Q, buffptr);
|
C_Q_ADD(&TNC->Streams[Stream].PACTORtoBPQ_Q, buffptr);
|
||||||
|
|
||||||
|
|
125
AGWAPI.c
125
AGWAPI.c
|
@ -128,7 +128,7 @@ int DataSocket_Write(struct AGWSocketConnectionInfo * sockptr, SOCKET sock);
|
||||||
int AGWGetSessionKey(char * key, struct AGWSocketConnectionInfo * sockptr);
|
int AGWGetSessionKey(char * key, struct AGWSocketConnectionInfo * sockptr);
|
||||||
int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr);
|
int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr);
|
||||||
int SendDataToAppl(int Stream, byte * Buffer, int Length);
|
int SendDataToAppl(int Stream, byte * Buffer, int Length);
|
||||||
int InternalAGWDecodeFrame(char * msg, char * buffer, int Stamp, int * FrameType, int useLocalTime, int doNodes);
|
int InternalAGWDecodeFrame(char * msg, char * buffer, time_t Stamp, int * FrameType, int useLocalTime, int doNodes);
|
||||||
int AGWDataSocket_Disconnect( struct AGWSocketConnectionInfo * sockptr);
|
int AGWDataSocket_Disconnect( struct AGWSocketConnectionInfo * sockptr);
|
||||||
int SendRawPacket(struct AGWSocketConnectionInfo * sockptr, char *txmsg, int Length);
|
int SendRawPacket(struct AGWSocketConnectionInfo * sockptr, char *txmsg, int Length);
|
||||||
int ShowApps();
|
int ShowApps();
|
||||||
|
@ -402,7 +402,7 @@ int SetUpHostSessions()
|
||||||
extern struct DATAMESSAGE * REPLYBUFFER;
|
extern struct DATAMESSAGE * REPLYBUFFER;
|
||||||
extern BOOL AGWActive;
|
extern BOOL AGWActive;
|
||||||
|
|
||||||
VOID SHOWAGW(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SHOWAGW(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// DISPLAY AGW Session Status
|
// DISPLAY AGW Session Status
|
||||||
|
|
||||||
|
@ -1017,6 +1017,7 @@ int AGWDataSocket_Read(struct AGWSocketConnectionInfo * sockptr, SOCKET sock)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int DataLength;
|
int DataLength;
|
||||||
|
struct AGWHeader * AGW = &sockptr->AGWRXHeader;
|
||||||
|
|
||||||
ioctlsocket(sock,FIONREAD,&DataLength);
|
ioctlsocket(sock,FIONREAD,&DataLength);
|
||||||
|
|
||||||
|
@ -1028,6 +1029,56 @@ int AGWDataSocket_Read(struct AGWSocketConnectionInfo * sockptr, SOCKET sock)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DataLength < 36) // A header
|
||||||
|
{
|
||||||
|
// If we don't get a header within a few ms assume a rogue connection and close it
|
||||||
|
|
||||||
|
int n = 50;
|
||||||
|
|
||||||
|
while (n--)
|
||||||
|
{
|
||||||
|
Sleep(10);
|
||||||
|
ioctlsocket(sock,FIONREAD,&DataLength);
|
||||||
|
|
||||||
|
if (DataLength >= 36)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (n < 1)
|
||||||
|
{
|
||||||
|
Debugprintf("Corrupt AGW Packet Received");
|
||||||
|
AGWDataSocket_Disconnect(sockptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Have a header
|
||||||
|
|
||||||
|
i=recv(sock,(char *)&sockptr->AGWRXHeader, 36, 0);
|
||||||
|
|
||||||
|
if (i == SOCKET_ERROR)
|
||||||
|
{
|
||||||
|
i=WSAGetLastError();
|
||||||
|
AGWDataSocket_Disconnect(sockptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
sockptr->MsgDataLength = sockptr->AGWRXHeader.DataLength;
|
||||||
|
|
||||||
|
// Validate packet to protect against accidental (or malicious!) connects from a non-agw application
|
||||||
|
|
||||||
|
if (AGW->Port > 64 || AGW->filler2 != 0 || AGW->filler3 != 0 || AGW->DataLength > 400)
|
||||||
|
{
|
||||||
|
Debugprintf("Corrupt AGW Packet Received");
|
||||||
|
AGWDataSocket_Disconnect(sockptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sockptr->MsgDataLength == 0)
|
||||||
|
ProcessAGWCommand (sockptr);
|
||||||
|
else
|
||||||
|
sockptr->GotHeader = TRUE; // Wait for data
|
||||||
|
|
||||||
|
ioctlsocket(sock,FIONREAD,&DataLength); // See if more data
|
||||||
|
|
||||||
if (sockptr->GotHeader)
|
if (sockptr->GotHeader)
|
||||||
{
|
{
|
||||||
|
@ -1035,11 +1086,26 @@ int AGWDataSocket_Read(struct AGWSocketConnectionInfo * sockptr, SOCKET sock)
|
||||||
|
|
||||||
if (DataLength < sockptr->MsgDataLength)
|
if (DataLength < sockptr->MsgDataLength)
|
||||||
{
|
{
|
||||||
// Fiddle - seem to be problems somtimes with un-Neagled hosts
|
// Fiddle - seem to be problems somtimes with un-Neagled hosts so wait a few ms
|
||||||
|
// if we don't get a full packet assume a rogue connection and close it
|
||||||
|
|
||||||
Sleep(500);
|
int n = 50;
|
||||||
|
|
||||||
|
while (n--)
|
||||||
|
{
|
||||||
|
Sleep(10);
|
||||||
ioctlsocket(sock,FIONREAD,&DataLength);
|
ioctlsocket(sock,FIONREAD,&DataLength);
|
||||||
|
|
||||||
|
if (DataLength >= sockptr->MsgDataLength)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (n < 1)
|
||||||
|
{
|
||||||
|
Debugprintf("Corrupt AGW Packet Received");
|
||||||
|
AGWDataSocket_Disconnect(sockptr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DataLength >= sockptr->MsgDataLength)
|
if (DataLength >= sockptr->MsgDataLength)
|
||||||
|
@ -1052,60 +1118,9 @@ int AGWDataSocket_Read(struct AGWSocketConnectionInfo * sockptr, SOCKET sock)
|
||||||
|
|
||||||
ProcessAGWCommand (sockptr);
|
ProcessAGWCommand (sockptr);
|
||||||
free(sockptr->MsgData);
|
free(sockptr->MsgData);
|
||||||
|
|
||||||
sockptr->GotHeader = FALSE;
|
sockptr->GotHeader = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not Enough Data - wait
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else // Not got header
|
|
||||||
{
|
|
||||||
if (DataLength > 35)// A header
|
|
||||||
{
|
|
||||||
struct AGWHeader * AGW = &sockptr->AGWRXHeader;
|
|
||||||
|
|
||||||
i=recv(sock,(char *)&sockptr->AGWRXHeader, 36, 0);
|
|
||||||
|
|
||||||
if (i == SOCKET_ERROR)
|
|
||||||
{
|
|
||||||
i=WSAGetLastError();
|
|
||||||
|
|
||||||
AGWDataSocket_Disconnect(sockptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
sockptr->MsgDataLength = sockptr->AGWRXHeader.DataLength;
|
|
||||||
|
|
||||||
// Validate packet to protect against accidental (or malicious!) connects from a non-agw application
|
|
||||||
|
|
||||||
|
|
||||||
if (AGW->Port > 64 || AGW->filler2 != 0 || AGW->filler3 != 0 || AGW->DataLength > 400)
|
|
||||||
{
|
|
||||||
Debugprintf("Corrupt AGW Packet Received");
|
|
||||||
AGWDataSocket_Disconnect(sockptr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sockptr->MsgDataLength > 500)
|
|
||||||
OutputDebugString("Corrupt AGW message");
|
|
||||||
|
|
||||||
|
|
||||||
if (sockptr->MsgDataLength == 0)
|
|
||||||
{
|
|
||||||
ProcessAGWCommand (sockptr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sockptr->GotHeader = TRUE; // Wait for data
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// not got 36 bytes
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,6 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
|
|
||||||
#define NODES_SIG 0xFF
|
#define NODES_SIG 0xFF
|
||||||
|
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, int msglen);
|
UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, int msglen);
|
||||||
|
|
||||||
static UCHAR * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen, int DoNodes);
|
static UCHAR * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen, int DoNodes);
|
||||||
|
|
|
@ -832,6 +832,7 @@ void SaveNavAidDataBase()
|
||||||
char FN[256];
|
char FN[256];
|
||||||
struct NAVAIDRECORD * navptr;
|
struct NAVAIDRECORD * navptr;
|
||||||
|
|
||||||
|
|
||||||
if (BPQDirectory[0] == 0)
|
if (BPQDirectory[0] == 0)
|
||||||
{
|
{
|
||||||
strcpy(FN, "AIS_NavAids.txt");
|
strcpy(FN, "AIS_NavAids.txt");
|
||||||
|
@ -2372,6 +2373,8 @@ void ProcessAISNavAidMessage()
|
||||||
NavAidCount++;
|
NavAidCount++;
|
||||||
|
|
||||||
ProcessAISNavAidMessage();
|
ProcessAISNavAidMessage();
|
||||||
|
NavAidDBChanged = 1;
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
19
APRSCode.c
19
APRSCode.c
|
@ -22,7 +22,6 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
// First Version, November 2011
|
// First Version, November 2011
|
||||||
|
|
||||||
#pragma data_seg("_BPQDATA")
|
#pragma data_seg("_BPQDATA")
|
||||||
|
|
||||||
#define _CRT_SECURE_NO_DEPRECATE
|
#define _CRT_SECURE_NO_DEPRECATE
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -63,7 +62,6 @@ VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
VOID __cdecl Consoleprintf(const char * format, ...);
|
VOID __cdecl Consoleprintf(const char * format, ...);
|
||||||
BOOL APIENTRY Send_AX(PMESSAGE Block, DWORD Len, UCHAR Port);
|
BOOL APIENTRY Send_AX(PMESSAGE Block, DWORD Len, UCHAR Port);
|
||||||
VOID Send_AX_Datagram(PDIGIMESSAGE Block, DWORD Len, UCHAR Port);
|
VOID Send_AX_Datagram(PDIGIMESSAGE Block, DWORD Len, UCHAR Port);
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
int APRSDecodeFrame(char * msg, char * buffer, time_t Stamp, uint64_t Mask); // Unsemaphored DecodeFrame
|
int APRSDecodeFrame(char * msg, char * buffer, time_t Stamp, uint64_t Mask); // Unsemaphored DecodeFrame
|
||||||
APRSHEARDRECORD * UpdateHeard(UCHAR * Call, int Port);
|
APRSHEARDRECORD * UpdateHeard(UCHAR * Call, int Port);
|
||||||
BOOL CheckforDups(char * Call, char * Msg, int Len);
|
BOOL CheckforDups(char * Call, char * Msg, int Len);
|
||||||
|
@ -88,7 +86,7 @@ double myDistance(double laa, double loa, BOOL KM);
|
||||||
struct STATIONRECORD * FindStation(char * Call, BOOL AddIfNotFound);
|
struct STATIONRECORD * FindStation(char * Call, BOOL AddIfNotFound);
|
||||||
int DecodeAPRSPayload(char * Payload, struct STATIONRECORD * Station);
|
int DecodeAPRSPayload(char * Payload, struct STATIONRECORD * Station);
|
||||||
BOOL KillOldTNC(char * Path);
|
BOOL KillOldTNC(char * Path);
|
||||||
int FromLOC(char * Locator, double * pLat, double * pLon);
|
|
||||||
BOOL ToLOC(double Lat, double Lon , char * Locator);
|
BOOL ToLOC(double Lat, double Lon , char * Locator);
|
||||||
BOOL InternalSendAPRSMessage(char * Text, char * Call);
|
BOOL InternalSendAPRSMessage(char * Text, char * Call);
|
||||||
void UndoTransparency(char * input);
|
void UndoTransparency(char * input);
|
||||||
|
@ -104,6 +102,7 @@ void ClearSavedMessages();
|
||||||
void GetSavedAPRSMessages();
|
void GetSavedAPRSMessages();
|
||||||
static VOID GPSDConnect(void * unused);
|
static VOID GPSDConnect(void * unused);
|
||||||
int CanPortDigi(int Port);
|
int CanPortDigi(int Port);
|
||||||
|
int FromLOC(char * Locator, double * pLat, double * pLon);
|
||||||
|
|
||||||
extern int SemHeldByAPI;
|
extern int SemHeldByAPI;
|
||||||
extern int APRSMONDECODE();
|
extern int APRSMONDECODE();
|
||||||
|
@ -348,7 +347,7 @@ APRSHEARDRECORD MHTABLE[MAXHEARD] = {0};
|
||||||
|
|
||||||
APRSHEARDRECORD * MHDATA = &MHTABLE[0];
|
APRSHEARDRECORD * MHDATA = &MHTABLE[0];
|
||||||
|
|
||||||
static SOCKET sock = (SOCKET)0;
|
static SOCKET sock = 0;
|
||||||
|
|
||||||
//Duplicate suppression Code
|
//Duplicate suppression Code
|
||||||
|
|
||||||
|
@ -3113,7 +3112,7 @@ VOID APRSISThread(void * Report)
|
||||||
BOOL bcopt=TRUE;
|
BOOL bcopt=TRUE;
|
||||||
char Buffer[1000];
|
char Buffer[1000];
|
||||||
int InputLen = 1; // Non-zero
|
int InputLen = 1; // Non-zero
|
||||||
char errmsg[100];
|
char errmsg[300];
|
||||||
char * ptr;
|
char * ptr;
|
||||||
size_t inptr = 0;
|
size_t inptr = 0;
|
||||||
char APRSinMsg[1000];
|
char APRSinMsg[1000];
|
||||||
|
@ -3674,7 +3673,7 @@ BOOL CheckforDups(char * Call, char * Msg, int Len)
|
||||||
if (ptr1)
|
if (ptr1)
|
||||||
*ptr1 = 0;
|
*ptr1 = 0;
|
||||||
|
|
||||||
// Debugprintf("Duplicate Message supressed %s", Msg);
|
// Debugprintf("Duplicate Message suppressed %s", Msg);
|
||||||
return TRUE; // Duplicate
|
return TRUE; // Duplicate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7666,7 +7665,7 @@ VOID APRSProcessHTTPMessage(SOCKET sock, char * MsgPtr, BOOL LOCAL, BOOL COOKIE)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputLen += sprintf(&OutBuffer[OutputLen], WebTrailer);
|
OutputLen += sprintf(&OutBuffer[OutputLen], "%s", WebTrailer);
|
||||||
|
|
||||||
HeaderLen = sprintf(Header, "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html\r\n\r\n", OutputLen);
|
HeaderLen = sprintf(Header, "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html\r\n\r\n", OutputLen);
|
||||||
sendandcheck(sock, Header, HeaderLen);
|
sendandcheck(sock, Header, HeaderLen);
|
||||||
|
@ -7711,7 +7710,7 @@ VOID APRSProcessHTTPMessage(SOCKET sock, char * MsgPtr, BOOL LOCAL, BOOL COOKIE)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputLen += sprintf(&OutBuffer[OutputLen], WebTrailer);
|
OutputLen += sprintf(&OutBuffer[OutputLen], "%s", WebTrailer);
|
||||||
|
|
||||||
HeaderLen = sprintf(Header, "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html\r\n\r\n", OutputLen);
|
HeaderLen = sprintf(Header, "HTTP/1.0 200 OK\r\nContent-Length: %d\r\nContent-Type: text/html\r\n\r\n", OutputLen);
|
||||||
sendandcheck(sock, Header, HeaderLen);
|
sendandcheck(sock, Header, HeaderLen);
|
||||||
|
@ -8113,7 +8112,7 @@ extern char OrigCmdBuffer[81];
|
||||||
|
|
||||||
BOOL isSYSOP(TRANSPORTENTRY * Session, char * Bufferptr);
|
BOOL isSYSOP(TRANSPORTENTRY * Session, char * Bufferptr);
|
||||||
|
|
||||||
VOID APRSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID APRSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// APRS Subcommands. Default for compatibility is APRSMH
|
// APRS Subcommands. Default for compatibility is APRSMH
|
||||||
|
|
||||||
|
@ -9178,7 +9177,7 @@ void GetSavedAPRSMessages()
|
||||||
if ((file = fopen(FN, "r")) == NULL)
|
if ((file = fopen(FN, "r")) == NULL)
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
while (fgets(Line, 512, file))
|
while (fgets(Line, sizeof(Line), file))
|
||||||
{
|
{
|
||||||
Stamp = Line;
|
Stamp = Line;
|
||||||
From = strlop(Stamp, ' ');
|
From = strlop(Stamp, ' ');
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,139 @@
|
||||||
|
--- APRSCode.c
|
||||||
|
+++ APRSCode.c
|
||||||
|
@@ -3674,7 +3674,7 @@
|
||||||
|
if (ptr1)
|
||||||
|
*ptr1 = 0;
|
||||||
|
|
||||||
|
-// Debugprintf("Duplicate Message supressed %s", Msg);
|
||||||
|
+// Debugprintf("Duplicate Message suppressed %s", Msg);
|
||||||
|
return TRUE; // Duplicate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--- BPQChat.rc
|
||||||
|
+++ BPQChat.rc
|
||||||
|
@@ -162,7 +162,7 @@
|
||||||
|
WS_VSCROLL
|
||||||
|
DEFPUSHBUTTON "Save Welcome Message",SAVEWELCOME,140,296,91,14,
|
||||||
|
BS_CENTER | BS_VCENTER
|
||||||
|
- LTEXT " If the node is not directly connectable (ie is not in your NODES table) you can add a connect script. This consists of a series of commands seperared by |, eg NOTCHT:G8BPQ-4|C 3 GM8BPQ-9|CHAT",
|
||||||
|
+ LTEXT " If the node is not directly connectable (ie is not in your NODES table) you can add a connect script. This consists of a series of commands separated by |, eg NOTCHT:G8BPQ-4|C 3 GM8BPQ-9|CHAT",
|
||||||
|
IDC_STATIC,9,52,355,24
|
||||||
|
END
|
||||||
|
|
||||||
|
--- BPQMail.rc
|
||||||
|
+++ BPQMail.rc
|
||||||
|
@@ -1045,7 +1045,7 @@
|
||||||
|
CONTROL "Delete Log and Message Files to Recycle Bin",
|
||||||
|
IDC_DELETETORECYCLE,"Button",BS_AUTOCHECKBOX |
|
||||||
|
BS_LEFTTEXT | BS_MULTILINE | WS_TABSTOP,5,142,115,20
|
||||||
|
- CONTROL "Supress Mailing of Housekeeping Results",
|
||||||
|
+ CONTROL "Suppress Mailing of Housekeeping Results",
|
||||||
|
IDC_MAINTNOMAIL,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
|
||||||
|
BS_MULTILINE | WS_TABSTOP,5,182,115,20
|
||||||
|
CONTROL "Generate Traffic Report",IDC_MAINTTRAFFIC,"Button",
|
||||||
|
--- HanksRT.c
|
||||||
|
+++ HanksRT.c
|
||||||
|
@@ -1186,7 +1186,7 @@
|
||||||
|
// Duplicate, so discard, but save time
|
||||||
|
|
||||||
|
DupInfo[i].DupTime = Now;
|
||||||
|
- Logprintf(LOG_CHAT, circuit, '?', "Duplicate Message From %s %s supressed", Call, Msg);
|
||||||
|
+ Logprintf(LOG_CHAT, circuit, '?', "Duplicate Message From %s %s suppressed", Call, Msg);
|
||||||
|
|
||||||
|
return TRUE; // Duplicate
|
||||||
|
}
|
||||||
|
--- RigControl.c
|
||||||
|
+++ RigControl.c
|
||||||
|
@@ -8385,7 +8385,7 @@
|
||||||
|
|
||||||
|
switch (Msg[0])
|
||||||
|
{
|
||||||
|
- case 'f': // Get Freqency
|
||||||
|
+ case 'f': // Get Frequency
|
||||||
|
|
||||||
|
HLGetFreq(Sock, RIG, sep);
|
||||||
|
return 0;
|
||||||
|
--- UZ7HODrv.c
|
||||||
|
+++ UZ7HODrv.c
|
||||||
|
@@ -374,7 +374,7 @@
|
||||||
|
{
|
||||||
|
// Read Freq
|
||||||
|
|
||||||
|
- buffptr->Len = sprintf((UCHAR *)&buffptr->Data[0], "UZ7HO} Modem Freqency %d\r", AGW->CenterFreq);
|
||||||
|
+ buffptr->Len = sprintf((UCHAR *)&buffptr->Data[0], "UZ7HO} Modem Frequency %d\r", AGW->CenterFreq);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -382,7 +382,7 @@
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
--- WinRPRHelper.c
|
||||||
|
+++ WinRPRHelper.c
|
||||||
|
@@ -111,7 +111,7 @@
|
||||||
|
|
||||||
|
if (argc < 3)
|
||||||
|
{
|
||||||
|
- printf ("Missing paramters - you need COM port and IP Address and rigctl port of BPQ, eg \r\n"
|
||||||
|
+ printf ("Missing parameters - you need COM port and IP Address and rigctl port of BPQ, eg \r\n"
|
||||||
|
" WinRPRHelper com10 192.168.1.64:4532\r\n\r\n"
|
||||||
|
"Press any key to exit\r\n");
|
||||||
|
|
||||||
|
--- config.c
|
||||||
|
+++ config.c
|
||||||
|
@@ -649,7 +649,7 @@
|
||||||
|
if (LOCATOR[0] == 0 && LocSpecified == 0 && RFOnly == 0)
|
||||||
|
{
|
||||||
|
Consoleprintf("");
|
||||||
|
- Consoleprintf("Please enter a LOCATOR statment in your BPQ32.cfg");
|
||||||
|
+ Consoleprintf("Please enter a LOCATOR statement in your BPQ32.cfg");
|
||||||
|
Consoleprintf("If you really don't want to be on the Node Map you can enter LOCATOR=NONE");
|
||||||
|
Consoleprintf("");
|
||||||
|
|
||||||
|
--- kiss.c
|
||||||
|
+++ kiss.c
|
||||||
|
@@ -1485,7 +1485,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
- Debugprintf("Polled KISS - response from wrong address - Polled %d Reponse %d",
|
||||||
|
+ Debugprintf("Polled KISS - response from wrong address - Polled %d Response %d",
|
||||||
|
KISS->POLLPOINTER->OURCTRL, (Port->RXMSG[0] & 0xf0));
|
||||||
|
|
||||||
|
goto SeeifMore; // SEE IF ANYTHING ELSE
|
||||||
|
--- templatedefs.c
|
||||||
|
+++ templatedefs.c
|
||||||
|
@@ -1165,7 +1165,7 @@
|
||||||
|
"Send Non-delivery Notifications<br>\r\n"
|
||||||
|
"for P and T messages <input %sname=\"SendND\" value=\"SendND\" type=\"checkbox\" /><br>\r\n"
|
||||||
|
" <br />\r\n"
|
||||||
|
- "Supress Mailing of<br>\r\n"
|
||||||
|
+ "Suppress Mailing of<br>\r\n"
|
||||||
|
"Housekeeping Result <input %sname=\"NoMail\" value=\"Yes\" type=\"checkbox\"><br><br>\r\n"
|
||||||
|
"Generate Traffic Report<input %sname=\"GenTraffic\" value=\"Yes\" type=\"checkbox\"><br><br>\r\n"
|
||||||
|
"<div style=\"text-align: center;\"><input class='btn' name=RunNow value=\"Run Housekeeping\" type=submit class='btn'></div>\r\n"
|
||||||
|
@@ -1454,7 +1454,7 @@
|
||||||
|
"<div style=\"text-align: left; width: 680px; margin: auto;\">The Nodes to link to box defines which other Chat Nodes should be connected to, or from which "
|
||||||
|
"connections may be accepted. The format is ALIAS:CALL, eg BPQCHT:G8BPQ-4. If the node is not directly "
|
||||||
|
"connectable (ie is not in your NODES table) you can add a connect script. This consists of a series of commands "
|
||||||
|
- "seperared by |, eg NOTCHT:G8BPQ-4|C 3 GM8BPQ-9|CHAT"
|
||||||
|
+ "separated by |, eg NOTCHT:G8BPQ-4|C 3 GM8BPQ-9|CHAT"
|
||||||
|
|
||||||
|
"<br><br>The Callsign of the Chat Node is not defined here - it is obtained from the bpq32.cfg APPLICATION line corresponding to the Chat Appl Number.<br>\r\n"
|
||||||
|
"<br></div>\n"
|
||||||
|
--- WebMail.c
|
||||||
|
+++ WebMail.c
|
||||||
|
@@ -2020,7 +2020,7 @@
|
||||||
|
"document.getElementById('myform').action = '/WebMail/QuoteOriginal' + '?%s';"
|
||||||
|
" document.getElementById('myform').submit();}</script>"
|
||||||
|
"<input type=button class='btn' onclick='myfunc()' "
|
||||||
|
- "value='Include Orignal Msg'>";
|
||||||
|
+ "value='Include Original Msg'>";
|
||||||
|
|
||||||
|
char Temp[1024];
|
||||||
|
char ReplyAddr[128];
|
6
ARDOP.c
6
ARDOP.c
|
@ -562,7 +562,7 @@ static int ProcessLine(char * buf, int Port)
|
||||||
|
|
||||||
void ARDOPThread(struct TNCINFO * TNC);
|
void ARDOPThread(struct TNCINFO * TNC);
|
||||||
VOID ARDOPProcessDataSocketData(int port);
|
VOID ARDOPProcessDataSocketData(int port);
|
||||||
int ConnecttoARDOP();
|
int ConnecttoARDOP(struct TNCINFO * TNC);
|
||||||
static VOID ARDOPProcessReceivedData(struct TNCINFO * TNC);
|
static VOID ARDOPProcessReceivedData(struct TNCINFO * TNC);
|
||||||
static VOID ARDOPProcessReceivedControl(struct TNCINFO * TNC);
|
static VOID ARDOPProcessReceivedControl(struct TNCINFO * TNC);
|
||||||
int V4ProcessReceivedData(struct TNCINFO * TNC);
|
int V4ProcessReceivedData(struct TNCINFO * TNC);
|
||||||
|
@ -3212,7 +3212,7 @@ VOID ARDOPProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen)
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
if (TNC->SendTandRtoRelay && memcmp(AppName, "RMS ", 4) == 0
|
if (TNC->SendTandRtoRelay && memcmp(AppName, "RMS ", 4) == 0
|
||||||
|
@ -5063,7 +5063,7 @@ tcpHostFrame:
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// Make sure app is available
|
// Make sure app is available
|
||||||
|
|
126
BBSUtilities.c
126
BBSUtilities.c
|
@ -51,6 +51,8 @@ extern struct ConsoleInfo BBSConsole;
|
||||||
|
|
||||||
extern char LOC[7];
|
extern char LOC[7];
|
||||||
|
|
||||||
|
extern BOOL MQTT;
|
||||||
|
|
||||||
//#define BBSIDLETIME 120
|
//#define BBSIDLETIME 120
|
||||||
//#define USERIDLETIME 300
|
//#define USERIDLETIME 300
|
||||||
|
|
||||||
|
@ -126,6 +128,7 @@ int32_t Encode(char * in, char * out, int32_t inlen, BOOL B1Protocol, int Compre
|
||||||
int APIENTRY ChangeSessionCallsign(int Stream, unsigned char * AXCall);
|
int APIENTRY ChangeSessionCallsign(int Stream, unsigned char * AXCall);
|
||||||
void SendMessageReadEvent(char * call, struct MsgInfo * Msg);
|
void SendMessageReadEvent(char * call, struct MsgInfo * Msg);
|
||||||
void SendNewMessageEvent(char * call, struct MsgInfo * Msg);
|
void SendNewMessageEvent(char * call, struct MsgInfo * Msg);
|
||||||
|
void MQTTMessageEvent(struct MsgInfo * message);
|
||||||
|
|
||||||
config_t cfg;
|
config_t cfg;
|
||||||
config_setting_t * group;
|
config_setting_t * group;
|
||||||
|
@ -3452,6 +3455,11 @@ VOID FlagAsKilled(struct MsgInfo * Msg, BOOL SaveDB)
|
||||||
if (SaveDB)
|
if (SaveDB)
|
||||||
SaveMessageDatabase();
|
SaveMessageDatabase();
|
||||||
RebuildNNTPList();
|
RebuildNNTPList();
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoDeliveredCommand(CIRCUIT * conn, struct UserInfo * user, char * Cmd, char * Arg1, char * Context)
|
void DoDeliveredCommand(CIRCUIT * conn, struct UserInfo * user, char * Cmd, char * Arg1, char * Context)
|
||||||
|
@ -4896,6 +4904,10 @@ sendEOM:
|
||||||
Msg->datechanged=time(NULL);
|
Msg->datechanged=time(NULL);
|
||||||
SaveMessageDatabase();
|
SaveMessageDatabase();
|
||||||
SendMessageReadEvent(user->Call, Msg);
|
SendMessageReadEvent(user->Call, Msg);
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5565,15 +5577,20 @@ BOOL CreateMessage(CIRCUIT * conn, char * From, char * ToCall, char * ATBBS, cha
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_memicmp(ToCall, "rms:", 4) == 0)
|
if (_memicmp(ToCall, "rms:", 4) == 0)
|
||||||
|
{
|
||||||
|
// Could be ampr.org message
|
||||||
|
|
||||||
|
if (!isAMPRMsg(ToCall))
|
||||||
{
|
{
|
||||||
if (!FindRMS())
|
if (!FindRMS())
|
||||||
{
|
{
|
||||||
nodeprintf(conn, "*** Error - Forwarding via RMS is not configured on this BBS\r");
|
nodeprintf(conn, "*** Error - Forwarding via RMS is not configured on this BBS\r");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
via=strlop(ToCall, ':');
|
via=strlop(ToCall, ':');
|
||||||
_strupr(ToCall);
|
_strupr(ToCall);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (_memicmp(ToCall, "rms/", 4) == 0)
|
else if (_memicmp(ToCall, "rms/", 4) == 0)
|
||||||
{
|
{
|
||||||
|
@ -6452,6 +6469,10 @@ nextline:
|
||||||
user = LookupCall(Msg->to);
|
user = LookupCall(Msg->to);
|
||||||
|
|
||||||
SendNewMessageEvent(user->Call, Msg);
|
SendNewMessageEvent(user->Call, Msg);
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (EnableUI)
|
if (EnableUI)
|
||||||
#ifdef LINBPQ
|
#ifdef LINBPQ
|
||||||
|
@ -6877,7 +6898,7 @@ int CountMessagestoForward (struct UserInfo * user)
|
||||||
if ((Msg->status != 'H') && (Msg->status != 'D') && Msg->type && check_fwd_bit(Msg->fbbs, BBSNumber))
|
if ((Msg->status != 'H') && (Msg->status != 'D') && Msg->type && check_fwd_bit(Msg->fbbs, BBSNumber))
|
||||||
{
|
{
|
||||||
n++;
|
n++;
|
||||||
continue; // So we dont count twice in Flag set and NTS MPS
|
continue; // So we dont count twice if Flag set and NTS MPS
|
||||||
}
|
}
|
||||||
|
|
||||||
// if an NTS MPS, also check for any matches
|
// if an NTS MPS, also check for any matches
|
||||||
|
@ -6918,6 +6939,66 @@ int CountMessagestoForward (struct UserInfo * user)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CountBytestoForward (struct UserInfo * user)
|
||||||
|
{
|
||||||
|
// See if any messages are queued for this BBS. If so return total bytes queued
|
||||||
|
|
||||||
|
int m, n=0;
|
||||||
|
struct MsgInfo * Msg;
|
||||||
|
int BBSNumber = user->BBSNumber;
|
||||||
|
int FirstMessage = FirstMessageIndextoForward;
|
||||||
|
|
||||||
|
if ((user->flags & F_NTSMPS))
|
||||||
|
FirstMessage = 1;
|
||||||
|
|
||||||
|
for (m = FirstMessage; m <= NumberofMessages; m++)
|
||||||
|
{
|
||||||
|
Msg=MsgHddrPtr[m];
|
||||||
|
|
||||||
|
if ((Msg->status != 'H') && (Msg->status != 'D') && Msg->type && check_fwd_bit(Msg->fbbs, BBSNumber))
|
||||||
|
{
|
||||||
|
n += Msg->length;
|
||||||
|
continue; // So we dont count twice if Flag set and NTS MPS
|
||||||
|
}
|
||||||
|
|
||||||
|
// if an NTS MPS, also check for any matches
|
||||||
|
|
||||||
|
if (Msg->type == 'T' && (user->flags & F_NTSMPS))
|
||||||
|
{
|
||||||
|
struct BBSForwardingInfo * ForwardingInfo = user->ForwardingInfo;
|
||||||
|
int depth;
|
||||||
|
|
||||||
|
if (Msg->status == 'N' && ForwardingInfo)
|
||||||
|
{
|
||||||
|
depth = CheckBBSToForNTS(Msg, ForwardingInfo);
|
||||||
|
|
||||||
|
if (depth > -1 && Msg->Locked == 0)
|
||||||
|
{
|
||||||
|
n += Msg->length;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
depth = CheckBBSAtList(Msg, ForwardingInfo, Msg->via);
|
||||||
|
|
||||||
|
if (depth && Msg->Locked == 0)
|
||||||
|
{
|
||||||
|
n += Msg->length;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
depth = CheckBBSATListWildCarded(Msg, ForwardingInfo, Msg->via);
|
||||||
|
|
||||||
|
if (depth > -1 && Msg->Locked == 0)
|
||||||
|
{
|
||||||
|
n += Msg->length;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
int ListMessagestoForward(CIRCUIT * conn, struct UserInfo * user)
|
int ListMessagestoForward(CIRCUIT * conn, struct UserInfo * user)
|
||||||
{
|
{
|
||||||
// See if any messages are queued for this BBS
|
// See if any messages are queued for this BBS
|
||||||
|
@ -10076,7 +10157,6 @@ BOOL GetConfig(char * ConfigName)
|
||||||
int i;
|
int i;
|
||||||
char Size[80];
|
char Size[80];
|
||||||
config_setting_t *setting;
|
config_setting_t *setting;
|
||||||
const char * ptr;
|
|
||||||
char * ptr1;
|
char * ptr1;
|
||||||
char FBBString[8192]= "";
|
char FBBString[8192]= "";
|
||||||
FBBFilter f;
|
FBBFilter f;
|
||||||
|
@ -10199,8 +10279,7 @@ BOOL GetConfig(char * ConfigName)
|
||||||
|
|
||||||
if (setting && setting->value.sval[0])
|
if (setting && setting->value.sval[0])
|
||||||
{
|
{
|
||||||
ptr = config_setting_get_string (setting);
|
WelcomeMsg = _strdup(config_setting_get_string (setting));
|
||||||
WelcomeMsg = _strdup(ptr);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
WelcomeMsg = _strdup("Hello $I. Latest Message is $L, Last listed is $Z\r\n");
|
WelcomeMsg = _strdup("Hello $I. Latest Message is $L, Last listed is $Z\r\n");
|
||||||
|
@ -10209,10 +10288,7 @@ BOOL GetConfig(char * ConfigName)
|
||||||
setting = config_setting_get_member (group, "NewUserWelcomeMsg");
|
setting = config_setting_get_member (group, "NewUserWelcomeMsg");
|
||||||
|
|
||||||
if (setting && setting->value.sval[0])
|
if (setting && setting->value.sval[0])
|
||||||
{
|
NewWelcomeMsg = _strdup(config_setting_get_string (setting));
|
||||||
ptr = config_setting_get_string (setting);
|
|
||||||
NewWelcomeMsg = _strdup(ptr);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
NewWelcomeMsg = _strdup("Hello $I. Latest Message is $L, Last listed is $Z\r\n");
|
NewWelcomeMsg = _strdup("Hello $I. Latest Message is $L, Last listed is $Z\r\n");
|
||||||
|
|
||||||
|
@ -10220,10 +10296,7 @@ BOOL GetConfig(char * ConfigName)
|
||||||
setting = config_setting_get_member (group, "ExpertWelcomeMsg");
|
setting = config_setting_get_member (group, "ExpertWelcomeMsg");
|
||||||
|
|
||||||
if (setting && setting->value.sval[0])
|
if (setting && setting->value.sval[0])
|
||||||
{
|
ExpertWelcomeMsg = _strdup(config_setting_get_string (setting));
|
||||||
ptr = config_setting_get_string (setting);
|
|
||||||
ExpertWelcomeMsg = _strdup(ptr);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
ExpertWelcomeMsg = _strdup("");
|
ExpertWelcomeMsg = _strdup("");
|
||||||
|
|
||||||
|
@ -10232,10 +10305,7 @@ BOOL GetConfig(char * ConfigName)
|
||||||
setting = config_setting_get_member (group, "Prompt");
|
setting = config_setting_get_member (group, "Prompt");
|
||||||
|
|
||||||
if (setting && setting->value.sval[0])
|
if (setting && setting->value.sval[0])
|
||||||
{
|
Prompt = _strdup(config_setting_get_string (setting));
|
||||||
ptr = config_setting_get_string (setting);
|
|
||||||
Prompt = _strdup(ptr);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Prompt = malloc(20);
|
Prompt = malloc(20);
|
||||||
|
@ -10245,10 +10315,7 @@ BOOL GetConfig(char * ConfigName)
|
||||||
setting = config_setting_get_member (group, "NewUserPrompt");
|
setting = config_setting_get_member (group, "NewUserPrompt");
|
||||||
|
|
||||||
if (setting && setting->value.sval[0])
|
if (setting && setting->value.sval[0])
|
||||||
{
|
NewPrompt = _strdup(config_setting_get_string (setting));
|
||||||
ptr = config_setting_get_string (setting);
|
|
||||||
NewPrompt = _strdup(ptr);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NewPrompt = malloc(20);
|
NewPrompt = malloc(20);
|
||||||
|
@ -10258,10 +10325,7 @@ BOOL GetConfig(char * ConfigName)
|
||||||
setting = config_setting_get_member (group, "ExpertPrompt");
|
setting = config_setting_get_member (group, "ExpertPrompt");
|
||||||
|
|
||||||
if (setting && setting->value.sval[0])
|
if (setting && setting->value.sval[0])
|
||||||
{
|
ExpertPrompt = _strdup(config_setting_get_string (setting));
|
||||||
ptr = config_setting_get_string (setting);
|
|
||||||
ExpertPrompt = _strdup(ptr);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ExpertPrompt = malloc(20);
|
ExpertPrompt = malloc(20);
|
||||||
|
@ -10482,7 +10546,7 @@ int Connected(int Stream)
|
||||||
char ConnectedMsg[] = "*** CONNECTED ";
|
char ConnectedMsg[] = "*** CONNECTED ";
|
||||||
char Msg[100];
|
char Msg[100];
|
||||||
char Title[100];
|
char Title[100];
|
||||||
int Freq = 0;
|
int64_t Freq = 0;
|
||||||
int Mode = 0;
|
int Mode = 0;
|
||||||
BPQVECSTRUC * SESS;
|
BPQVECSTRUC * SESS;
|
||||||
TRANSPORTENTRY * Sess1 = NULL, * Sess2;
|
TRANSPORTENTRY * Sess1 = NULL, * Sess2;
|
||||||
|
@ -11716,6 +11780,11 @@ VOID ProcessTextFwdLine(ConnectionInfo * conn, struct UserInfo * user, char * Bu
|
||||||
|
|
||||||
SaveMessageDatabase();
|
SaveMessageDatabase();
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(conn->FwdMsg);
|
||||||
|
#endif
|
||||||
|
|
||||||
conn->UserPointer->ForwardingInfo->MsgCount--;
|
conn->UserPointer->ForwardingInfo->MsgCount--;
|
||||||
|
|
||||||
// See if any more to forward
|
// See if any more to forward
|
||||||
|
@ -15823,6 +15892,11 @@ void SendMessageReadEvent(char * call, struct MsgInfo * Msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SendMessageForwardedToM0LTE(char * call, struct MsgInfo * Msg)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SendNewMessageEvent(char * call, struct MsgInfo * Msg)
|
void SendNewMessageEvent(char * call, struct MsgInfo * Msg)
|
||||||
{
|
{
|
||||||
if (reportMailEvents)
|
if (reportMailEvents)
|
||||||
|
|
|
@ -162,7 +162,7 @@ BEGIN
|
||||||
WS_VSCROLL
|
WS_VSCROLL
|
||||||
DEFPUSHBUTTON "Save Welcome Message",SAVEWELCOME,140,296,91,14,
|
DEFPUSHBUTTON "Save Welcome Message",SAVEWELCOME,140,296,91,14,
|
||||||
BS_CENTER | BS_VCENTER
|
BS_CENTER | BS_VCENTER
|
||||||
LTEXT " If the node is not directly connectable (ie is not in your NODES table) you can add a connect script. This consists of a series of commands seperared by |, eg NOTCHT:G8BPQ-4|C 3 GM8BPQ-9|CHAT",
|
LTEXT " If the node is not directly connectable (ie is not in your NODES table) you can add a connect script. This consists of a series of commands separared by |, eg NOTCHT:G8BPQ-4|C 3 GM8BPQ-9|CHAT",
|
||||||
IDC_STATIC,9,52,355,24
|
IDC_STATIC,9,52,355,24
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ typedef struct _RTTMSG
|
||||||
|
|
||||||
} RTTMSG;
|
} RTTMSG;
|
||||||
|
|
||||||
extern int COUNTNODES();
|
int COUNTNODES(struct ROUTE * ROUTE);
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
|
|
||||||
|
|
25
BPQMail.c
25
BPQMail.c
|
@ -1143,6 +1143,8 @@
|
||||||
// Semaphore calls to SaveConfig
|
// Semaphore calls to SaveConfig
|
||||||
// Include SERVIC as valid from call (for Winlink Service messages) (49)
|
// Include SERVIC as valid from call (for Winlink Service messages) (49)
|
||||||
// Attempt to detect line draw characters in Webmail (50)
|
// Attempt to detect line draw characters in Webmail (50)
|
||||||
|
// Fix sending ampr.org mail when RMS is not enabled (51)
|
||||||
|
// Send forwarding info to packetnodes.spots.radio database (51)
|
||||||
|
|
||||||
#include "bpqmail.h"
|
#include "bpqmail.h"
|
||||||
#include "winstdint.h"
|
#include "winstdint.h"
|
||||||
|
@ -1161,6 +1163,8 @@ FARPROCZ pGetLOC;
|
||||||
FARPROCX pRefreshWebMailIndex;
|
FARPROCX pRefreshWebMailIndex;
|
||||||
FARPROCX pRunEventProgram;
|
FARPROCX pRunEventProgram;
|
||||||
FARPROCX pGetPortFrequency;
|
FARPROCX pGetPortFrequency;
|
||||||
|
FARPROCX pSendWebRequest;
|
||||||
|
FARPROCX pGetLatLon;
|
||||||
|
|
||||||
BOOL WINE = FALSE;
|
BOOL WINE = FALSE;
|
||||||
|
|
||||||
|
@ -1385,6 +1389,7 @@ char * CheckToAddress(CIRCUIT * conn, char * Addr);
|
||||||
BOOL CheckifPacket(char * Via);
|
BOOL CheckifPacket(char * Via);
|
||||||
int GetHTMLForms();
|
int GetHTMLForms();
|
||||||
VOID GetPGConfig();
|
VOID GetPGConfig();
|
||||||
|
void SendBBSDataToPktMap();
|
||||||
|
|
||||||
struct _EXCEPTION_POINTERS exinfox;
|
struct _EXCEPTION_POINTERS exinfox;
|
||||||
|
|
||||||
|
@ -1936,6 +1941,8 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||||
pRefreshWebMailIndex = GetProcAddress(ExtDriver,"_RefreshWebMailIndex@0");
|
pRefreshWebMailIndex = GetProcAddress(ExtDriver,"_RefreshWebMailIndex@0");
|
||||||
pRunEventProgram = GetProcAddress(ExtDriver,"_RunEventProgram@8");
|
pRunEventProgram = GetProcAddress(ExtDriver,"_RunEventProgram@8");
|
||||||
pGetPortFrequency = GetProcAddress(ExtDriver,"_GetPortFrequency@8");
|
pGetPortFrequency = GetProcAddress(ExtDriver,"_GetPortFrequency@8");
|
||||||
|
pSendWebRequest = GetProcAddress(ExtDriver,"_SendWebRequest@16");
|
||||||
|
pGetLatLon = GetProcAddress(ExtDriver,"_GetLatLon@8");
|
||||||
|
|
||||||
|
|
||||||
if (pGetLOC)
|
if (pGetLOC)
|
||||||
|
@ -2183,6 +2190,13 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
Debugprintf("|Enter HouseKeeping");
|
Debugprintf("|Enter HouseKeeping");
|
||||||
DoHouseKeeping(FALSE);
|
DoHouseKeeping(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (APIClock < NOW)
|
||||||
|
{
|
||||||
|
SendBBSDataToPktMap();
|
||||||
|
APIClock = NOW + 7200; // Every 2 hours
|
||||||
|
}
|
||||||
|
|
||||||
tm = gmtime(&NOW);
|
tm = gmtime(&NOW);
|
||||||
|
|
||||||
if (tm->tm_wday == 0) // Sunday
|
if (tm->tm_wday == 0) // Sunday
|
||||||
|
@ -2816,6 +2830,12 @@ gotAddr:
|
||||||
|
|
||||||
EndDialog(hDlg, LOWORD(wParam));
|
EndDialog(hDlg, LOWORD(wParam));
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3057,7 +3077,6 @@ static PSOCKADDR_IN psin;
|
||||||
SOCKET sock;
|
SOCKET sock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOL Initialise()
|
BOOL Initialise()
|
||||||
{
|
{
|
||||||
int i, len;
|
int i, len;
|
||||||
|
@ -3072,6 +3091,8 @@ BOOL Initialise()
|
||||||
|
|
||||||
GetTimeZoneInformation(&TimeZoneInformation);
|
GetTimeZoneInformation(&TimeZoneInformation);
|
||||||
|
|
||||||
|
Debugprintf("%d", sizeof(struct MsgInfo));
|
||||||
|
|
||||||
_tzset();
|
_tzset();
|
||||||
_MYTIMEZONE = timezone;
|
_MYTIMEZONE = timezone;
|
||||||
_MYTIMEZONE = TimeZoneInformation.Bias * 60;
|
_MYTIMEZONE = TimeZoneInformation.Bias * 60;
|
||||||
|
@ -3383,6 +3404,8 @@ BOOL Initialise()
|
||||||
CreatePipeThread();
|
CreatePipeThread();
|
||||||
GetPGConfig();
|
GetPGConfig();
|
||||||
|
|
||||||
|
APIClock = 0;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1045,7 +1045,7 @@ BEGIN
|
||||||
CONTROL "Delete Log and Message Files to Recycle Bin",
|
CONTROL "Delete Log and Message Files to Recycle Bin",
|
||||||
IDC_DELETETORECYCLE,"Button",BS_AUTOCHECKBOX |
|
IDC_DELETETORECYCLE,"Button",BS_AUTOCHECKBOX |
|
||||||
BS_LEFTTEXT | BS_MULTILINE | WS_TABSTOP,5,142,115,20
|
BS_LEFTTEXT | BS_MULTILINE | WS_TABSTOP,5,142,115,20
|
||||||
CONTROL "Supress Mailing of Housekeeping Results",
|
CONTROL "Suppress Mailing of Housekeeping Results",
|
||||||
IDC_MAINTNOMAIL,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
|
IDC_MAINTNOMAIL,"Button",BS_AUTOCHECKBOX | BS_LEFTTEXT |
|
||||||
BS_MULTILINE | WS_TABSTOP,5,182,115,20
|
BS_MULTILINE | WS_TABSTOP,5,182,115,20
|
||||||
CONTROL "Generate Traffic Report",IDC_MAINTTRAFFIC,"Button",
|
CONTROL "Generate Traffic Report",IDC_MAINTTRAFFIC,"Button",
|
||||||
|
|
|
@ -214,7 +214,7 @@ LRESULT APIENTRY InputProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ;
|
||||||
LRESULT APIENTRY MonProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ;
|
LRESULT APIENTRY MonProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ;
|
||||||
|
|
||||||
|
|
||||||
extern CMDX COMMANDS[];
|
extern struct CMDX COMMANDS[];
|
||||||
extern int APPL1;
|
extern int APPL1;
|
||||||
|
|
||||||
static HMENU trayMenu;
|
static HMENU trayMenu;
|
||||||
|
|
|
@ -87,7 +87,7 @@ void CreateMHWindow();
|
||||||
int Update_MH_List(struct in_addr ipad, char * call, char proto);
|
int Update_MH_List(struct in_addr ipad, char * call, char proto);
|
||||||
|
|
||||||
static BOOL ReadConfigFile(int Port);
|
static BOOL ReadConfigFile(int Port);
|
||||||
int ConnecttoAGW();
|
int ConnecttoAGW(int port);
|
||||||
int ProcessReceivedData(int bpqport);
|
int ProcessReceivedData(int bpqport);
|
||||||
static int ProcessLine(char * buf, int Port, BOOL CheckPort);
|
static int ProcessLine(char * buf, int Port, BOOL CheckPort);
|
||||||
|
|
||||||
|
|
20
Bpq32.c
20
Bpq32.c
|
@ -1086,7 +1086,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
// Add ? and * wildcards to NODES command (74)
|
// Add ? and * wildcards to NODES command (74)
|
||||||
// Add Port RADIO config parameter (74)
|
// Add Port RADIO config parameter (74)
|
||||||
|
|
||||||
// Version 6.0.24.1 August 2024
|
// Version 6.0.24.1 August 2023
|
||||||
|
|
||||||
// Apply NODES command wildcard to alias as well a call (2)
|
// Apply NODES command wildcard to alias as well a call (2)
|
||||||
// Add STOPPORT/STARTPORT to VARA Driver (2)
|
// Add STOPPORT/STARTPORT to VARA Driver (2)
|
||||||
|
@ -1234,6 +1234,11 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
// Add optional ATTACH time limit for VARA (48)
|
// Add optional ATTACH time limit for VARA (48)
|
||||||
// API format fixes (48)
|
// API format fixes (48)
|
||||||
// AGWAPI Add protection against accidental connects from a non-agw application (50)
|
// AGWAPI Add protection against accidental connects from a non-agw application (50)
|
||||||
|
// Save MH and NODES every hour (51)
|
||||||
|
// Fix handling long unix device names (now max 250 bytes) (52)
|
||||||
|
// Fix error reporting in api update (53)
|
||||||
|
// Coding changes to remove some compiler warnings (53, 54)
|
||||||
|
// Add MQTT reporting o
|
||||||
|
|
||||||
#define CKernel
|
#define CKernel
|
||||||
|
|
||||||
|
@ -1374,6 +1379,9 @@ extern struct _LINKTABLE * LINKS;
|
||||||
extern int LINK_TABLE_LEN;
|
extern int LINK_TABLE_LEN;
|
||||||
extern int MAXLINKS;
|
extern int MAXLINKS;
|
||||||
|
|
||||||
|
extern double LatFromLOC;
|
||||||
|
extern double LonFromLOC;
|
||||||
|
|
||||||
|
|
||||||
extern int BPQHOSTAPI();
|
extern int BPQHOSTAPI();
|
||||||
extern int INITIALISEPORTS();
|
extern int INITIALISEPORTS();
|
||||||
|
@ -3068,7 +3076,7 @@ SkipInit:
|
||||||
|
|
||||||
if (AttachedProcesses < 2)
|
if (AttachedProcesses < 2)
|
||||||
{
|
{
|
||||||
if (AUTOSAVE == 1)
|
if (AUTOSAVE)
|
||||||
SaveNodes();
|
SaveNodes();
|
||||||
if (AUTOSAVEMH)
|
if (AUTOSAVEMH)
|
||||||
SaveMH();
|
SaveMH();
|
||||||
|
@ -6626,6 +6634,14 @@ DllExport char * APIENTRY GetLOC()
|
||||||
return LOC;
|
return LOC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DllExport void APIENTRY GetLatLon(double * lat, double * lon)
|
||||||
|
{
|
||||||
|
*lat = LatFromLOC;
|
||||||
|
*lon = LonFromLOC;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// UZ7HO Dll PTT interface
|
// UZ7HO Dll PTT interface
|
||||||
|
|
||||||
// 1 ext_PTT_info
|
// 1 ext_PTT_info
|
||||||
|
|
|
@ -93,7 +93,7 @@ VOID DoTheCommand(TRANSPORTENTRY * Session);
|
||||||
char * MOVEANDCHECK(TRANSPORTENTRY * Session, char * Bufferptr, char * Source, int Len);
|
char * MOVEANDCHECK(TRANSPORTENTRY * Session, char * Bufferptr, char * Source, int Len);
|
||||||
VOID DISPLAYCIRCUIT(TRANSPORTENTRY * L4, char * Buffer);
|
VOID DISPLAYCIRCUIT(TRANSPORTENTRY * L4, char * Buffer);
|
||||||
char * FormatUptime(int Uptime);
|
char * FormatUptime(int Uptime);
|
||||||
char * strlop(char * buf, char delim);
|
char * strlop(const char * buf, char delim);
|
||||||
BOOL CompareCalls(UCHAR * c1, UCHAR * c2);
|
BOOL CompareCalls(UCHAR * c1, UCHAR * c2);
|
||||||
|
|
||||||
VOID PostDataAvailable(TRANSPORTENTRY * Session);
|
VOID PostDataAvailable(TRANSPORTENTRY * Session);
|
||||||
|
@ -109,7 +109,7 @@ int cCOUNT_AT_L2(struct _LINKTABLE * LINK);
|
||||||
VOID SENDL4CONNECT(TRANSPORTENTRY * Session);
|
VOID SENDL4CONNECT(TRANSPORTENTRY * Session);
|
||||||
|
|
||||||
VOID CloseSessionPartner(TRANSPORTENTRY * Session);
|
VOID CloseSessionPartner(TRANSPORTENTRY * Session);
|
||||||
int COUNTNODES();
|
int COUNTNODES(struct ROUTE * ROUTE);
|
||||||
int DecodeNodeName(char * NodeName, char * ptr);;
|
int DecodeNodeName(char * NodeName, char * ptr);;
|
||||||
VOID DISPLAYCIRCUIT(TRANSPORTENTRY * L4, char * Buffer);
|
VOID DISPLAYCIRCUIT(TRANSPORTENTRY * L4, char * Buffer);
|
||||||
int cCOUNT_AT_L2(struct _LINKTABLE * LINK);
|
int cCOUNT_AT_L2(struct _LINKTABLE * LINK);
|
||||||
|
@ -359,7 +359,7 @@ extern char * ConfigBuffer;
|
||||||
|
|
||||||
extern char * WL2KReportLine[];
|
extern char * WL2KReportLine[];
|
||||||
|
|
||||||
extern CMDX COMMANDS[];
|
extern struct CMDX COMMANDS[];
|
||||||
|
|
||||||
extern int QCOUNT, MAXBUFFS, MAXCIRCUITS, L4DEFAULTWINDOW, L4T1, CMDXLEN;
|
extern int QCOUNT, MAXBUFFS, MAXCIRCUITS, L4DEFAULTWINDOW, L4T1, CMDXLEN;
|
||||||
extern char CMDALIAS[ALIASLEN][NumberofAppls];
|
extern char CMDALIAS[ALIASLEN][NumberofAppls];
|
||||||
|
@ -398,6 +398,7 @@ extern int REALTIMETICKS;
|
||||||
|
|
||||||
extern time_t CurrentSecs;
|
extern time_t CurrentSecs;
|
||||||
extern time_t lastSlowSecs;
|
extern time_t lastSlowSecs;
|
||||||
|
extern time_t lastSaveSecs;
|
||||||
|
|
||||||
// SNMP Variables
|
// SNMP Variables
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
#ifdef LINBPQ
|
#ifdef LINBPQ
|
||||||
|
|
||||||
#include "compatbits.h"
|
#include "compatbits.h"
|
||||||
|
char * strlop(const char * buf, char delim);
|
||||||
|
|
||||||
#define APIENTRY
|
#define APIENTRY
|
||||||
#define VOID void
|
#define VOID void
|
||||||
|
@ -31,7 +32,6 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
VOID APIENTRY md5 (char *arg, unsigned char * checksum);
|
VOID APIENTRY md5 (char *arg, unsigned char * checksum);
|
||||||
|
|
||||||
|
|
199
Cmd.c
199
Cmd.c
|
@ -44,6 +44,8 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
#include "tncinfo.h"
|
#include "tncinfo.h"
|
||||||
#include "telnetserver.h"
|
#include "telnetserver.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#include "GetVersion.h"
|
//#include "GetVersion.h"
|
||||||
|
|
||||||
//#define DllImport __declspec( dllimport )
|
//#define DllImport __declspec( dllimport )
|
||||||
|
@ -64,12 +66,12 @@ VOID L2SENDXID(struct _LINKTABLE * LINK);
|
||||||
int CountBits(unsigned long in);
|
int CountBits(unsigned long in);
|
||||||
VOID SaveMH();
|
VOID SaveMH();
|
||||||
BOOL RestartTNC(struct TNCINFO * TNC);
|
BOOL RestartTNC(struct TNCINFO * TNC);
|
||||||
void GetPortCTEXT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
void GetPortCTEXT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID WriteMiniDump();
|
VOID WriteMiniDump();
|
||||||
int CheckKissInterlock(struct PORTCONTROL * PORT, int Exclusive);
|
int CheckKissInterlock(struct PORTCONTROL * PORT, int Exclusive);
|
||||||
int seeifInterlockneeded(struct PORTCONTROL * PORT);
|
int seeifInterlockneeded(struct PORTCONTROL * PORT);
|
||||||
|
|
||||||
extern VOID KISSTX();
|
extern VOID KISSTX(struct KISSINFO * KISS, PMESSAGE Buffer);
|
||||||
|
|
||||||
char COMMANDBUFFER[81] = ""; // Command Hander input buffer
|
char COMMANDBUFFER[81] = ""; // Command Hander input buffer
|
||||||
char OrigCmdBuffer[81] = ""; // Command Hander input buffer before toupper
|
char OrigCmdBuffer[81] = ""; // Command Hander input buffer before toupper
|
||||||
|
@ -134,8 +136,8 @@ int L4FRAMESRETRIED = 0;
|
||||||
int OLDFRAMES = 0;
|
int OLDFRAMES = 0;
|
||||||
int L3FRAMES = 0;
|
int L3FRAMES = 0;
|
||||||
|
|
||||||
VOID SENDSABM();
|
VOID SENDSABM(struct _LINKTABLE * LINK);
|
||||||
VOID RESET2();
|
VOID RESET2(struct _LINKTABLE * LINK);
|
||||||
|
|
||||||
int APPL1 = 0;
|
int APPL1 = 0;
|
||||||
int PASSCMD = 0;
|
int PASSCMD = 0;
|
||||||
|
@ -149,33 +151,35 @@ char * ALIASPTR = &CMDALIAS[0][0];
|
||||||
|
|
||||||
extern int RigReconfigFlag;
|
extern int RigReconfigFlag;
|
||||||
|
|
||||||
CMDX COMMANDS[];
|
|
||||||
|
|
||||||
int CMDXLEN = sizeof (CMDX);
|
|
||||||
|
struct CMDX COMMANDS[];
|
||||||
|
|
||||||
|
int CMDXLEN = sizeof (struct CMDX);
|
||||||
|
|
||||||
VOID SENDNODESMSG();
|
VOID SENDNODESMSG();
|
||||||
VOID KISSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID KISSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID STOPCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID STOPCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID STARTCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID STARTCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID STOPPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID STOPPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID STARTPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID STARTPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID FINDBUFFS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID FINDBUFFS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID WL2KSYSOP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID WL2KSYSOP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID AXRESOLVER(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID AXRESOLVER(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID AXMHEARD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID AXMHEARD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID SHOWTELNET(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID SHOWTELNET(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID SHOWAGW(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID SHOWAGW(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID SHOWARP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID SHOWARP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID SHOWNAT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID SHOWNAT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID PING(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID PING(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID SHOWIPROUTE(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID SHOWIPROUTE(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID FLMSG(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD);
|
VOID FLMSG(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD);
|
||||||
void ListExcludedCalls(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
void ListExcludedCalls(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID APRSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID APRSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID RECONFIGTELNET (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID RECONFIGTELNET (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID HELPCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID HELPCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
VOID UZ7HOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD);
|
VOID UZ7HOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD);
|
||||||
VOID QTSMCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD);
|
VOID QTSMCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD);
|
||||||
void hookL2SessionAttempt(int Port, char * fromCall, char * toCall, struct _LINKTABLE * LINK);
|
void hookL2SessionAttempt(int Port, char * fromCall, char * toCall, struct _LINKTABLE * LINK);
|
||||||
|
|
||||||
|
|
||||||
|
@ -242,7 +246,7 @@ char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID SENDNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SENDNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
SENDNODESMSG();
|
SENDNODESMSG();
|
||||||
|
|
||||||
|
@ -252,7 +256,7 @@ VOID SENDNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SAVEMHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SAVEMHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
SaveMH();
|
SaveMH();
|
||||||
|
|
||||||
|
@ -262,7 +266,7 @@ VOID SAVEMHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SAVENODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SAVENODES(struct _TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
SaveNodes();
|
SaveNodes();
|
||||||
|
|
||||||
|
@ -272,7 +276,7 @@ VOID SAVENODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID DUMPCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID DUMPCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
WriteMiniDump();
|
WriteMiniDump();
|
||||||
|
|
||||||
|
@ -282,7 +286,7 @@ VOID DUMPCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID RIGRECONFIG(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID RIGRECONFIG(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
if (!ProcessConfig())
|
if (!ProcessConfig())
|
||||||
{
|
{
|
||||||
|
@ -297,7 +301,7 @@ VOID RIGRECONFIG(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMD
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID REBOOT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID REBOOT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
if (Reboot())
|
if (Reboot())
|
||||||
{
|
{
|
||||||
|
@ -313,7 +317,7 @@ VOID REBOOT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * C
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID RESTART(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID RESTART(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
if (Restart())
|
if (Restart())
|
||||||
{
|
{
|
||||||
|
@ -329,7 +333,7 @@ VOID RESTART(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID RESTARTTNC(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID RESTARTTNC(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char * ptr, *Context;
|
char * ptr, *Context;
|
||||||
int portno;
|
int portno;
|
||||||
|
@ -373,20 +377,20 @@ VOID RESTARTTNC(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
|
|
||||||
UCHAR VALNODESFLAG = 0, EXTONLY = 0;
|
UCHAR VALNODESFLAG = 0, EXTONLY = 0;
|
||||||
|
|
||||||
VOID PORTVAL (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
VOID PORTVAL (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
|
|
||||||
VOID VALNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID VALNODES(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
VALNODESFLAG = 1;
|
VALNODESFLAG = 1;
|
||||||
PORTVAL(Session, Bufferptr, CmdTail, CMD);
|
PORTVAL(Session, Bufferptr, CmdTail, CMD);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID EXTPORTVAL(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID EXTPORTVAL(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
EXTONLY = 1;
|
EXTONLY = 1;
|
||||||
PORTVAL(Session, Bufferptr, CmdTail, CMD);
|
PORTVAL(Session, Bufferptr, CmdTail, CMD);
|
||||||
}
|
}
|
||||||
VOID PORTVAL(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID PORTVAL(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS PORT VALUE COMMANDS
|
// PROCESS PORT VALUE COMMANDS
|
||||||
|
|
||||||
|
@ -501,7 +505,7 @@ VOID PORTVAL(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SWITCHVAL (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SWITCHVAL (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// Update switch 8 bit value
|
// Update switch 8 bit value
|
||||||
|
|
||||||
|
@ -546,7 +550,7 @@ VOID SWITCHVAL (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SWITCHVALW (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SWITCHVALW (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// Update switch 16 bit value
|
// Update switch 16 bit value
|
||||||
|
|
||||||
|
@ -709,7 +713,7 @@ BOOL cATTACHTOBBS(TRANSPORTENTRY * Session, UINT Mask, int Paclen, int * AnySess
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
BOOL CONFAILED = 0;
|
BOOL CONFAILED = 0;
|
||||||
UINT CONERROR ;
|
UINT CONERROR ;
|
||||||
|
@ -820,13 +824,13 @@ VOID APPLCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID CMDI00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDI00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, "%s", INFOMSG);
|
Bufferptr = Cmdprintf(Session, Bufferptr, "%s", INFOMSG);
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CMDV00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDV00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
if (sizeof(void *) == 4)
|
if (sizeof(void *) == 4)
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, "Version %s\r", VersionString);
|
Bufferptr = Cmdprintf(Session, Bufferptr, "Version %s\r", VersionString);
|
||||||
|
@ -836,14 +840,14 @@ VOID CMDV00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * C
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID BYECMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID BYECMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
CLOSECURRENTSESSION(Session); // Kills any crosslink, plus local link
|
CLOSECURRENTSESSION(Session); // Kills any crosslink, plus local link
|
||||||
ReleaseBuffer((UINT *)REPLYBUFFER);
|
ReleaseBuffer((UINT *)REPLYBUFFER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CMDPAC(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDPAC(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// SET PACLEN FOR THIS SESSION
|
// SET PACLEN FOR THIS SESSION
|
||||||
|
|
||||||
|
@ -865,7 +869,7 @@ VOID CMDPAC(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * C
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CMDIDLE(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDIDLE(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// SET IDLETIME FOR THIS SESSION
|
// SET IDLETIME FOR THIS SESSION
|
||||||
|
|
||||||
|
@ -887,7 +891,7 @@ VOID CMDIDLE(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
|
|
||||||
}
|
}
|
||||||
VOID CMDT00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDT00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// SET L4 TIMEOUT FOR CONNECTS ON THIS SESSION
|
// SET L4 TIMEOUT FOR CONNECTS ON THIS SESSION
|
||||||
|
|
||||||
|
@ -912,7 +916,7 @@ VOID CMDT00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * C
|
||||||
UCHAR PWLen;
|
UCHAR PWLen;
|
||||||
char PWTEXT[80];
|
char PWTEXT[80];
|
||||||
|
|
||||||
VOID PWDCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID PWDCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char * ptr, *Context;
|
char * ptr, *Context;
|
||||||
USHORT pwsum = 0;
|
USHORT pwsum = 0;
|
||||||
|
@ -980,7 +984,7 @@ VOID PWDCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * C
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CMDSTATS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDSTATS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char * ptr, *Context;
|
char * ptr, *Context;
|
||||||
int Port = 0, cols = NUMBEROFPORTS, i;
|
int Port = 0, cols = NUMBEROFPORTS, i;
|
||||||
|
@ -1214,7 +1218,7 @@ VOID CMDSTATS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CMDL00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDL00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS 'LINKS' MESSAGE
|
// PROCESS 'LINKS' MESSAGE
|
||||||
|
|
||||||
|
@ -1250,7 +1254,7 @@ VOID CMDL00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * C
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID CMDS00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDS00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS 'USERS'
|
// PROCESS 'USERS'
|
||||||
|
|
||||||
|
@ -1322,7 +1326,7 @@ CMDS60:
|
||||||
|
|
||||||
extern int MasterPort[MAXBPQPORTS+1]; // Pointer to first BPQ port for a specific MPSK or UZ7HO host
|
extern int MasterPort[MAXBPQPORTS+1]; // Pointer to first BPQ port for a specific MPSK or UZ7HO host
|
||||||
|
|
||||||
VOID CMDP00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDP00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// Process PORTS Message
|
// Process PORTS Message
|
||||||
|
|
||||||
|
@ -1577,7 +1581,7 @@ char * DisplayRoute(TRANSPORTENTRY * Session, char * Bufferptr, struct ROUTE *
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID CMDR00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDR00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
struct ROUTE * Routes = NEIGHBOURS;
|
struct ROUTE * Routes = NEIGHBOURS;
|
||||||
int MaxRoutes = MAXNEIGHBOURS;
|
int MaxRoutes = MAXNEIGHBOURS;
|
||||||
|
@ -1867,7 +1871,7 @@ SendReply:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID LISTENCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID LISTENCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS LISTEN COMMAND
|
// PROCESS LISTEN COMMAND
|
||||||
|
|
||||||
|
@ -1950,7 +1954,7 @@ VOID LISTENCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID UNPROTOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID UNPROTOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS UNPROTO COMMAND
|
// PROCESS UNPROTO COMMAND
|
||||||
|
|
||||||
|
@ -2019,7 +2023,7 @@ VOID UNPROTOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CALCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CALCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS CAL COMMAND
|
// PROCESS CAL COMMAND
|
||||||
|
|
||||||
|
@ -2072,7 +2076,7 @@ VOID CALCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * C
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID CQCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CQCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// Send a CQ Beacon on a radio port. Must be in LISTEN state
|
// Send a CQ Beacon on a radio port. Must be in LISTEN state
|
||||||
|
|
||||||
|
@ -2278,9 +2282,9 @@ BOOL FindLink(UCHAR * LinkCall, UCHAR * OurCall, int Port, struct _LINKTABLE **
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID ATTACHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD);
|
VOID ATTACHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD);
|
||||||
|
|
||||||
VOID CMDC00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDC00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS CONNECT COMMAND
|
// PROCESS CONNECT COMMAND
|
||||||
|
|
||||||
|
@ -2302,7 +2306,7 @@ VOID CMDC00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * C
|
||||||
char PortString[10];
|
char PortString[10];
|
||||||
char cmdCopy[256];
|
char cmdCopy[256];
|
||||||
struct _EXTPORTDATA * EXTPORT = (struct _EXTPORTDATA *)PORT;
|
struct _EXTPORTDATA * EXTPORT = (struct _EXTPORTDATA *)PORT;
|
||||||
char toCall[12], fromCall[12];
|
|
||||||
|
|
||||||
#ifdef EXCLUDEBITS
|
#ifdef EXCLUDEBITS
|
||||||
|
|
||||||
|
@ -2920,7 +2924,7 @@ BOOL DecodeCallString(char * Calls, BOOL * Stay, BOOL * Spy, UCHAR * AXCalls)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID LINKCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID LINKCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS *** LINKED to CALLSIGN
|
// PROCESS *** LINKED to CALLSIGN
|
||||||
|
|
||||||
|
@ -3112,7 +3116,7 @@ int WildCmp(char * pattern, char * string)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CMDN00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID CMDN00(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
struct DEST_LIST * Dest = DESTS;
|
struct DEST_LIST * Dest = DESTS;
|
||||||
int count = MAXDESTS, i;
|
int count = MAXDESTS, i;
|
||||||
|
@ -3633,7 +3637,7 @@ SendReply:
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CMDQUERY(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD)
|
VOID CMDQUERY(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD)
|
||||||
{
|
{
|
||||||
// DISPLAY AVAILABLE COMMANDS
|
// DISPLAY AVAILABLE COMMANDS
|
||||||
|
|
||||||
|
@ -3642,7 +3646,7 @@ VOID CMDQUERY(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
char ApplList[2048];
|
char ApplList[2048];
|
||||||
char * out = ApplList;
|
char * out = ApplList;
|
||||||
|
|
||||||
CMDX * CMD = &COMMANDS[APPL1];
|
struct CMDX * CMD = &COMMANDS[APPL1];
|
||||||
|
|
||||||
for (n = 0; n < NumberofAppls; n++)
|
for (n = 0; n < NumberofAppls; n++)
|
||||||
{
|
{
|
||||||
|
@ -3672,7 +3676,7 @@ VOID CMDQUERY(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
|
|
||||||
char * FormatMH(MHSTRUC * MH, char Format);
|
char * FormatMH(MHSTRUC * MH, char Format);
|
||||||
|
|
||||||
VOID MHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID MHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// DISPLAY HEARD LIST
|
// DISPLAY HEARD LIST
|
||||||
|
|
||||||
|
@ -3854,7 +3858,7 @@ VOID MHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CM
|
||||||
|
|
||||||
int Rig_Command(TRANSPORTENTRY * Session, char * Command);
|
int Rig_Command(TRANSPORTENTRY * Session, char * Command);
|
||||||
|
|
||||||
VOID RADIOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD)
|
VOID RADIOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD)
|
||||||
{
|
{
|
||||||
char * ptr;
|
char * ptr;
|
||||||
|
|
||||||
|
@ -3883,7 +3887,7 @@ VOID RADIOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
VOID SendNRRecordRoute(struct DEST_LIST * DEST, TRANSPORTENTRY * Session);
|
VOID SendNRRecordRoute(struct DEST_LIST * DEST, TRANSPORTENTRY * Session);
|
||||||
|
|
||||||
|
|
||||||
VOID NRRCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD)
|
VOID NRRCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD)
|
||||||
{
|
{
|
||||||
// PROCESS 'NRR - Netrom Record Route' COMMAND
|
// PROCESS 'NRR - Netrom Record Route' COMMAND
|
||||||
|
|
||||||
|
@ -3953,7 +3957,7 @@ int CHECKINTERLOCK(struct PORTCONTROL * OURPORT)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID ATTACHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD)
|
VOID ATTACHCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD)
|
||||||
{
|
{
|
||||||
// ATTACH to a PACTOR or similar port
|
// ATTACH to a PACTOR or similar port
|
||||||
|
|
||||||
|
@ -4318,16 +4322,17 @@ checkattachandcall:
|
||||||
|
|
||||||
// SYSOP COMMANDS
|
// SYSOP COMMANDS
|
||||||
|
|
||||||
CMDX COMMANDS[] =
|
struct CMDX COMMANDS[] =
|
||||||
{
|
{
|
||||||
"SAVENODES ",8, SAVENODES, 0,
|
// "SAVENODES ",8, SAVENODES(struct _TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD), 0,
|
||||||
"TELRECONFIG ",4, RECONFIGTELNET, 0,
|
"SAVENODES ",8, &SAVENODES, 0,
|
||||||
"SAVEMH ",6, SAVEMHCMD, 0,
|
"TELRECONFIG ",4, &RECONFIGTELNET, 0,
|
||||||
"REBOOT ",6, REBOOT, 0,
|
"SAVEMH ",6, &SAVEMHCMD, 0,
|
||||||
"RIGRECONFIG ",8 , RIGRECONFIG, 0,
|
"REBOOT ",6, &REBOOT, 0,
|
||||||
"RESTART ",7,RESTART,0,
|
"RIGRECONFIG ",8, &RIGRECONFIG, 0,
|
||||||
"RESTARTTNC ",10,RESTARTTNC,0,
|
"RESTART ",7, &RESTART,0,
|
||||||
"SENDNODES ",8,SENDNODES,0,
|
"RESTARTTNC ",10,&RESTARTTNC,0,
|
||||||
|
"SENDNODES ",8, &SENDNODES,0,
|
||||||
"EXTRESTART ",10, EXTPORTVAL, offsetof(EXTPORTDATA, EXTRESTART),
|
"EXTRESTART ",10, EXTPORTVAL, offsetof(EXTPORTDATA, EXTRESTART),
|
||||||
"TXDELAY ",3, PORTVAL, offsetof(PORTCONTROLX, PORTTXDELAY),
|
"TXDELAY ",3, PORTVAL, offsetof(PORTCONTROLX, PORTTXDELAY),
|
||||||
"MAXFRAME ",3, PORTVAL, offsetof(PORTCONTROLX, PORTWINDOW),
|
"MAXFRAME ",3, PORTVAL, offsetof(PORTCONTROLX, PORTWINDOW),
|
||||||
|
@ -4457,9 +4462,9 @@ CMDX COMMANDS[] =
|
||||||
"..FLMSG ",7,FLMSG,0
|
"..FLMSG ",7,FLMSG,0
|
||||||
};
|
};
|
||||||
|
|
||||||
CMDX * CMD = NULL;
|
struct CMDX * CMD = NULL;
|
||||||
|
|
||||||
int NUMBEROFCOMMANDS = sizeof(COMMANDS)/sizeof(CMDX);
|
int NUMBEROFCOMMANDS = sizeof(COMMANDS)/sizeof(struct CMDX);
|
||||||
|
|
||||||
char * ReplyPointer; // Pointer into reply buffer
|
char * ReplyPointer; // Pointer into reply buffer
|
||||||
|
|
||||||
|
@ -4952,7 +4957,7 @@ VOID StatsTimer()
|
||||||
int x = 17;
|
int x = 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PORT->PORTTXROUTINE == KISSTX && (KISS->QtSMStats || KISS->FIRSTPORT->PORT.QtSMPort)) // KISS Port QtSM Stats
|
if ((void *)PORT->PORTTXROUTINE == (void *)KISSTX && (KISS->QtSMStats || KISS->FIRSTPORT->PORT.QtSMPort)) // KISS Port QtSM Stats
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4990,7 +4995,7 @@ extern struct AXIPPORTINFO * Portlist[];
|
||||||
#define TCPConnected 4
|
#define TCPConnected 4
|
||||||
|
|
||||||
|
|
||||||
VOID AXRESOLVER(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID AXRESOLVER(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// DISPLAY AXIP Resolver info
|
// DISPLAY AXIP Resolver info
|
||||||
|
|
||||||
|
@ -5080,7 +5085,7 @@ VOID AXRESOLVER(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID AXMHEARD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID AXMHEARD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// DISPLAY AXIP Mheard info
|
// DISPLAY AXIP Mheard info
|
||||||
|
|
||||||
|
@ -5150,7 +5155,7 @@ extern char WL2KLoc[7];
|
||||||
BOOL GetWL2KSYSOPInfo(char * Call, char * _REPLYBUFFER);
|
BOOL GetWL2KSYSOPInfo(char * Call, char * _REPLYBUFFER);
|
||||||
BOOL UpdateWL2KSYSOPInfo(char * Call, char * SQL);
|
BOOL UpdateWL2KSYSOPInfo(char * Call, char * SQL);
|
||||||
|
|
||||||
VOID WL2KSYSOP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID WL2KSYSOP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char _REPLYBUFFER[1000] = "";
|
char _REPLYBUFFER[1000] = "";
|
||||||
|
|
||||||
|
@ -5302,7 +5307,7 @@ VOID WL2KSYSOP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
|
|
||||||
VOID CloseKISSPort(struct PORTCONTROL * PortVector);
|
VOID CloseKISSPort(struct PORTCONTROL * PortVector);
|
||||||
|
|
||||||
VOID STOPCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID STOPCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char _REPLYBUFFER[1000] = "";
|
char _REPLYBUFFER[1000] = "";
|
||||||
char * ptr, * Context;
|
char * ptr, * Context;
|
||||||
|
@ -5363,7 +5368,7 @@ VOID STOPCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STARTCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID STARTCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char _REPLYBUFFER[1000] = "";
|
char _REPLYBUFFER[1000] = "";
|
||||||
char * ptr, * Context;
|
char * ptr, * Context;
|
||||||
|
@ -5423,7 +5428,7 @@ VOID STARTCMS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STOPPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID STOPPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char _REPLYBUFFER[1000] = "";
|
char _REPLYBUFFER[1000] = "";
|
||||||
char * ptr, * Context;
|
char * ptr, * Context;
|
||||||
|
@ -5507,7 +5512,7 @@ VOID STOPPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID STARTPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID STARTPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char _REPLYBUFFER[1000] = "";
|
char _REPLYBUFFER[1000] = "";
|
||||||
char * ptr, * Context;
|
char * ptr, * Context;
|
||||||
|
@ -5599,7 +5604,7 @@ VOID STARTPORT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
int ASYSEND(struct PORTCONTROL * PortVector, char * buffer, int count);
|
int ASYSEND(struct PORTCONTROL * PortVector, char * buffer, int count);
|
||||||
int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len);
|
int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len);
|
||||||
|
|
||||||
VOID KISSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID KISSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char _REPLYBUFFER[1000] = "";
|
char _REPLYBUFFER[1000] = "";
|
||||||
char * ptr, * Context;
|
char * ptr, * Context;
|
||||||
|
@ -5690,7 +5695,7 @@ VOID KISSCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID FINDBUFFS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID FINDBUFFS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
FindLostBuffers();
|
FindLostBuffers();
|
||||||
|
|
||||||
|
@ -5702,7 +5707,7 @@ VOID FINDBUFFS(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID FLMSG(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * UserCMD)
|
VOID FLMSG(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * UserCMD)
|
||||||
{
|
{
|
||||||
// Telnet Connection from FLMSG
|
// Telnet Connection from FLMSG
|
||||||
CLOSECURRENTSESSION(Session); // Kills any crosslink, plus local link
|
CLOSECURRENTSESSION(Session); // Kills any crosslink, plus local link
|
||||||
|
@ -5725,7 +5730,7 @@ BOOL CheckExcludeList(UCHAR * Call)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ListExcludedCalls(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
void ListExcludedCalls(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
|
|
||||||
UCHAR * ptr = ExcludeList;
|
UCHAR * ptr = ExcludeList;
|
||||||
|
@ -5774,7 +5779,7 @@ BOOL isSYSOP(TRANSPORTENTRY * Session, char * Bufferptr)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID HELPCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID HELPCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
int FileSize;
|
int FileSize;
|
||||||
char MsgFile[MAX_PATH];
|
char MsgFile[MAX_PATH];
|
||||||
|
@ -5863,7 +5868,7 @@ int UZ7HOSetModem(int port, struct TNCINFO * TNC, struct AGWINFO * AGW, PDATAMES
|
||||||
int UZ7HOSetFlags(int port, struct TNCINFO * TNC, struct AGWINFO * AGW, PDATAMESSAGE buff, PMSGWITHLEN buffptr);
|
int UZ7HOSetFlags(int port, struct TNCINFO * TNC, struct AGWINFO * AGW, PDATAMESSAGE buff, PMSGWITHLEN buffptr);
|
||||||
|
|
||||||
|
|
||||||
VOID UZ7HOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID UZ7HOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char * Cmd;
|
char * Cmd;
|
||||||
int port;
|
int port;
|
||||||
|
@ -5934,7 +5939,7 @@ VOID UZ7HOCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID QTSMCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID QTSMCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
int port;
|
int port;
|
||||||
struct PORTCONTROL * PORT;
|
struct PORTCONTROL * PORT;
|
||||||
|
@ -5946,7 +5951,7 @@ VOID QTSMCMD(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
|
|
||||||
PORT = GetPortTableEntryFromPortNum(port);
|
PORT = GetPortTableEntryFromPortNum(port);
|
||||||
|
|
||||||
if (PORT == NULL || PORT->PORTTXROUTINE != KISSTX) // Must be a kiss like port
|
if (PORT == NULL || (void *)PORT->PORTTXROUTINE != (void *)KISSTX) // Must be a kiss like port
|
||||||
{
|
{
|
||||||
Bufferptr = Cmdprintf(Session, Bufferptr, "Error - Port %d is not a KISS port\r", port);
|
Bufferptr = Cmdprintf(Session, Bufferptr, "Error - Port %d is not a KISS port\r", port);
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
|
|
45
CommonCode.c
45
CommonCode.c
|
@ -571,7 +571,7 @@ void * zalloc(int len)
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
char * strlop(char * buf, char delim)
|
char * strlop(const char * buf, char delim)
|
||||||
{
|
{
|
||||||
// Terminate buf at delim, and return rest of string
|
// Terminate buf at delim, and return rest of string
|
||||||
|
|
||||||
|
@ -692,7 +692,7 @@ VOID DISPLAYCIRCUIT(TRANSPORTENTRY * L4, char * Buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CheckForDetach(struct TNCINFO * TNC, int Stream, struct STREAMINFO * STREAM,
|
VOID CheckForDetach(struct TNCINFO * TNC, int Stream, struct STREAMINFO * STREAM,
|
||||||
VOID TidyCloseProc(), VOID ForcedCloseProc(), VOID CloseComplete())
|
VOID TidyCloseProc(struct TNCINFO * TNC, int Stream), VOID ForcedCloseProc(struct TNCINFO * TNC, int Stream), VOID CloseComplete(struct TNCINFO * TNC, int Stream))
|
||||||
{
|
{
|
||||||
void ** buffptr;
|
void ** buffptr;
|
||||||
|
|
||||||
|
@ -1020,7 +1020,7 @@ BOOL ProcessIncommingConnectEx(struct TNCINFO * TNC, char * Call, int Stream, BO
|
||||||
char * Config;
|
char * Config;
|
||||||
static char * ptr1, * ptr2;
|
static char * ptr1, * ptr2;
|
||||||
|
|
||||||
BOOL ReadConfigFile(int Port, int ProcLine())
|
BOOL ReadConfigFile(int Port, int ProcLine(char * buf, int Port))
|
||||||
{
|
{
|
||||||
char buf[256],errbuf[256];
|
char buf[256],errbuf[256];
|
||||||
|
|
||||||
|
@ -2437,7 +2437,7 @@ static struct speed_struct
|
||||||
HANDLE OpenCOMPort(VOID * pPort, int speed, BOOL SetDTR, BOOL SetRTS, BOOL Quiet, int Stopbits)
|
HANDLE OpenCOMPort(VOID * pPort, int speed, BOOL SetDTR, BOOL SetRTS, BOOL Quiet, int Stopbits)
|
||||||
{
|
{
|
||||||
char Port[256];
|
char Port[256];
|
||||||
char buf[100];
|
char buf[512];
|
||||||
|
|
||||||
// Linux Version.
|
// Linux Version.
|
||||||
|
|
||||||
|
@ -4759,7 +4759,7 @@ LRESULT CALLBACK UIWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam
|
||||||
extern struct DATAMESSAGE * REPLYBUFFER;
|
extern struct DATAMESSAGE * REPLYBUFFER;
|
||||||
char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char * format, ...);
|
char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char * format, ...);
|
||||||
|
|
||||||
void GetPortCTEXT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
void GetPortCTEXT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
char FN[250];
|
char FN[250];
|
||||||
FILE *hFile;
|
FILE *hFile;
|
||||||
|
@ -4912,7 +4912,7 @@ SOCKET OpenHTTPSock(char * Host)
|
||||||
{
|
{
|
||||||
err = WSAGetLastError();
|
err = WSAGetLastError();
|
||||||
|
|
||||||
Debugprintf("Resolve Failed for %s %d %x", "api.winlink.org", err, err);
|
Debugprintf("Resolve Failed for %s %d %x", Host, err, err);
|
||||||
return 0 ; // Resolve failed
|
return 0 ; // Resolve failed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4945,7 +4945,7 @@ SOCKET OpenHTTPSock(char * Host)
|
||||||
}
|
}
|
||||||
|
|
||||||
static char HeaderTemplate[] = "POST %s HTTP/1.1\r\n"
|
static char HeaderTemplate[] = "POST %s HTTP/1.1\r\n"
|
||||||
"Accept: application/json\r\n"
|
"Accept: app N B lication/json\r\n"
|
||||||
// "Accept-Encoding: gzip,deflate,gzip, deflate\r\n"
|
// "Accept-Encoding: gzip,deflate,gzip, deflate\r\n"
|
||||||
"Content-Type: application/json\r\n"
|
"Content-Type: application/json\r\n"
|
||||||
"Host: %s:%d\r\n"
|
"Host: %s:%d\r\n"
|
||||||
|
@ -4955,14 +4955,24 @@ static char HeaderTemplate[] = "POST %s HTTP/1.1\r\n"
|
||||||
"\r\n";
|
"\r\n";
|
||||||
|
|
||||||
|
|
||||||
VOID SendWebRequest(SOCKET sock, char * Host, char * Request, char * Params, int Len, char * Return)
|
DllExport VOID WINAPI SendWebRequest(char * Host, char * Request, char * Params, char * Return)
|
||||||
{
|
{
|
||||||
|
SOCKET sock;
|
||||||
int InputLen = 0;
|
int InputLen = 0;
|
||||||
int inptr = 0;
|
int inptr = 0;
|
||||||
char Buffer[4096];
|
char Buffer[4096];
|
||||||
char Header[256];
|
char Header[256];
|
||||||
char * ptr, * ptr1;
|
char * ptr, * ptr1;
|
||||||
int Sent;
|
int Sent;
|
||||||
|
int Len = strlen(Params);
|
||||||
|
|
||||||
|
if (M0LTEMap == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
sock = OpenHTTPSock(Host);
|
||||||
|
|
||||||
|
if (sock == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef LINBPQ
|
#ifdef LINBPQ
|
||||||
sprintf(Header, HeaderTemplate, Request, Host, 80, Len, "linbpq/", VersionString, Params);
|
sprintf(Header, HeaderTemplate, Request, Host, 80, Len, "linbpq/", VersionString, Params);
|
||||||
|
@ -4976,6 +4986,7 @@ VOID SendWebRequest(SOCKET sock, char * Host, char * Request, char * Params, int
|
||||||
{
|
{
|
||||||
int Err = WSAGetLastError();
|
int Err = WSAGetLastError();
|
||||||
Debugprintf("Error %d from Web Update send()", Err);
|
Debugprintf("Error %d from Web Update send()", Err);
|
||||||
|
closesocket(sock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4987,12 +4998,10 @@ VOID SendWebRequest(SOCKET sock, char * Host, char * Request, char * Params, int
|
||||||
{
|
{
|
||||||
int Err = WSAGetLastError();
|
int Err = WSAGetLastError();
|
||||||
Debugprintf("Error %d from Web Update recv()", Err);
|
Debugprintf("Error %d from Web Update recv()", Err);
|
||||||
|
closesocket(sock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// As we are using a persistant connection, can't look for close. Check
|
|
||||||
// for complete message
|
|
||||||
|
|
||||||
inptr += InputLen;
|
inptr += InputLen;
|
||||||
|
|
||||||
Buffer[inptr] = 0;
|
Buffer[inptr] = 0;
|
||||||
|
@ -5031,10 +5040,9 @@ VOID SendWebRequest(SOCKET sock, char * Host, char * Request, char * Params, int
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strlop(Buffer, 13);
|
strlop(Buffer, 13);
|
||||||
Debugprintf("Map Update Params - %s", Params);
|
|
||||||
|
|
||||||
Debugprintf("Map Update failed - %s", Buffer);
|
Debugprintf("Map Update failed - %s", Buffer);
|
||||||
}
|
}
|
||||||
|
closesocket(sock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5046,6 +5054,7 @@ VOID SendWebRequest(SOCKET sock, char * Host, char * Request, char * Params, int
|
||||||
{
|
{
|
||||||
// Just accept anything until I've sorted things with Lee
|
// Just accept anything until I've sorted things with Lee
|
||||||
Debugprintf("%s", ptr1);
|
Debugprintf("%s", ptr1);
|
||||||
|
closesocket(sock);
|
||||||
Debugprintf("Web Database update ok");
|
Debugprintf("Web Database update ok");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5584,19 +5593,11 @@ void SendDataToPktMap(char *Msg)
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
// "contact": "string",
|
// "contact": "string",
|
||||||
// "neighbours": [{"node": "G7TAJ","port": "30"}]
|
// "neighbours": [{"node": "G7TAJ","port": "30"}]
|
||||||
|
|
||||||
sock = OpenHTTPSock("packetnodes.spots.radio");
|
SendWebRequest("packetnodes.spots.radio", Request, Params, Return);
|
||||||
|
|
||||||
if (sock == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
SendWebRequest(sock, "packetnodes.spots.radio", Request, Params, strlen(Params), Return);
|
|
||||||
closesocket(sock);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ="{\"neighbours\": [{\"node\": \"G7TAJ\",\"port\": \"30\"}]}";
|
// ="{\"neighbours\": [{\"node\": \"G7TAJ\",\"port\": \"30\"}]}";
|
||||||
|
|
4
DRATS.c
4
DRATS.c
|
@ -168,7 +168,7 @@ int AllocateDRATSStream(struct DRATSSession * Sess)
|
||||||
|
|
||||||
if (Stream == 255) return 0;
|
if (Stream == 255) return 0;
|
||||||
|
|
||||||
if (memcmp(Sess->CallTo, "NODE", 6) == 0)
|
if (memcmp(Sess->CallTo, "NODE", 4) == 0)
|
||||||
{
|
{
|
||||||
// Just connect to command level on switch
|
// Just connect to command level on switch
|
||||||
}
|
}
|
||||||
|
@ -563,7 +563,7 @@ void DRATSConnectionLost(struct ConnectionInfo * sockptr)
|
||||||
#define ZEXPORT __stdcall
|
#define ZEXPORT __stdcall
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "zlib.h"
|
#include <zlib.h>
|
||||||
|
|
||||||
|
|
||||||
int doinflate(unsigned char * source, unsigned char * dest, int Len, int destlen, int * outLen)
|
int doinflate(unsigned char * source, unsigned char * dest, int Len, int destlen, int * outLen)
|
||||||
|
|
|
@ -24,7 +24,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
#include "bpqmail.h"
|
#include "bpqmail.h"
|
||||||
|
|
||||||
int32_t Encode(char * in, char * out, int32_t inlen, BOOL B1Protocol, int Compress);
|
int32_t Encode(char * in, char * out, int32_t inlen, BOOL B1Protocol, int Compress);
|
||||||
|
void MQTTMessageEvent(void* message);
|
||||||
|
|
||||||
int MaxRXSize = 99999;
|
int MaxRXSize = 99999;
|
||||||
int MaxTXSize = 99999;
|
int MaxTXSize = 99999;
|
||||||
|
@ -807,6 +807,11 @@ VOID FlagSentMessages(CIRCUIT * conn, struct UserInfo * user)
|
||||||
FBBHeader->FwdMsg->datechanged=time(NULL);
|
FBBHeader->FwdMsg->datechanged=time(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(FBBHeader->FwdMsg);
|
||||||
|
#endif
|
||||||
|
|
||||||
FBBHeader->FwdMsg->Locked = 0; // Unlock
|
FBBHeader->FwdMsg->Locked = 0; // Unlock
|
||||||
conn->UserPointer->ForwardingInfo->MsgCount--;
|
conn->UserPointer->ForwardingInfo->MsgCount--;
|
||||||
}
|
}
|
||||||
|
|
38
FLDigi.c
38
FLDigi.c
|
@ -65,12 +65,12 @@ extern int (WINAPI FAR *GetModuleFileNameExPtr)();
|
||||||
;
|
;
|
||||||
int SemHeldByAPI;
|
int SemHeldByAPI;
|
||||||
|
|
||||||
static void ConnecttoFLDigiThread(void * portptr);
|
void ConnecttoFLDigiThread(void * portptr);
|
||||||
|
|
||||||
void CreateMHWindow();
|
void CreateMHWindow();
|
||||||
int Update_MH_List(struct in_addr ipad, char * call, char proto);
|
int Update_MH_List(struct in_addr ipad, char * call, char proto);
|
||||||
|
|
||||||
static int ConnecttoFLDigi();
|
int ConnecttoFLDigi(int port);
|
||||||
static int ProcessReceivedData(int bpqport);
|
static int ProcessReceivedData(int bpqport);
|
||||||
static int ProcessLine(char * buf, int Port);
|
static int ProcessLine(char * buf, int Port);
|
||||||
int KillTNC(struct TNCINFO * TNC);
|
int KillTNC(struct TNCINFO * TNC);
|
||||||
|
@ -93,6 +93,7 @@ VOID CheckFLDigiData(struct TNCINFO * TNC);
|
||||||
VOID SendPacket(struct TNCINFO * TNC, UCHAR * Msg, int MsgLen);
|
VOID SendPacket(struct TNCINFO * TNC, UCHAR * Msg, int MsgLen);
|
||||||
int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len);
|
int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len);
|
||||||
VOID SendXMLCommand(struct TNCINFO * TNC, char * Command, char * Value, char ParamType);
|
VOID SendXMLCommand(struct TNCINFO * TNC, char * Command, char * Value, char ParamType);
|
||||||
|
VOID SendXMLCommandInt(struct TNCINFO * TNC, char * Command, int Value, char ParamType);
|
||||||
VOID FLSlowTimer(struct TNCINFO * TNC);
|
VOID FLSlowTimer(struct TNCINFO * TNC);
|
||||||
VOID SendKISSCommand(struct TNCINFO * TNC, char * Msg);
|
VOID SendKISSCommand(struct TNCINFO * TNC, char * Msg);
|
||||||
|
|
||||||
|
@ -101,8 +102,6 @@ VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
||||||
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
||||||
VOID WritetoTrace(struct TNCINFO * TNC, char * Msg, int Len);
|
VOID WritetoTrace(struct TNCINFO * TNC, char * Msg, int Len);
|
||||||
|
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
extern UCHAR BPQDirectory[];
|
extern UCHAR BPQDirectory[];
|
||||||
|
|
||||||
#define MAXMPSKPORTS 16
|
#define MAXMPSKPORTS 16
|
||||||
|
@ -592,7 +591,7 @@ pollloop:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SendXMLCommand(TNC, "modem.set_carrier", (char *)atoi(&buff->L2DATA[5]), 'I');
|
SendXMLCommandInt(TNC, "modem.set_carrier", atoi(&buff->L2DATA[5]), 'I');
|
||||||
}
|
}
|
||||||
|
|
||||||
TNC->InternalCmd = TRUE;
|
TNC->InternalCmd = TRUE;
|
||||||
|
@ -1482,14 +1481,14 @@ static int ProcessLine(char * buf, int Port)
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ConnecttoFLDigi(int port)
|
int ConnecttoFLDigi(int port)
|
||||||
{
|
{
|
||||||
_beginthread(ConnecttoFLDigiThread, 0, (void *)(size_t)port);
|
_beginthread(ConnecttoFLDigiThread, 0, (void *)(size_t)port);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VOID ConnecttoFLDigiThread(void * portptr)
|
VOID ConnecttoFLDigiThread(void * portptr)
|
||||||
{
|
{
|
||||||
int port = (int)(size_t)portptr;
|
int port = (int)(size_t)portptr;
|
||||||
char Msg[255];
|
char Msg[255];
|
||||||
|
@ -2580,7 +2579,7 @@ VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, char Channe
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// Make sure app is available
|
// Make sure app is available
|
||||||
|
@ -3197,7 +3196,7 @@ VOID FLReleaseTNC(struct TNCINFO * TNC)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SendXMLCommand(TNC, "modem.set_by_name", TNC->FLInfo->DefaultMode, 'S');
|
SendXMLCommand(TNC, "modem.set_by_name", TNC->FLInfo->DefaultMode, 'S');
|
||||||
SendXMLCommand(TNC, "modem.set_carrier", (char *)TNC->FLInfo->DefaultFreq, 'I');
|
SendXMLCommandInt(TNC, "modem.set_carrier", TNC->FLInfo->DefaultFreq, 'I');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Start Scanner
|
// Start Scanner
|
||||||
|
@ -3895,6 +3894,27 @@ VOID SendXMLCommand(struct TNCINFO * TNC, char * Command, char * Value, char Par
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID SendXMLCommandInt(struct TNCINFO * TNC, char * Command, int Value, char ParamType)
|
||||||
|
{
|
||||||
|
int Len;
|
||||||
|
char ReqBuf[512];
|
||||||
|
char SendBuff[512];
|
||||||
|
struct FLINFO * FL = TNC->FLInfo;
|
||||||
|
struct ARQINFO * ARQ = TNC->ARQInfo;
|
||||||
|
char ValueString[256] ="";
|
||||||
|
|
||||||
|
if (!TNC->CONNECTED || TNC->FLInfo->KISSMODE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
sprintf(ValueString, "<params><param><value><i4>%d</i4></value></param></params\r\n>", Value);
|
||||||
|
|
||||||
|
strcpy(FL->LastXML, Command);
|
||||||
|
Len = sprintf(ReqBuf, Req, FL->LastXML, ValueString);
|
||||||
|
Len = sprintf(SendBuff, MsgHddr, Len, ReqBuf);
|
||||||
|
send(TNC->TCPSock, SendBuff, Len, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
VOID SendXMLPoll(struct TNCINFO * TNC)
|
VOID SendXMLPoll(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
int Len;
|
int Len;
|
||||||
|
|
49
FreeDATA.c
49
FreeDATA.c
|
@ -347,41 +347,6 @@ loop:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL FreeDataReadConfigFile(int Port, int ProcLine())
|
|
||||||
{
|
|
||||||
char buf[256],errbuf[256];
|
|
||||||
|
|
||||||
Config = PortConfig[Port];
|
|
||||||
|
|
||||||
if (Config)
|
|
||||||
{
|
|
||||||
// Using config from bpq32.cfg
|
|
||||||
|
|
||||||
if (strlen(Config) == 0)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr1 = Config;
|
|
||||||
ptr2 = strchr(ptr1, 13);
|
|
||||||
|
|
||||||
if (!ProcLine(buf, Port))
|
|
||||||
{
|
|
||||||
WritetoConsoleLocal("\n");
|
|
||||||
WritetoConsoleLocal("Bad config record ");
|
|
||||||
WritetoConsoleLocal(errbuf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf(buf," ** Error - No Configuration info in bpq32.cfg");
|
|
||||||
WritetoConsoleLocal(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
||||||
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
||||||
|
@ -867,7 +832,7 @@ static size_t ExtProc(int fn, int port, PDATAMESSAGE buff)
|
||||||
char Message[256];
|
char Message[256];
|
||||||
int Len, ret;
|
int Len, ret;
|
||||||
|
|
||||||
Len = sprintf(Message, TXF);
|
Len = sprintf(Message, "%s", TXF);
|
||||||
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
|
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
|
||||||
|
|
||||||
if (buffptr)
|
if (buffptr)
|
||||||
|
@ -1881,7 +1846,7 @@ VOID FreeDataProcessTNCMessage(struct TNCINFO * TNC, char * Call, unsigned char
|
||||||
if (App < 32)
|
if (App < 32)
|
||||||
{
|
{
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// if SendTandRtoRelay set and Appl is RMS change to RELAY
|
// if SendTandRtoRelay set and Appl is RMS change to RELAY
|
||||||
|
@ -2242,7 +2207,7 @@ VOID FreeDataProcessNewConnect(struct TNCINFO * TNC, char * fromCall, char * toC
|
||||||
if (App < 32)
|
if (App < 32)
|
||||||
{
|
{
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// if SendTandRtoRelay set and Appl is RMS change to RELAY
|
// if SendTandRtoRelay set and Appl is RMS change to RELAY
|
||||||
|
@ -2476,7 +2441,7 @@ static void SendCQ(struct TNCINFO * TNC)
|
||||||
char Message[256];
|
char Message[256];
|
||||||
int Len, ret;
|
int Len, ret;
|
||||||
|
|
||||||
Len = sprintf(Message, CQ);
|
Len = sprintf(Message, "%s", CQ);
|
||||||
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
|
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2491,7 +2456,7 @@ static void SendBeacon(struct TNCINFO * TNC, int Interval)
|
||||||
if (Interval > 0)
|
if (Interval > 0)
|
||||||
Len = sprintf(Message, Template1, Interval);
|
Len = sprintf(Message, Template1, Interval);
|
||||||
else
|
else
|
||||||
Len = sprintf(Message, Template2);
|
Len = sprintf(Message, "%s", Template2);
|
||||||
|
|
||||||
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
|
ret = send(TNC->TCPDataSock, (char *)&Message, Len, 0);
|
||||||
}
|
}
|
||||||
|
@ -3682,7 +3647,7 @@ int FreeDataDisconnect(struct TNCINFO * TNC)
|
||||||
|
|
||||||
// return FreeDataSendCommand(TNC, "D");
|
// return FreeDataSendCommand(TNC, "D");
|
||||||
|
|
||||||
Len = sprintf(Msg, Disconnect);
|
Len = sprintf(Msg, "%s", Disconnect);
|
||||||
|
|
||||||
return send(TNC->TCPDataSock, Msg, Len, 0);
|
return send(TNC->TCPDataSock, Msg, Len, 0);
|
||||||
}
|
}
|
||||||
|
@ -3694,7 +3659,7 @@ int FreeGetData(struct TNCINFO * TNC)
|
||||||
char Msg[128];
|
char Msg[128];
|
||||||
int Len;
|
int Len;
|
||||||
|
|
||||||
Len = sprintf(Msg, GetData);
|
Len = sprintf(Msg, "%s", GetData);
|
||||||
|
|
||||||
return send(TNC->TCPDataSock, Msg, Len, 0);
|
return send(TNC->TCPDataSock, Msg, Len, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -471,7 +471,7 @@ VOID * HALExtInit(EXTPORTDATA * PortEntry)
|
||||||
int port;
|
int port;
|
||||||
char * ptr;
|
char * ptr;
|
||||||
int len;
|
int len;
|
||||||
char Msg[80];
|
char Msg[512];
|
||||||
#ifndef LINBPQ
|
#ifndef LINBPQ
|
||||||
HWND x;
|
HWND x;
|
||||||
#endif
|
#endif
|
||||||
|
@ -548,7 +548,7 @@ VOID * HALExtInit(EXTPORTDATA * PortEntry)
|
||||||
TNC->WebWinX = 510;
|
TNC->WebWinX = 510;
|
||||||
TNC->WebWinY = 280;
|
TNC->WebWinY = 280;
|
||||||
|
|
||||||
TNC->WEB_COMMSSTATE = zalloc(100);
|
TNC->WEB_COMMSSTATE = zalloc(512);
|
||||||
TNC->WEB_TNCSTATE = zalloc(100);
|
TNC->WEB_TNCSTATE = zalloc(100);
|
||||||
strcpy(TNC->WEB_TNCSTATE, "Free");
|
strcpy(TNC->WEB_TNCSTATE, "Free");
|
||||||
TNC->WEB_MODE = zalloc(100);
|
TNC->WEB_MODE = zalloc(100);
|
||||||
|
|
37
HSMODEM.c
37
HSMODEM.c
|
@ -309,47 +309,10 @@ loop:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL HSMODEMReadConfigFile(int Port, int ProcLine())
|
|
||||||
{
|
|
||||||
char buf[256],errbuf[256];
|
|
||||||
|
|
||||||
Config = PortConfig[Port];
|
|
||||||
|
|
||||||
if (Config)
|
|
||||||
{
|
|
||||||
// Using config from bpq32.cfg
|
|
||||||
|
|
||||||
if (strlen(Config) == 0)
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr1 = Config;
|
|
||||||
ptr2 = strchr(ptr1, 13);
|
|
||||||
|
|
||||||
if (!ProcLine(buf, Port))
|
|
||||||
{
|
|
||||||
WritetoConsoleLocal("\n");
|
|
||||||
WritetoConsoleLocal("Bad config record ");
|
|
||||||
WritetoConsoleLocal(errbuf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf(buf," ** Error - No Configuration info in bpq32.cfg");
|
|
||||||
WritetoConsoleLocal(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
||||||
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
||||||
VOID WritetoTrace(struct TNCINFO * TNC, char * Msg, int Len);
|
VOID WritetoTrace(struct TNCINFO * TNC, char * Msg, int Len);
|
||||||
|
|
||||||
|
|
||||||
static time_t ltime;
|
static time_t ltime;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
#define ZEXPORT __stdcall
|
#define ZEXPORT __stdcall
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "zlib.h"
|
#include <zlib.h>
|
||||||
|
|
||||||
#define CKernel
|
#define CKernel
|
||||||
#include "httpconnectioninfo.h"
|
#include "httpconnectioninfo.h"
|
||||||
|
@ -102,7 +102,6 @@ extern int NumberofPorts;
|
||||||
|
|
||||||
extern UCHAR ConfigDirectory[260];
|
extern UCHAR ConfigDirectory[260];
|
||||||
|
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
VOID sendandcheck(SOCKET sock, const char * Buffer, int Len);
|
VOID sendandcheck(SOCKET sock, const char * Buffer, int Len);
|
||||||
int CompareNode(const void *a, const void *b);
|
int CompareNode(const void *a, const void *b);
|
||||||
int CompareAlias(const void *a, const void *b);
|
int CompareAlias(const void *a, const void *b);
|
||||||
|
|
|
@ -1186,7 +1186,7 @@ static BOOL CheckforDups(ChatCIRCUIT * circuit, char * Call, char * Msg)
|
||||||
// Duplicate, so discard, but save time
|
// Duplicate, so discard, but save time
|
||||||
|
|
||||||
DupInfo[i].DupTime = Now;
|
DupInfo[i].DupTime = Now;
|
||||||
Logprintf(LOG_CHAT, circuit, '?', "Duplicate Message From %s %s supressed", Call, Msg);
|
Logprintf(LOG_CHAT, circuit, '?', "Duplicate Message From %s %s suppressed", Call, Msg);
|
||||||
|
|
||||||
return TRUE; // Duplicate
|
return TRUE; // Duplicate
|
||||||
}
|
}
|
||||||
|
|
16
IPCode.c
16
IPCode.c
|
@ -95,9 +95,13 @@ TODo ?Multiple Adapters
|
||||||
#pragma comment(lib, "IPHLPAPI.lib")
|
#pragma comment(lib, "IPHLPAPI.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "pcap.h"
|
#include <pcap.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
int pcap_sendpacket(pcap_t *p, u_char *buf, int size);
|
int pcap_sendpacket(pcap_t *p, u_char *buf, int size);
|
||||||
|
#else
|
||||||
|
PCAP_API int pcap_sendpacket(pcap_t *, const u_char *, int);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef LINBPQ
|
#ifndef LINBPQ
|
||||||
#include "kernelresource.h"
|
#include "kernelresource.h"
|
||||||
|
@ -4731,7 +4735,7 @@ void OpenTAP()
|
||||||
extern struct DATAMESSAGE * REPLYBUFFER;
|
extern struct DATAMESSAGE * REPLYBUFFER;
|
||||||
char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char * format, ...);
|
char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char * format, ...);
|
||||||
|
|
||||||
VOID PING(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID PING(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// Send ICMP Echo Request
|
// Send ICMP Echo Request
|
||||||
|
|
||||||
|
@ -4789,7 +4793,7 @@ VOID PING(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SHOWARP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SHOWARP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// DISPLAY IP Gateway ARP status or Clear
|
// DISPLAY IP Gateway ARP status or Clear
|
||||||
|
|
||||||
|
@ -4884,7 +4888,7 @@ VOID SHOWARP(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX *
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SHOWNAT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SHOWNAT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// DISPLAY IP Gateway ARP status or Clear
|
// DISPLAY IP Gateway ARP status or Clear
|
||||||
|
|
||||||
|
@ -4943,7 +4947,7 @@ int CountBits(uint32_t in)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SHOWIPROUTE(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SHOWIPROUTE(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// DISPLAY IP Gateway ARP status or Clear
|
// DISPLAY IP Gateway ARP status or Clear
|
||||||
|
|
||||||
|
@ -5334,7 +5338,7 @@ int ProcessSNMPPayload(UCHAR * Msg, int Len, UCHAR * Reply, int * OffPtr)
|
||||||
// Should be nothing left
|
// Should be nothing left
|
||||||
}
|
}
|
||||||
|
|
||||||
if (RequestType = 160)
|
if (RequestType == 160)
|
||||||
{
|
{
|
||||||
int Offset = 255;
|
int Offset = 255;
|
||||||
int PDULen = 0;
|
int PDULen = 0;
|
||||||
|
|
2
KISSHF.c
2
KISSHF.c
|
@ -725,7 +725,7 @@ VOID KISSHFReleaseTNC(struct TNCINFO * TNC)
|
||||||
ReleaseOtherPorts(TNC);
|
ReleaseOtherPorts(TNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID KISSHFSuspendPort(struct TNCINFO * TNC, struct TNCINFO * ThisTNC)
|
VOID KISSHFSuspendPort(struct TNCINFO * TNC, struct TNCINFO * THISTNC)
|
||||||
{
|
{
|
||||||
TNC->PortRecord->PORTCONTROL.PortSuspended = 1;
|
TNC->PortRecord->PORTCONTROL.PortSuspended = 1;
|
||||||
strcpy(TNC->WEB_TNCSTATE, "Interlocked");
|
strcpy(TNC->WEB_TNCSTATE, "Interlocked");
|
||||||
|
|
9
L2Code.c
9
L2Code.c
|
@ -47,8 +47,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
#define THREESECS 3*3
|
#define THREESECS 3*3
|
||||||
|
|
||||||
|
|
||||||
VOID L2SENDCOMMAND();
|
VOID L2Routine(struct PORTCONTROL * PORT, PMESSAGE Buffer);
|
||||||
VOID L2ROUTINE();
|
|
||||||
MESSAGE * SETUPL2MESSAGE(struct _LINKTABLE * LINK, UCHAR CMD);
|
MESSAGE * SETUPL2MESSAGE(struct _LINKTABLE * LINK, UCHAR CMD);
|
||||||
VOID SendSupervisCmd(struct _LINKTABLE * LINK);
|
VOID SendSupervisCmd(struct _LINKTABLE * LINK);
|
||||||
void SEND_RR_RESP(struct _LINKTABLE * LINK, UCHAR PF);
|
void SEND_RR_RESP(struct _LINKTABLE * LINK, UCHAR PF);
|
||||||
|
@ -3098,7 +3097,7 @@ VOID ACKMSG(struct _LINKTABLE * LINK)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CONNECTFAILED();
|
VOID CONNECTFAILED(struct _LINKTABLE * LINK);
|
||||||
|
|
||||||
VOID L2TIMEOUT(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT)
|
VOID L2TIMEOUT(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT)
|
||||||
{
|
{
|
||||||
|
@ -3599,7 +3598,7 @@ VOID CONNECTREFUSED(struct _LINKTABLE * LINK)
|
||||||
ConnectFailedOrRefused(LINK, "Busy from");
|
ConnectFailedOrRefused(LINK, "Busy from");
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID L3CONNECTFAILED();
|
VOID L3CONNECTFAILED(struct _LINKTABLE * LINK);
|
||||||
|
|
||||||
VOID ConnectFailedOrRefused(struct _LINKTABLE * LINK, char * Msg)
|
VOID ConnectFailedOrRefused(struct _LINKTABLE * LINK, char * Msg)
|
||||||
{
|
{
|
||||||
|
@ -4135,7 +4134,7 @@ int seeifUnlockneeded(struct _LINKTABLE * LINK)
|
||||||
if (TNC)
|
if (TNC)
|
||||||
if (Interlock == TNC->RXRadio || Interlock == TNC->TXRadio) // Same Group
|
if (Interlock == TNC->RXRadio || Interlock == TNC->TXRadio) // Same Group
|
||||||
if (TNC->ReleasePortProc && TNC->PortRecord->PORTCONTROL.PortSuspended == TRUE)
|
if (TNC->ReleasePortProc && TNC->PortRecord->PORTCONTROL.PortSuspended == TRUE)
|
||||||
TNC->ReleasePortProc(TNC, TNC);
|
TNC->ReleasePortProc(TNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
2
L4Code.c
2
L4Code.c
|
@ -56,7 +56,7 @@ VOID L3SWAPADDRESSES(L3MESSAGEBUFFER * L3MSG);
|
||||||
VOID L4TIMEOUT(TRANSPORTENTRY * L4);
|
VOID L4TIMEOUT(TRANSPORTENTRY * L4);
|
||||||
struct DEST_LIST * CHECKL3TABLES(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * Msg);
|
struct DEST_LIST * CHECKL3TABLES(struct _LINKTABLE * LINK, L3MESSAGEBUFFER * Msg);
|
||||||
int CHECKIFBUSYL4(TRANSPORTENTRY * L4);
|
int CHECKIFBUSYL4(TRANSPORTENTRY * L4);
|
||||||
VOID AUTOTIMER();
|
VOID AUTOTIMER(TRANSPORTENTRY * L4);
|
||||||
VOID NRRecordRoute(UCHAR * Buff, int Len);
|
VOID NRRecordRoute(UCHAR * Buff, int Len);
|
||||||
VOID REFRESHROUTE(TRANSPORTENTRY * Session);
|
VOID REFRESHROUTE(TRANSPORTENTRY * Session);
|
||||||
VOID ACKFRAMES(L3MESSAGEBUFFER * L3MSG, TRANSPORTENTRY * L4, int NR);
|
VOID ACKFRAMES(L3MESSAGEBUFFER * L3MSG, TRANSPORTENTRY * L4, int NR);
|
||||||
|
|
18
LinBPQ.c
18
LinBPQ.c
|
@ -76,6 +76,7 @@ void SaveAIS();
|
||||||
void initAIS();
|
void initAIS();
|
||||||
void DRATSPoll();
|
void DRATSPoll();
|
||||||
VOID GetPGConfig();
|
VOID GetPGConfig();
|
||||||
|
void SendBBSDataToPktMap();
|
||||||
|
|
||||||
extern uint64_t timeLoadedMS;
|
extern uint64_t timeLoadedMS;
|
||||||
|
|
||||||
|
@ -666,7 +667,7 @@ void ConTermPoll()
|
||||||
|
|
||||||
// Replace CR with CRLF
|
// Replace CR with CRLF
|
||||||
|
|
||||||
printf(ptr);
|
printf("%s", ptr);
|
||||||
|
|
||||||
if (ptr2)
|
if (ptr2)
|
||||||
printf("\r\n");
|
printf("\r\n");
|
||||||
|
@ -716,7 +717,7 @@ void ConTermPoll()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "getopt.h"
|
#include <getopt.h>
|
||||||
|
|
||||||
static struct option long_options[] =
|
static struct option long_options[] =
|
||||||
{
|
{
|
||||||
|
@ -815,7 +816,7 @@ int main(int argc, char * argv[])
|
||||||
{
|
{
|
||||||
case 'h':
|
case 'h':
|
||||||
|
|
||||||
printf(HelpScreen);
|
printf("%s", HelpScreen);
|
||||||
exit (0);
|
exit (0);
|
||||||
|
|
||||||
case 'l':
|
case 'l':
|
||||||
|
@ -1281,6 +1282,10 @@ int main(int argc, char * argv[])
|
||||||
printf("Mail Started\n");
|
printf("Mail Started\n");
|
||||||
Logprintf(LOG_BBS, NULL, '!', "Mail Starting");
|
Logprintf(LOG_BBS, NULL, '!', "Mail Starting");
|
||||||
|
|
||||||
|
APIClock = 0;
|
||||||
|
|
||||||
|
SendBBSDataToPktMap();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1579,6 +1584,13 @@ int main(int argc, char * argv[])
|
||||||
DoHouseKeeping(FALSE);
|
DoHouseKeeping(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (APIClock < NOW)
|
||||||
|
{
|
||||||
|
SendBBSDataToPktMap();
|
||||||
|
APIClock = NOW + 7200; // Every 2 hours
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
tm = gmtime(&NOW);
|
tm = gmtime(&NOW);
|
||||||
|
|
||||||
if (tm->tm_wday == 0) // Sunday
|
if (tm->tm_wday == 0) // Sunday
|
||||||
|
|
|
@ -24,6 +24,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
#include "bpqmail.h"
|
#include "bpqmail.h"
|
||||||
|
|
||||||
void SendMessageReadEvent(char * call, struct MsgInfo * Msg);
|
void SendMessageReadEvent(char * call, struct MsgInfo * Msg);
|
||||||
|
void MQTTMessageEvent(void* message);
|
||||||
|
|
||||||
|
|
||||||
VOID ProcessMBLLine(CIRCUIT * conn, struct UserInfo * user, UCHAR* Buffer, int len)
|
VOID ProcessMBLLine(CIRCUIT * conn, struct UserInfo * user, UCHAR* Buffer, int len)
|
||||||
|
@ -199,6 +200,12 @@ VOID ProcessMBLLine(CIRCUIT * conn, struct UserInfo * user, UCHAR* Buffer, int l
|
||||||
}
|
}
|
||||||
|
|
||||||
conn->FwdMsg->Locked = 0; // Unlock
|
conn->FwdMsg->Locked = 0; // Unlock
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(conn->FwdMsg);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -282,7 +289,7 @@ VOID ProcessMBLLine(CIRCUIT * conn, struct UserInfo * user, UCHAR* Buffer, int l
|
||||||
{
|
{
|
||||||
// Reverse forward request
|
// Reverse forward request
|
||||||
|
|
||||||
// If we have just sent a nessage, Flag it as sent
|
// If we have just sent a message, Flag it as sent
|
||||||
|
|
||||||
if (conn->FBBMsgsSent)
|
if (conn->FBBMsgsSent)
|
||||||
{
|
{
|
||||||
|
@ -300,6 +307,11 @@ VOID ProcessMBLLine(CIRCUIT * conn, struct UserInfo * user, UCHAR* Buffer, int l
|
||||||
|
|
||||||
conn->FwdMsg->Locked = 0; // Unlock
|
conn->FwdMsg->Locked = 0; // Unlock
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(conn->FwdMsg);
|
||||||
|
#endif
|
||||||
|
|
||||||
conn->UserPointer->ForwardingInfo->MsgCount--;
|
conn->UserPointer->ForwardingInfo->MsgCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,6 +366,11 @@ VOID ProcessMBLLine(CIRCUIT * conn, struct UserInfo * user, UCHAR* Buffer, int l
|
||||||
conn->FwdMsg->datechanged=time(NULL);
|
conn->FwdMsg->datechanged=time(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(conn->FwdMsg);
|
||||||
|
#endif
|
||||||
|
|
||||||
conn->UserPointer->ForwardingInfo->MsgCount--;
|
conn->UserPointer->ForwardingInfo->MsgCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2383
MQTTAsync.h
2383
MQTTAsync.h
File diff suppressed because it is too large
Load Diff
1980
MQTTClient.h
1980
MQTTClient.h
File diff suppressed because it is too large
Load Diff
|
@ -1,277 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2009, 2020 IBM Corp.
|
|
||||||
*
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v2.0
|
|
||||||
* and Eclipse Distribution License v1.0 which accompany this distribution.
|
|
||||||
*
|
|
||||||
* The Eclipse Public License is available at
|
|
||||||
* https://www.eclipse.org/legal/epl-2.0/
|
|
||||||
* and the Eclipse Distribution License is available at
|
|
||||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Ian Craggs - initial API and implementation and/or initial documentation
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
* \brief This structure represents a persistent data store, used to store
|
|
||||||
* outbound and inbound messages, in order to achieve reliable messaging.
|
|
||||||
*
|
|
||||||
* The MQTT Client persists QoS1 and QoS2 messages in order to meet the
|
|
||||||
* assurances of delivery associated with these @ref qos levels. The messages
|
|
||||||
* are saved in persistent storage
|
|
||||||
* The type and context of the persistence implementation are specified when
|
|
||||||
* the MQTT client is created (see MQTTClient_create()). The default
|
|
||||||
* persistence type (::MQTTCLIENT_PERSISTENCE_DEFAULT) uses a file system-based
|
|
||||||
* persistence mechanism. The <i>persistence_context</i> argument passed to
|
|
||||||
* MQTTClient_create() when using the default peristence is a string
|
|
||||||
* representing the location of the persistence directory. If the context
|
|
||||||
* argument is NULL, the working directory will be used.
|
|
||||||
*
|
|
||||||
* To use memory-based persistence, an application passes
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_NONE as the <i>persistence_type</i> to
|
|
||||||
* MQTTClient_create(). This can lead to message loss in certain situations,
|
|
||||||
* but can be appropriate in some cases (see @ref qos).
|
|
||||||
*
|
|
||||||
* Client applications can provide their own persistence mechanism by passing
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_USER as the <i>persistence_type</i>. To implement a
|
|
||||||
* custom persistence mechanism, the application must pass an initialized
|
|
||||||
* ::MQTTClient_persistence structure as the <i>persistence_context</i>
|
|
||||||
* argument to MQTTClient_create().
|
|
||||||
*
|
|
||||||
* If the functions defined return an ::MQTTCLIENT_PERSISTENCE_ERROR then the
|
|
||||||
* state of the persisted data should remain as it was prior to the function
|
|
||||||
* being called. For example, if Persistence_put() returns
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR, then it is assumed tha tthe persistent store
|
|
||||||
* does not contain the data that was passed to the function. Similarly, if
|
|
||||||
* Persistence_remove() returns ::MQTTCLIENT_PERSISTENCE_ERROR then it is
|
|
||||||
* assumed that the data to be removed is still held in the persistent store.
|
|
||||||
*
|
|
||||||
* It is up to the persistence implementation to log any error information that
|
|
||||||
* may be required to diagnose a persistence mechanism failure.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
/// @cond EXCLUDE
|
|
||||||
*/
|
|
||||||
#if !defined(MQTTCLIENTPERSISTENCE_H)
|
|
||||||
#define MQTTCLIENTPERSISTENCE_H
|
|
||||||
/*
|
|
||||||
/// @endcond
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This <i>persistence_type</i> value specifies the default file system-based
|
|
||||||
* persistence mechanism (see MQTTClient_create()).
|
|
||||||
*/
|
|
||||||
#define MQTTCLIENT_PERSISTENCE_DEFAULT 0
|
|
||||||
/**
|
|
||||||
* This <i>persistence_type</i> value specifies a memory-based
|
|
||||||
* persistence mechanism (see MQTTClient_create()).
|
|
||||||
*/
|
|
||||||
#define MQTTCLIENT_PERSISTENCE_NONE 1
|
|
||||||
/**
|
|
||||||
* This <i>persistence_type</i> value specifies an application-specific
|
|
||||||
* persistence mechanism (see MQTTClient_create()).
|
|
||||||
*/
|
|
||||||
#define MQTTCLIENT_PERSISTENCE_USER 2
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Application-specific persistence functions must return this error code if
|
|
||||||
* there is a problem executing the function.
|
|
||||||
*/
|
|
||||||
#define MQTTCLIENT_PERSISTENCE_ERROR -2
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Initialize the persistent store.
|
|
||||||
*
|
|
||||||
* Either open the existing persistent store for this client ID or create a new
|
|
||||||
* one if one doesn't exist. If the persistent store is already open, return
|
|
||||||
* without taking any action.
|
|
||||||
*
|
|
||||||
* An application can use the same client identifier to connect to many
|
|
||||||
* different servers. The <i>clientid</i> in conjunction with the
|
|
||||||
* <i>serverURI</i> uniquely identifies the persistence store required.
|
|
||||||
*
|
|
||||||
* @param handle The address of a pointer to a handle for this persistence
|
|
||||||
* implementation. This function must set handle to a valid reference to the
|
|
||||||
* persistence following a successful return.
|
|
||||||
* The handle pointer is passed as an argument to all the other
|
|
||||||
* persistence functions. It may include the context parameter and/or any other
|
|
||||||
* data for use by the persistence functions.
|
|
||||||
* @param clientID The client identifier for which the persistent store should
|
|
||||||
* be opened.
|
|
||||||
* @param serverURI The connection string specified when the MQTT client was
|
|
||||||
* created (see MQTTClient_create()).
|
|
||||||
* @param context A pointer to any data required to initialize the persistent
|
|
||||||
* store (see ::MQTTClient_persistence).
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise return
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR.
|
|
||||||
*/
|
|
||||||
typedef int (*Persistence_open)(void** handle, const char* clientID, const char* serverURI, void* context);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Close the persistent store referred to by the handle.
|
|
||||||
*
|
|
||||||
* @param handle The handle pointer from a successful call to
|
|
||||||
* Persistence_open().
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise return
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR.
|
|
||||||
*/
|
|
||||||
typedef int (*Persistence_close)(void* handle);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Put the specified data into the persistent store.
|
|
||||||
*
|
|
||||||
* @param handle The handle pointer from a successful call to
|
|
||||||
* Persistence_open().
|
|
||||||
* @param key A string used as the key for the data to be put in the store. The
|
|
||||||
* key is later used to retrieve data from the store with Persistence_get().
|
|
||||||
* @param bufcount The number of buffers to write to the persistence store.
|
|
||||||
* @param buffers An array of pointers to the data buffers associated with
|
|
||||||
* this <i>key</i>.
|
|
||||||
* @param buflens An array of lengths of the data buffers. <i>buflen[n]</i>
|
|
||||||
* gives the length of <i>buffer[n]</i>.
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise return
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR.
|
|
||||||
*/
|
|
||||||
typedef int (*Persistence_put)(void* handle, char* key, int bufcount, char* buffers[], int buflens[]);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Retrieve the specified data from the persistent store.
|
|
||||||
*
|
|
||||||
* @param handle The handle pointer from a successful call to
|
|
||||||
* Persistence_open().
|
|
||||||
* @param key A string that is the key for the data to be retrieved. This is
|
|
||||||
* the same key used to save the data to the store with Persistence_put().
|
|
||||||
* @param buffer The address of a pointer to a buffer. This function sets the
|
|
||||||
* pointer to point at the retrieved data, if successful.
|
|
||||||
* @param buflen The address of an int that is set to the length of
|
|
||||||
* <i>buffer</i> by this function if successful.
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise return
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR.
|
|
||||||
*/
|
|
||||||
typedef int (*Persistence_get)(void* handle, char* key, char** buffer, int* buflen);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Remove the data for the specified key from the store.
|
|
||||||
*
|
|
||||||
* @param handle The handle pointer from a successful call to
|
|
||||||
* Persistence_open().
|
|
||||||
* @param key A string that is the key for the data to be removed from the
|
|
||||||
* store. This is the same key used to save the data to the store with
|
|
||||||
* Persistence_put().
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise return
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR.
|
|
||||||
*/
|
|
||||||
typedef int (*Persistence_remove)(void* handle, char* key);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Returns the keys in this persistent data store.
|
|
||||||
*
|
|
||||||
* @param handle The handle pointer from a successful call to
|
|
||||||
* Persistence_open().
|
|
||||||
* @param keys The address of a pointer to pointers to strings. Assuming
|
|
||||||
* successful execution, this function allocates memory to hold the returned
|
|
||||||
* keys (strings used to store the data with Persistence_put()). It also
|
|
||||||
* allocates memory to hold an array of pointers to these strings. <i>keys</i>
|
|
||||||
* is set to point to the array of pointers to strings.
|
|
||||||
* @param nkeys A pointer to the number of keys in this persistent data store.
|
|
||||||
* This function sets the number of keys, if successful.
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise return
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR.
|
|
||||||
*/
|
|
||||||
typedef int (*Persistence_keys)(void* handle, char*** keys, int* nkeys);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Clears the persistence store, so that it no longer contains any
|
|
||||||
* persisted data.
|
|
||||||
*
|
|
||||||
* @param handle The handle pointer from a successful call to
|
|
||||||
* Persistence_open().
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise return
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR.
|
|
||||||
*/
|
|
||||||
typedef int (*Persistence_clear)(void* handle);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Returns whether any data has been persisted using the specified key.
|
|
||||||
*
|
|
||||||
* @param handle The handle pointer from a successful call to
|
|
||||||
* Persistence_open().
|
|
||||||
* @param key The string to be tested for existence in the store.
|
|
||||||
* @return Return 0 if the key was found in the store, otherwise return
|
|
||||||
* ::MQTTCLIENT_PERSISTENCE_ERROR.
|
|
||||||
*/
|
|
||||||
typedef int (*Persistence_containskey)(void* handle, char* key);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief A structure containing the function pointers to a persistence
|
|
||||||
* implementation and the context or state that will be shared across all
|
|
||||||
* the persistence functions.
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
/**
|
|
||||||
* A pointer to any data required to initialize the persistent store.
|
|
||||||
*/
|
|
||||||
void* context;
|
|
||||||
/**
|
|
||||||
* A function pointer to an implementation of Persistence_open().
|
|
||||||
*/
|
|
||||||
Persistence_open popen;
|
|
||||||
/**
|
|
||||||
* A function pointer to an implementation of Persistence_close().
|
|
||||||
*/
|
|
||||||
Persistence_close pclose;
|
|
||||||
/**
|
|
||||||
* A function pointer to an implementation of Persistence_put().
|
|
||||||
*/
|
|
||||||
Persistence_put pput;
|
|
||||||
/**
|
|
||||||
* A function pointer to an implementation of Persistence_get().
|
|
||||||
*/
|
|
||||||
Persistence_get pget;
|
|
||||||
/**
|
|
||||||
* A function pointer to an implementation of Persistence_remove().
|
|
||||||
*/
|
|
||||||
Persistence_remove premove;
|
|
||||||
/**
|
|
||||||
* A function pointer to an implementation of Persistence_keys().
|
|
||||||
*/
|
|
||||||
Persistence_keys pkeys;
|
|
||||||
/**
|
|
||||||
* A function pointer to an implementation of Persistence_clear().
|
|
||||||
*/
|
|
||||||
Persistence_clear pclear;
|
|
||||||
/**
|
|
||||||
* A function pointer to an implementation of Persistence_containskey().
|
|
||||||
*/
|
|
||||||
Persistence_containskey pcontainskey;
|
|
||||||
} MQTTClient_persistence;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A callback which is invoked just before a write to persistence. This can be
|
|
||||||
* used to transform the data, for instance to encrypt it.
|
|
||||||
* @param context The context as set in ::MQTTAsync_setBeforePersistenceWrite
|
|
||||||
* @param bufcount The number of buffers to write to the persistence store.
|
|
||||||
* @param buffers An array of pointers to the data buffers.
|
|
||||||
* @param buflens An array of lengths of the data buffers.
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise non 0.
|
|
||||||
*/
|
|
||||||
typedef int MQTTPersistence_beforeWrite(void* context, int bufcount, char* buffers[], int buflens[]);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A callback which is invoked just after a read from persistence. This can be
|
|
||||||
* used to transform the data, for instance to decrypt it.
|
|
||||||
* @param context The context as set in ::MQTTAsync_setAfterPersistenceRead
|
|
||||||
* @param buffer The address of a pointer to a buffer.
|
|
||||||
* @param buflen The address of an int that is the length of the buffer.
|
|
||||||
* @return Return 0 if the function completes successfully, otherwise non 0.
|
|
||||||
*/
|
|
||||||
typedef int MQTTPersistence_afterRead(void* context, char** buffer, int* buflen);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,36 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2020, 2020 Andreas Walter
|
|
||||||
*
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v2.0
|
|
||||||
* and Eclipse Distribution License v1.0 which accompany this distribution.
|
|
||||||
*
|
|
||||||
* The Eclipse Public License is available at
|
|
||||||
* https://www.eclipse.org/legal/epl-2.0/
|
|
||||||
* and the Eclipse Distribution License is available at
|
|
||||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Andreas Walter - initially moved export declarations into separate fle
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#if !defined(EXPORTDECLARATIONS_H)
|
|
||||||
#define EXPORTDECLARATIONS_H
|
|
||||||
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
|
||||||
# if defined(PAHO_MQTT_EXPORTS)
|
|
||||||
# define LIBMQTT_API __declspec(dllexport)
|
|
||||||
# elif defined(PAHO_MQTT_IMPORTS)
|
|
||||||
# define LIBMQTT_API __declspec(dllimport)
|
|
||||||
# else
|
|
||||||
# define LIBMQTT_API
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# if defined(PAHO_MQTT_EXPORTS)
|
|
||||||
# define LIBMQTT_API __attribute__ ((visibility ("default")))
|
|
||||||
# else
|
|
||||||
# define LIBMQTT_API extern
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
222
MQTTProperties.h
222
MQTTProperties.h
|
@ -1,222 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2017, 2023 IBM Corp. and others
|
|
||||||
*
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v2.0
|
|
||||||
* and Eclipse Distribution License v1.0 which accompany this distribution.
|
|
||||||
*
|
|
||||||
* The Eclipse Public License is available at
|
|
||||||
* https://www.eclipse.org/legal/epl-2.0/
|
|
||||||
* and the Eclipse Distribution License is available at
|
|
||||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Ian Craggs - initial API and implementation and/or initial documentation
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#if !defined(MQTTPROPERTIES_H)
|
|
||||||
#define MQTTPROPERTIES_H
|
|
||||||
|
|
||||||
#include "MQTTExportDeclarations.h"
|
|
||||||
|
|
||||||
#define MQTT_INVALID_PROPERTY_ID -2
|
|
||||||
|
|
||||||
/** The one byte MQTT V5 property indicator */
|
|
||||||
enum MQTTPropertyCodes {
|
|
||||||
MQTTPROPERTY_CODE_PAYLOAD_FORMAT_INDICATOR = 1, /**< The value is 1 */
|
|
||||||
MQTTPROPERTY_CODE_MESSAGE_EXPIRY_INTERVAL = 2, /**< The value is 2 */
|
|
||||||
MQTTPROPERTY_CODE_CONTENT_TYPE = 3, /**< The value is 3 */
|
|
||||||
MQTTPROPERTY_CODE_RESPONSE_TOPIC = 8, /**< The value is 8 */
|
|
||||||
MQTTPROPERTY_CODE_CORRELATION_DATA = 9, /**< The value is 9 */
|
|
||||||
MQTTPROPERTY_CODE_SUBSCRIPTION_IDENTIFIER = 11, /**< The value is 11 */
|
|
||||||
MQTTPROPERTY_CODE_SESSION_EXPIRY_INTERVAL = 17, /**< The value is 17 */
|
|
||||||
MQTTPROPERTY_CODE_ASSIGNED_CLIENT_IDENTIFER = 18,/**< The value is 18 */
|
|
||||||
MQTTPROPERTY_CODE_SERVER_KEEP_ALIVE = 19, /**< The value is 19 */
|
|
||||||
MQTTPROPERTY_CODE_AUTHENTICATION_METHOD = 21, /**< The value is 21 */
|
|
||||||
MQTTPROPERTY_CODE_AUTHENTICATION_DATA = 22, /**< The value is 22 */
|
|
||||||
MQTTPROPERTY_CODE_REQUEST_PROBLEM_INFORMATION = 23,/**< The value is 23 */
|
|
||||||
MQTTPROPERTY_CODE_WILL_DELAY_INTERVAL = 24, /**< The value is 24 */
|
|
||||||
MQTTPROPERTY_CODE_REQUEST_RESPONSE_INFORMATION = 25,/**< The value is 25 */
|
|
||||||
MQTTPROPERTY_CODE_RESPONSE_INFORMATION = 26, /**< The value is 26 */
|
|
||||||
MQTTPROPERTY_CODE_SERVER_REFERENCE = 28, /**< The value is 28 */
|
|
||||||
MQTTPROPERTY_CODE_REASON_STRING = 31, /**< The value is 31 */
|
|
||||||
MQTTPROPERTY_CODE_RECEIVE_MAXIMUM = 33, /**< The value is 33*/
|
|
||||||
MQTTPROPERTY_CODE_TOPIC_ALIAS_MAXIMUM = 34, /**< The value is 34 */
|
|
||||||
MQTTPROPERTY_CODE_TOPIC_ALIAS = 35, /**< The value is 35 */
|
|
||||||
MQTTPROPERTY_CODE_MAXIMUM_QOS = 36, /**< The value is 36 */
|
|
||||||
MQTTPROPERTY_CODE_RETAIN_AVAILABLE = 37, /**< The value is 37 */
|
|
||||||
MQTTPROPERTY_CODE_USER_PROPERTY = 38, /**< The value is 38 */
|
|
||||||
MQTTPROPERTY_CODE_MAXIMUM_PACKET_SIZE = 39, /**< The value is 39 */
|
|
||||||
MQTTPROPERTY_CODE_WILDCARD_SUBSCRIPTION_AVAILABLE = 40,/**< The value is 40 */
|
|
||||||
MQTTPROPERTY_CODE_SUBSCRIPTION_IDENTIFIERS_AVAILABLE = 41,/**< The value is 41 */
|
|
||||||
MQTTPROPERTY_CODE_SHARED_SUBSCRIPTION_AVAILABLE = 42/**< The value is 241 */
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a printable string description of an MQTT V5 property code.
|
|
||||||
* @param value an MQTT V5 property code.
|
|
||||||
* @return the printable string description of the input property code.
|
|
||||||
* NULL if the code was not found.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API const char* MQTTPropertyName(enum MQTTPropertyCodes value);
|
|
||||||
|
|
||||||
/** The one byte MQTT V5 property type */
|
|
||||||
enum MQTTPropertyTypes {
|
|
||||||
MQTTPROPERTY_TYPE_BYTE,
|
|
||||||
MQTTPROPERTY_TYPE_TWO_BYTE_INTEGER,
|
|
||||||
MQTTPROPERTY_TYPE_FOUR_BYTE_INTEGER,
|
|
||||||
MQTTPROPERTY_TYPE_VARIABLE_BYTE_INTEGER,
|
|
||||||
MQTTPROPERTY_TYPE_BINARY_DATA,
|
|
||||||
MQTTPROPERTY_TYPE_UTF_8_ENCODED_STRING,
|
|
||||||
MQTTPROPERTY_TYPE_UTF_8_STRING_PAIR
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the MQTT V5 type code of an MQTT V5 property.
|
|
||||||
* @param value an MQTT V5 property code.
|
|
||||||
* @return the MQTT V5 type code of the input property. -1 if the code was not found.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API int MQTTProperty_getType(enum MQTTPropertyCodes value);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The data for a length delimited string
|
|
||||||
*/
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
int len; /**< the length of the string */
|
|
||||||
char* data; /**< pointer to the string data */
|
|
||||||
} MQTTLenString;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Structure to hold an MQTT version 5 property of any type
|
|
||||||
*/
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
enum MQTTPropertyCodes identifier; /**< The MQTT V5 property id. A multi-byte integer. */
|
|
||||||
/** The value of the property, as a union of the different possible types. */
|
|
||||||
union {
|
|
||||||
unsigned char byte; /**< holds the value of a byte property type */
|
|
||||||
unsigned short integer2; /**< holds the value of a 2 byte integer property type */
|
|
||||||
unsigned int integer4; /**< holds the value of a 4 byte integer property type */
|
|
||||||
struct {
|
|
||||||
MQTTLenString data; /**< The value of a string property, or the name of a user property. */
|
|
||||||
MQTTLenString value; /**< The value of a user property. */
|
|
||||||
};
|
|
||||||
} value;
|
|
||||||
} MQTTProperty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MQTT version 5 property list
|
|
||||||
*/
|
|
||||||
typedef struct MQTTProperties
|
|
||||||
{
|
|
||||||
int count; /**< number of property entries in the array */
|
|
||||||
int max_count; /**< max number of properties that the currently allocated array can store */
|
|
||||||
int length; /**< mbi: byte length of all properties */
|
|
||||||
MQTTProperty *array; /**< array of properties */
|
|
||||||
} MQTTProperties;
|
|
||||||
|
|
||||||
#define MQTTProperties_initializer {0, 0, 0, NULL}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the length of the properties structure when serialized ready for network transmission.
|
|
||||||
* @param props an MQTT V5 property structure.
|
|
||||||
* @return the length in bytes of the properties when serialized.
|
|
||||||
*/
|
|
||||||
int MQTTProperties_len(MQTTProperties* props);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add a property pointer to the property array. Memory is allocated in this function,
|
|
||||||
* so MQTTClient_create or MQTTAsync_create must be called first to initialize the
|
|
||||||
* internal heap tracking. Alternatively MQTTAsync_global_init() can be called first
|
|
||||||
* or build with the HIGH_PERFORMANCE option which disables the heap tracking.
|
|
||||||
* @param props The property list to add the property to.
|
|
||||||
* @param prop The property to add to the list.
|
|
||||||
* @return 0 on success, -1 on failure.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API int MQTTProperties_add(MQTTProperties* props, const MQTTProperty* prop);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Serialize the given property list to a character buffer, e.g. for writing to the network.
|
|
||||||
* @param pptr pointer to the buffer - move the pointer as we add data
|
|
||||||
* @param properties pointer to the property list, can be NULL
|
|
||||||
* @return whether the write succeeded or not: number of bytes written, or < 0 on failure.
|
|
||||||
*/
|
|
||||||
int MQTTProperties_write(char** pptr, const MQTTProperties* properties);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reads a property list from a character buffer into an array.
|
|
||||||
* @param properties pointer to the property list to be filled. Should be initalized but empty.
|
|
||||||
* @param pptr pointer to the character buffer.
|
|
||||||
* @param enddata pointer to the end of the character buffer so we don't read beyond.
|
|
||||||
* @return 1 if the properties were read successfully.
|
|
||||||
*/
|
|
||||||
int MQTTProperties_read(MQTTProperties* properties, char** pptr, char* enddata);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Free all memory allocated to the property list, including any to individual properties.
|
|
||||||
* @param properties pointer to the property list.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API void MQTTProperties_free(MQTTProperties* properties);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy the contents of a property list, allocating additional memory if needed.
|
|
||||||
* @param props pointer to the property list.
|
|
||||||
* @return the duplicated property list.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API MQTTProperties MQTTProperties_copy(const MQTTProperties* props);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if property list contains a specific property.
|
|
||||||
* @param props pointer to the property list.
|
|
||||||
* @param propid the property id to check for.
|
|
||||||
* @return 1 if found, 0 if not.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API int MQTTProperties_hasProperty(MQTTProperties *props, enum MQTTPropertyCodes propid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of instances of a property id. Most properties can exist only once.
|
|
||||||
* User properties and subscription ids can exist more than once.
|
|
||||||
* @param props pointer to the property list.
|
|
||||||
* @param propid the property id to check for.
|
|
||||||
* @return the number of times found. Can be 0.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API int MQTTProperties_propertyCount(MQTTProperties *props, enum MQTTPropertyCodes propid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the integer value of a specific property. The property given must be a numeric type.
|
|
||||||
* @param props pointer to the property list.
|
|
||||||
* @param propid the property id to check for.
|
|
||||||
* @return the integer value of the property. -9999999 on failure.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API int MQTTProperties_getNumericValue(MQTTProperties *props, enum MQTTPropertyCodes propid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the integer value of a specific property when it's not the only instance.
|
|
||||||
* The property given must be a numeric type.
|
|
||||||
* @param props pointer to the property list.
|
|
||||||
* @param propid the property id to check for.
|
|
||||||
* @param index the instance number, starting at 0.
|
|
||||||
* @return the integer value of the property. -9999999 on failure.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API int MQTTProperties_getNumericValueAt(MQTTProperties *props, enum MQTTPropertyCodes propid, int index);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a pointer to the property structure for a specific property.
|
|
||||||
* @param props pointer to the property list.
|
|
||||||
* @param propid the property id to check for.
|
|
||||||
* @return the pointer to the property structure if found. NULL if not found.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API MQTTProperty* MQTTProperties_getProperty(MQTTProperties *props, enum MQTTPropertyCodes propid);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a pointer to the property structure for a specific property when it's not the only instance.
|
|
||||||
* @param props pointer to the property list.
|
|
||||||
* @param propid the property id to check for.
|
|
||||||
* @param index the instance number, starting at 0.
|
|
||||||
* @return the pointer to the property structure if found. NULL if not found.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API MQTTProperty* MQTTProperties_getPropertyAt(MQTTProperties *props, enum MQTTPropertyCodes propid, int index);
|
|
||||||
|
|
||||||
#endif /* MQTTPROPERTIES_H */
|
|
|
@ -1,79 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2017, 2020 IBM Corp. and others
|
|
||||||
*
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v2.0
|
|
||||||
* and Eclipse Distribution License v1.0 which accompany this distribution.
|
|
||||||
*
|
|
||||||
* The Eclipse Public License is available at
|
|
||||||
* https://www.eclipse.org/legal/epl-2.0/
|
|
||||||
* and the Eclipse Distribution License is available at
|
|
||||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Ian Craggs - initial API and implementation and/or initial documentation
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#if !defined(MQTTREASONCODES_H)
|
|
||||||
#define MQTTREASONCODES_H
|
|
||||||
|
|
||||||
#include "MQTTExportDeclarations.h"
|
|
||||||
|
|
||||||
/** The MQTT V5 one byte reason code */
|
|
||||||
enum MQTTReasonCodes {
|
|
||||||
MQTTREASONCODE_SUCCESS = 0,
|
|
||||||
MQTTREASONCODE_NORMAL_DISCONNECTION = 0,
|
|
||||||
MQTTREASONCODE_GRANTED_QOS_0 = 0,
|
|
||||||
MQTTREASONCODE_GRANTED_QOS_1 = 1,
|
|
||||||
MQTTREASONCODE_GRANTED_QOS_2 = 2,
|
|
||||||
MQTTREASONCODE_DISCONNECT_WITH_WILL_MESSAGE = 4,
|
|
||||||
MQTTREASONCODE_NO_MATCHING_SUBSCRIBERS = 16,
|
|
||||||
MQTTREASONCODE_NO_SUBSCRIPTION_FOUND = 17,
|
|
||||||
MQTTREASONCODE_CONTINUE_AUTHENTICATION = 24,
|
|
||||||
MQTTREASONCODE_RE_AUTHENTICATE = 25,
|
|
||||||
MQTTREASONCODE_UNSPECIFIED_ERROR = 128,
|
|
||||||
MQTTREASONCODE_MALFORMED_PACKET = 129,
|
|
||||||
MQTTREASONCODE_PROTOCOL_ERROR = 130,
|
|
||||||
MQTTREASONCODE_IMPLEMENTATION_SPECIFIC_ERROR = 131,
|
|
||||||
MQTTREASONCODE_UNSUPPORTED_PROTOCOL_VERSION = 132,
|
|
||||||
MQTTREASONCODE_CLIENT_IDENTIFIER_NOT_VALID = 133,
|
|
||||||
MQTTREASONCODE_BAD_USER_NAME_OR_PASSWORD = 134,
|
|
||||||
MQTTREASONCODE_NOT_AUTHORIZED = 135,
|
|
||||||
MQTTREASONCODE_SERVER_UNAVAILABLE = 136,
|
|
||||||
MQTTREASONCODE_SERVER_BUSY = 137,
|
|
||||||
MQTTREASONCODE_BANNED = 138,
|
|
||||||
MQTTREASONCODE_SERVER_SHUTTING_DOWN = 139,
|
|
||||||
MQTTREASONCODE_BAD_AUTHENTICATION_METHOD = 140,
|
|
||||||
MQTTREASONCODE_KEEP_ALIVE_TIMEOUT = 141,
|
|
||||||
MQTTREASONCODE_SESSION_TAKEN_OVER = 142,
|
|
||||||
MQTTREASONCODE_TOPIC_FILTER_INVALID = 143,
|
|
||||||
MQTTREASONCODE_TOPIC_NAME_INVALID = 144,
|
|
||||||
MQTTREASONCODE_PACKET_IDENTIFIER_IN_USE = 145,
|
|
||||||
MQTTREASONCODE_PACKET_IDENTIFIER_NOT_FOUND = 146,
|
|
||||||
MQTTREASONCODE_RECEIVE_MAXIMUM_EXCEEDED = 147,
|
|
||||||
MQTTREASONCODE_TOPIC_ALIAS_INVALID = 148,
|
|
||||||
MQTTREASONCODE_PACKET_TOO_LARGE = 149,
|
|
||||||
MQTTREASONCODE_MESSAGE_RATE_TOO_HIGH = 150,
|
|
||||||
MQTTREASONCODE_QUOTA_EXCEEDED = 151,
|
|
||||||
MQTTREASONCODE_ADMINISTRATIVE_ACTION = 152,
|
|
||||||
MQTTREASONCODE_PAYLOAD_FORMAT_INVALID = 153,
|
|
||||||
MQTTREASONCODE_RETAIN_NOT_SUPPORTED = 154,
|
|
||||||
MQTTREASONCODE_QOS_NOT_SUPPORTED = 155,
|
|
||||||
MQTTREASONCODE_USE_ANOTHER_SERVER = 156,
|
|
||||||
MQTTREASONCODE_SERVER_MOVED = 157,
|
|
||||||
MQTTREASONCODE_SHARED_SUBSCRIPTIONS_NOT_SUPPORTED = 158,
|
|
||||||
MQTTREASONCODE_CONNECTION_RATE_EXCEEDED = 159,
|
|
||||||
MQTTREASONCODE_MAXIMUM_CONNECT_TIME = 160,
|
|
||||||
MQTTREASONCODE_SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED = 161,
|
|
||||||
MQTTREASONCODE_WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED = 162
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a printable string description of an MQTT V5 reason code.
|
|
||||||
* @param value an MQTT V5 reason code.
|
|
||||||
* @return the printable string description of the input reason code.
|
|
||||||
* NULL if the code was not found.
|
|
||||||
*/
|
|
||||||
LIBMQTT_API const char* MQTTReasonCode_toString(enum MQTTReasonCodes value);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,46 +0,0 @@
|
||||||
/*******************************************************************************
|
|
||||||
* Copyright (c) 2018 IBM Corp.
|
|
||||||
*
|
|
||||||
* All rights reserved. This program and the accompanying materials
|
|
||||||
* are made available under the terms of the Eclipse Public License v2.0
|
|
||||||
* and Eclipse Distribution License v1.0 which accompany this distribution.
|
|
||||||
*
|
|
||||||
* The Eclipse Public License is available at
|
|
||||||
* https://www.eclipse.org/legal/epl-2.0/
|
|
||||||
* and the Eclipse Distribution License is available at
|
|
||||||
* http://www.eclipse.org/org/documents/edl-v10.php.
|
|
||||||
*
|
|
||||||
* Contributors:
|
|
||||||
* Ian Craggs - initial API and implementation and/or initial documentation
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#if !defined(SUBOPTS_H)
|
|
||||||
#define SUBOPTS_H
|
|
||||||
|
|
||||||
/** The MQTT V5 subscribe options, apart from QoS which existed before V5. */
|
|
||||||
typedef struct MQTTSubscribe_options
|
|
||||||
{
|
|
||||||
/** The eyecatcher for this structure. Must be MQSO. */
|
|
||||||
char struct_id[4];
|
|
||||||
/** The version number of this structure. Must be 0.
|
|
||||||
*/
|
|
||||||
int struct_version;
|
|
||||||
/** To not receive our own publications, set to 1.
|
|
||||||
* 0 is the original MQTT behaviour - all messages matching the subscription are received.
|
|
||||||
*/
|
|
||||||
unsigned char noLocal;
|
|
||||||
/** To keep the retain flag as on the original publish message, set to 1.
|
|
||||||
* If 0, defaults to the original MQTT behaviour where the retain flag is only set on
|
|
||||||
* publications sent by a broker if in response to a subscribe request.
|
|
||||||
*/
|
|
||||||
unsigned char retainAsPublished;
|
|
||||||
/** 0 - send retained messages at the time of the subscribe (original MQTT behaviour)
|
|
||||||
* 1 - send retained messages on subscribe only if the subscription is new
|
|
||||||
* 2 - do not send retained messages at all
|
|
||||||
*/
|
|
||||||
unsigned char retainHandling;
|
|
||||||
} MQTTSubscribe_options;
|
|
||||||
|
|
||||||
#define MQTTSubscribe_options_initializer { {'M', 'Q', 'S', 'O'}, 0, 0, 0, 0 }
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -60,7 +60,7 @@ static void ConnecttoMPSKThread(void * portptr);
|
||||||
void CreateMHWindow();
|
void CreateMHWindow();
|
||||||
int Update_MH_List(struct in_addr ipad, char * call, char proto);
|
int Update_MH_List(struct in_addr ipad, char * call, char proto);
|
||||||
|
|
||||||
static int ConnecttoMPSK();
|
static int ConnecttoMPSK(int port);
|
||||||
static int ProcessReceivedData(int bpqport);
|
static int ProcessReceivedData(int bpqport);
|
||||||
static int ProcessLine(char * buf, int Port);
|
static int ProcessLine(char * buf, int Port);
|
||||||
int KillTNC(struct TNCINFO * TNC);
|
int KillTNC(struct TNCINFO * TNC);
|
||||||
|
@ -71,8 +71,6 @@ static VOID SendData(struct TNCINFO * TNC, char * Msg, int MsgLen);
|
||||||
static VOID DoMonitorHddr(struct TNCINFO * TNC, struct AGWHEADER * RXHeader, UCHAR * Msg);
|
static VOID DoMonitorHddr(struct TNCINFO * TNC, struct AGWHEADER * RXHeader, UCHAR * Msg);
|
||||||
VOID SendRPBeacon(struct TNCINFO * TNC);
|
VOID SendRPBeacon(struct TNCINFO * TNC);
|
||||||
|
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
extern UCHAR BPQDirectory[];
|
extern UCHAR BPQDirectory[];
|
||||||
|
|
||||||
#define MAXMPSKPORTS 16
|
#define MAXMPSKPORTS 16
|
||||||
|
|
|
@ -205,6 +205,7 @@ int MailForInterval = 0;
|
||||||
char zeros[NBMASK]; // For forward bitmask tests
|
char zeros[NBMASK]; // For forward bitmask tests
|
||||||
|
|
||||||
time_t MaintClock; // Time to run housekeeping
|
time_t MaintClock; // Time to run housekeeping
|
||||||
|
time_t APIClock; // Time to sent to MOLTE's Database
|
||||||
|
|
||||||
struct MsgInfo * MsgnotoMsg[100000]; // Message Number to Message Slot List.
|
struct MsgInfo * MsgnotoMsg[100000]; // Message Number to Message Slot List.
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ struct Country Countries[] =
|
||||||
"HKG", "ASIA", "AS", // Hong Kong Special Administrative Region of China
|
"HKG", "ASIA", "AS", // Hong Kong Special Administrative Region of China
|
||||||
"MAC", "ASIA", "AS", // Macao Special Administrative Region of China
|
"MAC", "ASIA", "AS", // Macao Special Administrative Region of China
|
||||||
"COL", "ASIA", "SA", // Colombia
|
"COL", "ASIA", "SA", // Colombia
|
||||||
"COM", "SAFR", "AF", // Comoros
|
// "COM", "SAFR", "AF", // Comoros
|
||||||
"COG", "CAFR", "AF", // Congo
|
"COG", "CAFR", "AF", // Congo
|
||||||
"COK", "SPAC", "OC", // Cook Islands
|
"COK", "SPAC", "OC", // Cook Islands
|
||||||
"CRI", "CEAM", "NA", // Costa Rica
|
"CRI", "CEAM", "NA", // Costa Rica
|
||||||
|
|
|
@ -2897,6 +2897,8 @@ SocketConn * SMTPConnect(char * Host, int Port, BOOL AMPR, struct MsgInfo * Msg,
|
||||||
sinx.sin_addr.s_addr = INADDR_ANY;
|
sinx.sin_addr.s_addr = INADDR_ANY;
|
||||||
sinx.sin_port = 0;
|
sinx.sin_port = 0;
|
||||||
|
|
||||||
|
sockptr->Timeout = 0;
|
||||||
|
|
||||||
if (bind(sockptr->socket, (LPSOCKADDR) &sinx, addrlen) != 0 )
|
if (bind(sockptr->socket, (LPSOCKADDR) &sinx, addrlen) != 0 )
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -3590,7 +3592,6 @@ VOID ProcessPOP3ClientMessage(SocketConn * sockptr, char * Buffer, int Len)
|
||||||
if (sockptr->POP3MsgCount > sockptr->POP3MsgNum++)
|
if (sockptr->POP3MsgCount > sockptr->POP3MsgNum++)
|
||||||
{
|
{
|
||||||
sockprintf(sockptr, "RETR %d", sockptr->POP3MsgNum);
|
sockprintf(sockptr, "RETR %d", sockptr->POP3MsgNum);
|
||||||
|
|
||||||
sockptr->State = WaitingForRETRResponse;
|
sockptr->State = WaitingForRETRResponse;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -59,7 +59,6 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
|
|
||||||
#define NODES_SIG 0xFF
|
#define NODES_SIG 0xFF
|
||||||
|
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, unsigned int msglen);
|
UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, unsigned int msglen);
|
||||||
|
|
||||||
char * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen);
|
char * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen);
|
||||||
|
|
14
Multicast.c
14
Multicast.c
|
@ -612,15 +612,15 @@ struct MSESSION * FindMSession(unsigned int Key)
|
||||||
|
|
||||||
#define LZMA_STR "\1LZMA"
|
#define LZMA_STR "\1LZMA"
|
||||||
|
|
||||||
UCHAR * LZUncompress(UCHAR * Decoded, int Len, int * NewLen)
|
UCHAR * LZUncompress(UCHAR * Decoded, size_t Len, size_t * NewLen)
|
||||||
{
|
{
|
||||||
unsigned char * buf;
|
unsigned char * buf;
|
||||||
unsigned char inprops[LZMA_PROPS_SIZE];
|
unsigned char inprops[LZMA_PROPS_SIZE];
|
||||||
size_t inlen;
|
size_t inlen;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
UINT rlen;
|
size_t rlen = 0;
|
||||||
UINT outlen;
|
size_t outlen;
|
||||||
|
|
||||||
memcpy(&rlen, &Decoded[5], 4);
|
memcpy(&rlen, &Decoded[5], 4);
|
||||||
|
|
||||||
|
@ -668,8 +668,8 @@ void SaveMulticastMessage(struct MSESSION * MSession)
|
||||||
{
|
{
|
||||||
UCHAR * Decoded = NULL; // Output from Basexxx decode
|
UCHAR * Decoded = NULL; // Output from Basexxx decode
|
||||||
UCHAR * Uncompressed = NULL;
|
UCHAR * Uncompressed = NULL;
|
||||||
int DecodedLen; // Length of decoded message
|
size_t DecodedLen; // Length of decoded message
|
||||||
int UncompressedLen; // Length of decompressed message
|
size_t UncompressedLen; // Length of decompressed message
|
||||||
int ExpectedLen; // From front of Base128 or Base256 message
|
int ExpectedLen; // From front of Base128 or Base256 message
|
||||||
int HddrLen; // Length of Expected Len Header
|
int HddrLen; // Length of Expected Len Header
|
||||||
|
|
||||||
|
@ -1612,7 +1612,7 @@ int MulticastStatusHTML(char * Reply)
|
||||||
if (Sess ==NULL)
|
if (Sess ==NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
Len = sprintf(Reply, StatusPage);
|
Len = sprintf(Reply, "%s", StatusPage);
|
||||||
|
|
||||||
while (Sess)
|
while (Sess)
|
||||||
{
|
{
|
||||||
|
@ -1670,7 +1670,7 @@ int MulticastStatusHTML(char * Reply)
|
||||||
Sess = Sess->Next;
|
Sess = Sess->Next;
|
||||||
}
|
}
|
||||||
|
|
||||||
Len += sprintf(&Reply[Len], StatusTail);
|
Len += sprintf(&Reply[Len], "%s", StatusTail);
|
||||||
|
|
||||||
return Len;
|
return Len;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
VOID ReleaseSock(SOCKET sock);
|
VOID ReleaseSock(SOCKET sock);
|
||||||
|
void MQTTMessageEvent(void* message);
|
||||||
|
|
||||||
struct NNTPRec * FirstNNTPRec = NULL;
|
struct NNTPRec * FirstNNTPRec = NULL;
|
||||||
|
|
||||||
|
@ -352,6 +353,12 @@ int CreateNNTPMessage(char * From, char * To, char * MsgTitle, time_t Date, char
|
||||||
|
|
||||||
BuildNNTPList(Msg); // Build NNTP Groups list
|
BuildNNTPList(Msg); // Build NNTP Groups list
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
return CreateSMTPMessageFile(MsgBody, Msg);
|
return CreateSMTPMessageFile(MsgBody, Msg);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
21
RigControl.c
21
RigControl.c
|
@ -1291,7 +1291,7 @@ int Rig_CommandEx(struct RIGPORTINFO * PORT, struct RIGINFO * RIG, TRANSPORTENTR
|
||||||
|
|
||||||
// use text command
|
// use text command
|
||||||
|
|
||||||
Len = sprintf(CmdPtr, ptr1);
|
Len = sprintf(CmdPtr, "%S", ptr1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case YAESU:
|
case YAESU:
|
||||||
|
@ -3205,7 +3205,7 @@ VOID ReleasePermission(struct RIGINFO *RIG)
|
||||||
while (RIG->PortRecord[i])
|
while (RIG->PortRecord[i])
|
||||||
{
|
{
|
||||||
PortRecord = RIG->PortRecord[i];
|
PortRecord = RIG->PortRecord[i];
|
||||||
PortRecord->PORT_EXT_ADDR(6, PortRecord->PORTCONTROL.PORTNUMBER, 3); // Release Perrmission
|
PortRecord->PORT_EXT_ADDR(6, PortRecord->PORTCONTROL.PORTNUMBER, (PDATAMESSAGE)3); // Release Perrmission
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3235,7 +3235,7 @@ int GetPermissionToChange(struct RIGPORTINFO * PORT, struct RIGINFO *RIG)
|
||||||
// TNC has been asked for permission, and we are waiting respoonse
|
// TNC has been asked for permission, and we are waiting respoonse
|
||||||
// Only SCS pactor returns WaitingForPrmission, so check shouldn't be called on others
|
// Only SCS pactor returns WaitingForPrmission, so check shouldn't be called on others
|
||||||
|
|
||||||
RIG->OKtoChange = (int)(intptr_t)RIG->PortRecord[0]->PORT_EXT_ADDR(6, RIG->PortRecord[0]->PORTCONTROL.PORTNUMBER, 2); // Get Ok Flag
|
RIG->OKtoChange = (int)(intptr_t)RIG->PortRecord[0]->PORT_EXT_ADDR(6, RIG->PortRecord[0]->PORTCONTROL.PORTNUMBER, (PDATAMESSAGE)2); // Get Ok Flag
|
||||||
|
|
||||||
if (RIG->OKtoChange == 1)
|
if (RIG->OKtoChange == 1)
|
||||||
{
|
{
|
||||||
|
@ -3277,7 +3277,7 @@ int GetPermissionToChange(struct RIGPORTINFO * PORT, struct RIGINFO *RIG)
|
||||||
// not waiting for permission, so must be first call of a cycle
|
// not waiting for permission, so must be first call of a cycle
|
||||||
|
|
||||||
if (RIG->PortRecord[0] && RIG->PortRecord[0]->PORT_EXT_ADDR)
|
if (RIG->PortRecord[0] && RIG->PortRecord[0]->PORT_EXT_ADDR)
|
||||||
RIG->WaitingForPermission = (int)(intptr_t)RIG->PortRecord[0]->PORT_EXT_ADDR(6, RIG->PortRecord[0]->PORTCONTROL.PORTNUMBER, 1); // Request Perrmission
|
RIG->WaitingForPermission = (int)(intptr_t)RIG->PortRecord[0]->PORT_EXT_ADDR(6, RIG->PortRecord[0]->PORTCONTROL.PORTNUMBER, (PDATAMESSAGE)1); // Request Perrmission
|
||||||
|
|
||||||
// If it returns zero there is no need to wait.
|
// If it returns zero there is no need to wait.
|
||||||
// Normally SCS Returns True for first call, but returns 0 if Link not running
|
// Normally SCS Returns True for first call, but returns 0 if Link not running
|
||||||
|
@ -3300,7 +3300,7 @@ CheckOtherPorts:
|
||||||
{
|
{
|
||||||
PortRecord = RIG->PortRecord[i];
|
PortRecord = RIG->PortRecord[i];
|
||||||
|
|
||||||
if (PortRecord->PORT_EXT_ADDR && PortRecord->PORT_EXT_ADDR(6, PortRecord->PORTCONTROL.PORTNUMBER, 1))
|
if (PortRecord->PORT_EXT_ADDR && PortRecord->PORT_EXT_ADDR(6, PortRecord->PORTCONTROL.PORTNUMBER, (PDATAMESSAGE)1))
|
||||||
{
|
{
|
||||||
// 1 means can't change - release all
|
// 1 means can't change - release all
|
||||||
|
|
||||||
|
@ -3392,7 +3392,7 @@ VOID DoBandwidthandAntenna(struct RIGINFO *RIG, struct ScanEntry * ptr)
|
||||||
|
|
||||||
RIG->CurrentBandWidth = ptr->Bandwidth;
|
RIG->CurrentBandWidth = ptr->Bandwidth;
|
||||||
|
|
||||||
PortRecord->PORT_EXT_ADDR(6, PortRecord->PORTCONTROL.PORTNUMBER, ptr);
|
PortRecord->PORT_EXT_ADDR(6, PortRecord->PORTCONTROL.PORTNUMBER, (PDATAMESSAGE)ptr);
|
||||||
|
|
||||||
/* if (ptr->Bandwidth == 'R') // Robust Packet
|
/* if (ptr->Bandwidth == 'R') // Robust Packet
|
||||||
PortRecord->PORT_EXT_ADDR(6, PortRecord->PORTCONTROL.PORTNUMBER, 6); // Set Robust Packet
|
PortRecord->PORT_EXT_ADDR(6, PortRecord->PORTCONTROL.PORTNUMBER, 6); // Set Robust Packet
|
||||||
|
@ -8385,7 +8385,7 @@ int ProcessHAMLIBSlaveMessage(SOCKET Sock, struct RIGINFO * RIG, unsigned char *
|
||||||
|
|
||||||
switch (Msg[0])
|
switch (Msg[0])
|
||||||
{
|
{
|
||||||
case 'f': // Get Freqency
|
case 'f': // Get Frequency
|
||||||
|
|
||||||
HLGetFreq(Sock, RIG, sep);
|
HLGetFreq(Sock, RIG, sep);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -9938,14 +9938,10 @@ void ProcessSDRANGELFrame(struct RIGPORTINFO * PORT)
|
||||||
int Length;
|
int Length;
|
||||||
|
|
||||||
char * msg;
|
char * msg;
|
||||||
char * rest;
|
|
||||||
|
|
||||||
struct RIGINFO * RIG;
|
struct RIGINFO * RIG;
|
||||||
char * ptr, * ptr1, * ptr2, * ptr3, * pos;
|
char * ptr, * ptr1, * ptr2, * ptr3, * pos;
|
||||||
int Len, TotalLen;
|
|
||||||
char cmd[80];
|
char cmd[80];
|
||||||
char ReqBuf[256];
|
|
||||||
char SendBuff[256];
|
|
||||||
int chunklength;
|
int chunklength;
|
||||||
int headerlen;
|
int headerlen;
|
||||||
int i, n = 0;
|
int i, n = 0;
|
||||||
|
@ -10332,7 +10328,6 @@ VOID SDRANGELPoll(struct RIGPORTINFO * PORT)
|
||||||
|
|
||||||
struct RIGINFO * RIG = &PORT->Rigs[0];
|
struct RIGINFO * RIG = &PORT->Rigs[0];
|
||||||
int Len, i;
|
int Len, i;
|
||||||
char ReqBuf[256];
|
|
||||||
char SendBuff[256];
|
char SendBuff[256];
|
||||||
//char * SDRANGEL_GETheader = "GET /sdrangel/deviceset/%d/device/settings "
|
//char * SDRANGEL_GETheader = "GET /sdrangel/deviceset/%d/device/settings "
|
||||||
// "HTTP/1.1\nHost: %s\nConnection: keep-alive\n\r\n";
|
// "HTTP/1.1\nHost: %s\nConnection: keep-alive\n\r\n";
|
||||||
|
@ -10379,7 +10374,6 @@ VOID SDRANGELPoll(struct RIGPORTINFO * PORT)
|
||||||
if (GetPermissionToChange(PORT, RIG))
|
if (GetPermissionToChange(PORT, RIG))
|
||||||
{
|
{
|
||||||
char cmd[80];
|
char cmd[80];
|
||||||
double freq;
|
|
||||||
|
|
||||||
if (RIG->RIG_DEBUG)
|
if (RIG->RIG_DEBUG)
|
||||||
Debugprintf("BPQ32 Change Freq to %9.4f", PORT->FreqPtr->Freq);
|
Debugprintf("BPQ32 Change Freq to %9.4f", PORT->FreqPtr->Freq);
|
||||||
|
@ -10451,7 +10445,6 @@ VOID SDRANGELPoll(struct RIGPORTINFO * PORT)
|
||||||
VOID SDRANGELSendCommand(struct RIGPORTINFO * PORT, char * Command, char * Value)
|
VOID SDRANGELSendCommand(struct RIGPORTINFO * PORT, char * Command, char * Value)
|
||||||
{
|
{
|
||||||
int Len, ret;
|
int Len, ret;
|
||||||
char ReqBuf[512];
|
|
||||||
char SendBuff[512];
|
char SendBuff[512];
|
||||||
char ValueString[256] ="";
|
char ValueString[256] ="";
|
||||||
char * SDRANGEL_PATCHheader = "PATCH /sdrangel/deviceset/%d/device/settings "
|
char * SDRANGEL_PATCHheader = "PATCH /sdrangel/deviceset/%d/device/settings "
|
||||||
|
|
|
@ -2893,7 +2893,7 @@ VOID ProcessIncomingCall(struct TNCINFO * TNC, struct STREAMINFO * STREAM, int S
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// Make sure app is available
|
// Make sure app is available
|
||||||
|
@ -3034,7 +3034,7 @@ VOID ProcessIncomingCall(struct TNCINFO * TNC, struct STREAMINFO * STREAM, int S
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// if SendTandRtoRelay set and Appl is RMS change to RELAY
|
// if SendTandRtoRelay set and Appl is RMS change to RELAY
|
||||||
|
|
|
@ -48,7 +48,6 @@ extern UCHAR BPQDirectory[];
|
||||||
static RECT Rect;
|
static RECT Rect;
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
BOOL KAMStartPort(struct PORTCONTROL * PORT);
|
BOOL KAMStartPort(struct PORTCONTROL * PORT);
|
||||||
BOOL KAMStopPort(struct PORTCONTROL * PORT);
|
BOOL KAMStopPort(struct PORTCONTROL * PORT);
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ extern char LOC[];
|
||||||
static RECT Rect;
|
static RECT Rect;
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
char NodeCall[11]; // Nodecall, Null Terminated
|
char NodeCall[11]; // Nodecall, Null Terminated
|
||||||
|
|
||||||
|
@ -2175,7 +2174,7 @@ VOID TrkProcessDEDFrame(struct TNCINFO * TNC)
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// Make sure app is available
|
// Make sure app is available
|
||||||
|
|
|
@ -142,7 +142,7 @@ loop:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL SerialReadConfigFile(int Port, int ProcLine())
|
BOOL SerialReadConfigFile(int Port, int ProcLine(char * buf, int Port))
|
||||||
{
|
{
|
||||||
char buf[256],errbuf[256];
|
char buf[256],errbuf[256];
|
||||||
|
|
||||||
|
@ -735,7 +735,7 @@ VOID SerialReleasePort(struct TNCINFO * TNC)
|
||||||
VOID * SerialExtInit(EXTPORTDATA * PortEntry)
|
VOID * SerialExtInit(EXTPORTDATA * PortEntry)
|
||||||
{
|
{
|
||||||
int port;
|
int port;
|
||||||
char Msg[255];
|
char Msg[512];
|
||||||
char * ptr;
|
char * ptr;
|
||||||
struct TNCINFO * TNC;
|
struct TNCINFO * TNC;
|
||||||
char * TempScript;
|
char * TempScript;
|
||||||
|
|
|
@ -27,6 +27,16 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
|
|
||||||
#include "CHeaders.h"
|
#include "CHeaders.h"
|
||||||
|
|
||||||
|
typedef struct _TCMDX
|
||||||
|
{
|
||||||
|
char String[12]; // COMMAND STRING
|
||||||
|
UCHAR CMDLEN; // SIGNIFICANT LENGTH
|
||||||
|
VOID (* CMDPROC)(struct TNCDATA * TNC, char * Tail, struct _TCMDX * CMD);// COMMAND PROCESSOR
|
||||||
|
size_t CMDFLAG; // FLAG/VALUE Offset
|
||||||
|
|
||||||
|
} TCMDX;
|
||||||
|
|
||||||
|
|
||||||
#define LF 10
|
#define LF 10
|
||||||
#define CR 13
|
#define CR 13
|
||||||
|
|
||||||
|
@ -848,7 +858,7 @@ int LocalSessionState(int stream, int * state, int * change, BOOL ACK)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID ONOFF(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID ONOFF(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS COMMANDS WITH ON/OFF PARAM
|
// PROCESS COMMANDS WITH ON/OFF PARAM
|
||||||
|
|
||||||
|
@ -897,7 +907,7 @@ VOID ONOFF(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID ONOFF_CONOK(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID ONOFF_CONOK(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
||||||
|
|
||||||
|
@ -911,7 +921,7 @@ VOID ONOFF_CONOK(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
SetAppl(TNCStream->BPQPort, TNC->APPLFLAGS, 0);
|
SetAppl(TNCStream->BPQPort, TNC->APPLFLAGS, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SETMYCALL(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID SETMYCALL(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
char Response[80];
|
char Response[80];
|
||||||
int len;
|
int len;
|
||||||
|
@ -935,7 +945,7 @@ VOID SETMYCALL(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
|
|
||||||
SENDREPLY(TNC, Response, len);
|
SENDREPLY(TNC, Response, len);
|
||||||
}
|
}
|
||||||
VOID CTEXTCMD(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID CTEXTCMD(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
char Response[256];
|
char Response[256];
|
||||||
int len, n;
|
int len, n;
|
||||||
|
@ -963,10 +973,10 @@ VOID CTEXTCMD(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
SENDREPLY(TNC, Response, len);
|
SENDREPLY(TNC, Response, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID BTEXT(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID BTEXT(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
VOID VALUE(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID VALUE(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS COMMANDS WITH decimal value
|
// PROCESS COMMANDS WITH decimal value
|
||||||
|
|
||||||
|
@ -995,7 +1005,7 @@ VOID VALUE(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
SENDREPLY(TNC, Response, len);
|
SENDREPLY(TNC, Response, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID VALHEX(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID VALHEX(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
// PROCESS COMMANDS WITH decimal value
|
// PROCESS COMMANDS WITH decimal value
|
||||||
|
|
||||||
|
@ -1032,7 +1042,7 @@ VOID VALHEX(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
SENDREPLY(TNC, Response, len);
|
SENDREPLY(TNC, Response, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID APPL_VALHEX(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID APPL_VALHEX(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
int ApplNum = 1;
|
int ApplNum = 1;
|
||||||
UINT APPLMASK;
|
UINT APPLMASK;
|
||||||
|
@ -1061,7 +1071,7 @@ VOID APPL_VALHEX(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
memcpy(TNC->MYCALL, GetApplCall(ApplNum), 10);
|
memcpy(TNC->MYCALL, GetApplCall(ApplNum), 10);
|
||||||
|
|
||||||
}
|
}
|
||||||
VOID CSWITCH(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID CSWITCH(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
char Response[80];
|
char Response[80];
|
||||||
int len;
|
int len;
|
||||||
|
@ -1072,12 +1082,12 @@ VOID CSWITCH(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
CONNECTTONODE(TNC);
|
CONNECTTONODE(TNC);
|
||||||
|
|
||||||
}
|
}
|
||||||
VOID CONMODE(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID CONMODE(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
SENDREPLY(TNC, CMDMSG, 4);
|
SENDREPLY(TNC, CMDMSG, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID TNCCONV(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID TNCCONV(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
||||||
|
|
||||||
|
@ -1085,7 +1095,7 @@ VOID TNCCONV(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
TNCStream->MODEFLAG &= ~(COMMAND+TRANS);
|
TNCStream->MODEFLAG &= ~(COMMAND+TRANS);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID TNCNODE(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID TNCNODE(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
// CONNECT TO NODE
|
// CONNECT TO NODE
|
||||||
|
|
||||||
|
@ -1099,7 +1109,7 @@ VOID TNCNODE(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
CONNECTTONODE(TNC);
|
CONNECTTONODE(TNC);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID CStatus(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID CStatus(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
||||||
|
|
||||||
|
@ -1136,7 +1146,7 @@ VOID CStatus(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID TNCCONNECT(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID TNCCONNECT(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
||||||
|
|
||||||
|
@ -1179,7 +1189,7 @@ VOID TNCCONNECT(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
SENDPACKET(TNC); // Will now go to node
|
SENDPACKET(TNC); // Will now go to node
|
||||||
|
|
||||||
}
|
}
|
||||||
VOID TNCDISC(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID TNCDISC(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
||||||
|
|
||||||
|
@ -1194,7 +1204,7 @@ VOID READCHANGE(int Stream)
|
||||||
LocalSessionState(Stream, &dummy, &dummy, TRUE);
|
LocalSessionState(Stream, &dummy, &dummy, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID TNCRELEASE(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID TNCRELEASE(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
ReturntoNode(TNC->BPQPort);
|
ReturntoNode(TNC->BPQPort);
|
||||||
|
|
||||||
|
@ -1203,7 +1213,7 @@ VOID TNCRELEASE(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
|
|
||||||
SENDREPLY(TNC, CMDMSG, 4);
|
SENDREPLY(TNC, CMDMSG, 4);
|
||||||
}
|
}
|
||||||
VOID TNCTRANS(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
VOID TNCTRANS(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
struct TNC2StreamInfo * TNCStream = TNC->TNC2Stream[TNC->TXStream];
|
||||||
|
|
||||||
|
@ -1215,7 +1225,7 @@ VOID TNCTRANS(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
||||||
TNCStream->MODEFLAG |= TRANS;
|
TNCStream->MODEFLAG |= TRANS;
|
||||||
TNCStream->MODEFLAG &= ~(COMMAND+CONV);
|
TNCStream->MODEFLAG &= ~(COMMAND+CONV);
|
||||||
}
|
}
|
||||||
static VOID TNCRESTART(struct TNCDATA * TNC)
|
static VOID TNCRESTART(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
// REINITIALISE CHANNEL
|
// REINITIALISE CHANNEL
|
||||||
|
|
||||||
|
@ -1243,12 +1253,12 @@ static VOID TNCRESTART(struct TNCDATA * TNC)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static VOID TNCUNPROTOCMD(struct TNCDATA * TNC, char * Tail, CMDX * CMD)
|
static VOID TNCUNPROTOCMD(struct TNCDATA * TNC, char * Tail, TCMDX * CMD)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CMDX TNCCOMMANDLIST[] =
|
TCMDX TNCCOMMANDLIST[] =
|
||||||
{
|
{
|
||||||
"AUTOLF ",2, ONOFF, offsetof(struct TNCDATA, AUTOLF),
|
"AUTOLF ",2, ONOFF, offsetof(struct TNCDATA, AUTOLF),
|
||||||
"BBSMON ",6, ONOFF, offsetof(struct TNCDATA, BBSMON),
|
"BBSMON ",6, ONOFF, offsetof(struct TNCDATA, BBSMON),
|
||||||
|
@ -1301,7 +1311,7 @@ CMDX TNCCOMMANDLIST[] =
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int NUMBEROFTNCCOMMANDS = sizeof(TNCCOMMANDLIST)/sizeof(CMDX);
|
int NUMBEROFTNCCOMMANDS = sizeof(TNCCOMMANDLIST)/sizeof(TCMDX);
|
||||||
|
|
||||||
/*NEWVALUE DW 0
|
/*NEWVALUE DW 0
|
||||||
HEXFLAG DB 0
|
HEXFLAG DB 0
|
||||||
|
@ -2575,7 +2585,7 @@ VOID TNCCOMMAND(struct TNCDATA * TNC)
|
||||||
|
|
||||||
char * ptr, * ptr1, * ptr2;
|
char * ptr, * ptr1, * ptr2;
|
||||||
int n;
|
int n;
|
||||||
CMDX * CMD;
|
TCMDX * CMD;
|
||||||
|
|
||||||
*(--TNC->CURSOR) = 0;
|
*(--TNC->CURSOR) = 0;
|
||||||
|
|
||||||
|
@ -2653,11 +2663,8 @@ VOID TNCCOMMAND(struct TNCDATA * TNC)
|
||||||
}
|
}
|
||||||
|
|
||||||
CMD++;
|
CMD++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SENDREPLY(TNC, WHATMSG, 8);
|
SENDREPLY(TNC, WHATMSG, 8);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4926,6 +4933,7 @@ int STATUSPOLL(struct TNCDATA * TNC, struct StreamInfo * Channel)
|
||||||
|
|
||||||
int State, Change, i;
|
int State, Change, i;
|
||||||
char WorkString[256];
|
char WorkString[256];
|
||||||
|
char ConMsg[64];
|
||||||
|
|
||||||
if (TNC->MSGCHANNEL == 0) // Monitor Chan
|
if (TNC->MSGCHANNEL == 0) // Monitor Chan
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -4941,7 +4949,7 @@ int STATUSPOLL(struct TNCDATA * TNC, struct StreamInfo * Channel)
|
||||||
{
|
{
|
||||||
// DISCONNECTED
|
// DISCONNECTED
|
||||||
|
|
||||||
i = sprintf(CONMSG, "\x3(%d) DISCONNECTED fm 0:SWITCH\r", TNC->MSGCHANNEL);
|
i = sprintf(ConMsg, "\x3(%d) DISCONNECTED fm 0:SWITCH\r", TNC->MSGCHANNEL);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4950,11 +4958,11 @@ int STATUSPOLL(struct TNCDATA * TNC, struct StreamInfo * Channel)
|
||||||
|
|
||||||
GetCallsign(Channel->BPQStream, WorkString);
|
GetCallsign(Channel->BPQStream, WorkString);
|
||||||
strlop(WorkString, ' ');
|
strlop(WorkString, ' ');
|
||||||
i = sprintf(CONMSG, "\x3(%d) CONNECTED to %s\r", TNC->MSGCHANNEL, WorkString);
|
i = sprintf(ConMsg, "\x3(%d) CONNECTED to %s\r", TNC->MSGCHANNEL, WorkString);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
SENDCMDREPLY(TNC, CONMSG, i);
|
SENDCMDREPLY(TNC, ConMsg, i);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,6 @@ static HMENU hMenu, hPopMenu, hPopMenu2, hPopMenu3; // handle of menu
|
||||||
|
|
||||||
static int ProcessLine(char * buf, int Port);
|
static int ProcessLine(char * buf, int Port);
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
|
|
||||||
int DisplaySessions(struct TNCINFO * TNC);
|
int DisplaySessions(struct TNCINFO * TNC);
|
||||||
|
@ -6757,7 +6756,7 @@ extern struct DATAMESSAGE * REPLYBUFFER;
|
||||||
char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char * format, ...);
|
char * __cdecl Cmdprintf(TRANSPORTENTRY * Session, char * Bufferptr, const char * format, ...);
|
||||||
|
|
||||||
|
|
||||||
VOID RECONFIGTELNET (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID RECONFIGTELNET (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
int Port = 0, index =0;
|
int Port = 0, index =0;
|
||||||
char * ptr, *Context;
|
char * ptr, *Context;
|
||||||
|
@ -6942,7 +6941,7 @@ VOID RECONFIGTELNET (TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail,
|
||||||
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
SendCommandReply(Session, REPLYBUFFER, (int)(Bufferptr - (char *)REPLYBUFFER));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID SHOWTELNET(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD)
|
VOID SHOWTELNET(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD)
|
||||||
{
|
{
|
||||||
// DISPLAY Telnet Server Status Mheard
|
// DISPLAY Telnet Server Status Mheard
|
||||||
|
|
||||||
|
|
2
UIARQ.c
2
UIARQ.c
|
@ -869,7 +869,7 @@ static VOID ProcessFLDigiData(struct TNCINFO * TNC, UCHAR * Input, int Len, int
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// Make sure app is available
|
// Make sure app is available
|
||||||
|
|
|
@ -62,7 +62,7 @@ void ConnecttoUZ7HOThread(void * portptr);
|
||||||
void CreateMHWindow();
|
void CreateMHWindow();
|
||||||
int Update_MH_List(struct in_addr ipad, char * call, char proto);
|
int Update_MH_List(struct in_addr ipad, char * call, char proto);
|
||||||
|
|
||||||
int ConnecttoUZ7HO();
|
int ConnecttoUZ7HO(int port);
|
||||||
static int ProcessReceivedData(int bpqport);
|
static int ProcessReceivedData(int bpqport);
|
||||||
static int ProcessLine(char * buf, int Port);
|
static int ProcessLine(char * buf, int Port);
|
||||||
int KillTNC(struct TNCINFO * TNC);
|
int KillTNC(struct TNCINFO * TNC);
|
||||||
|
@ -374,7 +374,7 @@ int UZ7HOSetFreq(int port, struct TNCINFO * TNC, struct AGWINFO * AGW, PDATAMESS
|
||||||
{
|
{
|
||||||
// Read Freq
|
// Read Freq
|
||||||
|
|
||||||
buffptr->Len = sprintf((UCHAR *)&buffptr->Data[0], "UZ7HO} Modem Freqency %d\r", AGW->CenterFreq);
|
buffptr->Len = sprintf((UCHAR *)&buffptr->Data[0], "UZ7HO} Modem Frequency %d\r", AGW->CenterFreq);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2479,7 +2479,7 @@ GotStream:
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// Make sure app is available
|
// Make sure app is available
|
||||||
|
|
2
V4.c
2
V4.c
|
@ -1273,7 +1273,7 @@ static VOID ProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen)
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// Make sure app is available
|
// Make sure app is available
|
||||||
|
|
2
VARA.c
2
VARA.c
|
@ -2231,7 +2231,7 @@ VOID VARAProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen)
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// if SendTandRtoRelay set and Appl is RMS change to RELAY
|
// if SendTandRtoRelay set and Appl is RMS change to RELAY
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define KVers 6,0,24,50
|
#define KVers 6,0,24,54
|
||||||
#define KVerstring "6.0.24.50\0"
|
#define KVerstring "6.0.24.54\0"
|
||||||
|
|
||||||
#ifdef CKernel
|
#ifdef CKernel
|
||||||
|
|
||||||
#define Vers KVers
|
#define Vers KVers
|
||||||
#define Verstring KVerstring
|
#define Verstring KVerstring
|
||||||
#define Datestring "October 2024"
|
#define Datestring "December 2024"
|
||||||
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
|
#define VerComments "G8BPQ Packet Switch (C Version)" KVerstring
|
||||||
#define VerCopyright "Copyright © 2001-2024 John Wiseman G8BPQ\0"
|
#define VerCopyright "Copyright © 2001-2024 John Wiseman G8BPQ\0"
|
||||||
#define VerDesc "BPQ32 Switch\0"
|
#define VerDesc "BPQ32 Switch\0"
|
||||||
|
|
4
WINMOR.c
4
WINMOR.c
|
@ -508,7 +508,7 @@ static int ProcessLine(char * buf, int Port)
|
||||||
|
|
||||||
void WINMORThread(void * portptr);
|
void WINMORThread(void * portptr);
|
||||||
VOID ProcessDataSocketData(int port);
|
VOID ProcessDataSocketData(int port);
|
||||||
int ConnecttoWINMOR();
|
int ConnecttoWINMOR(int port);
|
||||||
static int ProcessReceivedData(struct TNCINFO * TNC);
|
static int ProcessReceivedData(struct TNCINFO * TNC);
|
||||||
int V4ProcessReceivedData(struct TNCINFO * TNC);
|
int V4ProcessReceivedData(struct TNCINFO * TNC);
|
||||||
VOID ReleaseTNC(struct TNCINFO * TNC);
|
VOID ReleaseTNC(struct TNCINFO * TNC);
|
||||||
|
@ -2231,7 +2231,7 @@ VOID ProcessResponse(struct TNCINFO * TNC, UCHAR * Buffer, int MsgLen)
|
||||||
{
|
{
|
||||||
char AppName[13];
|
char AppName[13];
|
||||||
|
|
||||||
memcpy(AppName, &ApplPtr[App * sizeof(CMDX)], 12);
|
memcpy(AppName, &ApplPtr[App * sizeof(struct CMDX)], 12);
|
||||||
AppName[12] = 0;
|
AppName[12] = 0;
|
||||||
|
|
||||||
// Make sure app is available
|
// Make sure app is available
|
||||||
|
|
11
WPRoutines.c
11
WPRoutines.c
|
@ -34,6 +34,7 @@ VOID Do_Save_WPRec(HWND hDlg);
|
||||||
VOID SaveInt64Value(config_setting_t * group, char * name, long long value);
|
VOID SaveInt64Value(config_setting_t * group, char * name, long long value);
|
||||||
VOID SaveIntValue(config_setting_t * group, char * name, int value);
|
VOID SaveIntValue(config_setting_t * group, char * name, int value);
|
||||||
VOID SaveStringValue(config_setting_t * group, char * name, char * value);
|
VOID SaveStringValue(config_setting_t * group, char * name, char * value);
|
||||||
|
void MQTTMessageEvent(void* message);
|
||||||
|
|
||||||
WPRec * AllocateWPRecord()
|
WPRec * AllocateWPRecord()
|
||||||
{
|
{
|
||||||
|
@ -1416,7 +1417,7 @@ int CreateWPMessage()
|
||||||
// if (ptr->last_modif > LASTWPSendTime && ptr->Type == 'U' && ptr->first_homebbs[0])
|
// if (ptr->last_modif > LASTWPSendTime && ptr->Type == 'U' && ptr->first_homebbs[0])
|
||||||
if (ptr->changed && ptr->last_modif > LASTWPSendTime && ptr->first_homebbs[0])
|
if (ptr->changed && ptr->last_modif > LASTWPSendTime && ptr->first_homebbs[0])
|
||||||
{
|
{
|
||||||
tm = gmtime(&ptr->last_modif);
|
tm = gmtime((time_t *)&ptr->last_modif);
|
||||||
MsgLen += sprintf(Buffptr, "On %02d%02d%02d %s/%c @ %s zip %s %s %s\r\n",
|
MsgLen += sprintf(Buffptr, "On %02d%02d%02d %s/%c @ %s zip %s %s %s\r\n",
|
||||||
tm->tm_year-100, tm->tm_mon+1, tm->tm_mday,
|
tm->tm_year-100, tm->tm_mon+1, tm->tm_mday,
|
||||||
ptr->callsign, ptr->Type, ptr->first_homebbs,
|
ptr->callsign, ptr->Type, ptr->first_homebbs,
|
||||||
|
@ -1495,6 +1496,10 @@ int CreateWPMessage()
|
||||||
|
|
||||||
BuildNNTPList(Msg); // Build NNTP Groups list
|
BuildNNTPList(Msg); // Build NNTP Groups list
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
To++;
|
To++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1533,8 +1538,8 @@ VOID CreateWPReport()
|
||||||
len = sprintf(Line, "%-7s,%c,%s,%s,%s,%s,%s,%s,%s,%d,%s,%s\r\n",
|
len = sprintf(Line, "%-7s,%c,%s,%s,%s,%s,%s,%s,%s,%d,%s,%s\r\n",
|
||||||
WP->callsign, WP->Type, WP->first_homebbs, WP->first_qth, WP->first_zip,
|
WP->callsign, WP->Type, WP->first_homebbs, WP->first_qth, WP->first_zip,
|
||||||
WP->secnd_homebbs, WP->secnd_qth, WP->secnd_zip, WP->name, WP->changed,
|
WP->secnd_homebbs, WP->secnd_qth, WP->secnd_zip, WP->name, WP->changed,
|
||||||
FormatWPDate(WP->last_modif),
|
FormatWPDate((time_t)WP->last_modif),
|
||||||
FormatWPDate(WP->last_seen));
|
FormatWPDate((time_t)WP->last_seen));
|
||||||
|
|
||||||
fwrite(Line, 1, len, hFile);
|
fwrite(Line, 1, len, hFile);
|
||||||
}
|
}
|
||||||
|
|
20
WebMail.c
20
WebMail.c
|
@ -78,6 +78,7 @@ char * doXMLTransparency(char * string);
|
||||||
Dll BOOL APIENTRY APISendAPRSMessage(char * Text, char * ToCall);
|
Dll BOOL APIENTRY APISendAPRSMessage(char * Text, char * ToCall);
|
||||||
void SendMessageReadEvent(char * Call, struct MsgInfo * Msg);
|
void SendMessageReadEvent(char * Call, struct MsgInfo * Msg);
|
||||||
void SendNewMessageEvent(char * call, struct MsgInfo * Msg);
|
void SendNewMessageEvent(char * call, struct MsgInfo * Msg);
|
||||||
|
void MQTTMessageEvent(void* message);
|
||||||
|
|
||||||
extern char NodeTail[];
|
extern char NodeTail[];
|
||||||
extern char BBSName[10];
|
extern char BBSName[10];
|
||||||
|
@ -2020,7 +2021,7 @@ void ProcessWebMailMessage(struct HTTPConnectionInfo * Session, char * Key, BOOL
|
||||||
"document.getElementById('myform').action = '/WebMail/QuoteOriginal' + '?%s';"
|
"document.getElementById('myform').action = '/WebMail/QuoteOriginal' + '?%s';"
|
||||||
" document.getElementById('myform').submit();}</script>"
|
" document.getElementById('myform').submit();}</script>"
|
||||||
"<input type=button class='btn' onclick='myfunc()' "
|
"<input type=button class='btn' onclick='myfunc()' "
|
||||||
"value='Include Orignal Msg'>";
|
"value='Include Original Msg'>";
|
||||||
|
|
||||||
char Temp[1024];
|
char Temp[1024];
|
||||||
char ReplyAddr[128];
|
char ReplyAddr[128];
|
||||||
|
@ -2840,6 +2841,11 @@ VOID SaveNewMessage(struct HTTPConnectionInfo * Session, char * MsgPtr, char * R
|
||||||
|
|
||||||
SendNewMessageEvent(user->Call, Msg);
|
SendNewMessageEvent(user->Call, Msg);
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (user && (user->flags & F_APRSMFOR))
|
if (user && (user->flags & F_APRSMFOR))
|
||||||
{
|
{
|
||||||
char APRS[128];
|
char APRS[128];
|
||||||
|
@ -3784,6 +3790,12 @@ VOID WriteOneRecipient(struct MsgInfo * Msg, WebMailInfo * WebMail, int MsgLen,
|
||||||
Msg->status = '$'; // Has forwarding
|
Msg->status = '$'; // Has forwarding
|
||||||
|
|
||||||
BuildNNTPList(Msg); // Build NNTP Groups list
|
BuildNNTPList(Msg); // Build NNTP Groups list
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4368,6 +4380,12 @@ VOID BuildMessageFromHTMLInput(struct HTTPConnectionInfo * Session, char * Reply
|
||||||
|
|
||||||
BuildNNTPList(Msg); // Build NNTP Groups list
|
BuildNNTPList(Msg); // Build NNTP Groups list
|
||||||
|
|
||||||
|
#ifndef NOMQTT
|
||||||
|
if (MQTT)
|
||||||
|
MQTTMessageEvent(Msg);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
SaveMessageDatabase();
|
SaveMessageDatabase();
|
||||||
SaveBIDDatabase();
|
SaveBIDDatabase();
|
||||||
|
|
||||||
|
|
2
WinRPR.c
2
WinRPR.c
|
@ -63,8 +63,6 @@ extern char LOC[];
|
||||||
static RECT Rect;
|
static RECT Rect;
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
VOID __cdecl Debugprintf(const char * format, ...);
|
||||||
char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
char NodeCall[11]; // Nodecall, Null Terminated
|
char NodeCall[11]; // Nodecall, Null Terminated
|
||||||
|
|
||||||
static BOOL WriteCommBlock(struct TNCINFO * TNC);
|
static BOOL WriteCommBlock(struct TNCINFO * TNC);
|
||||||
|
|
|
@ -111,7 +111,7 @@ int main(int argc, char ** argv)
|
||||||
|
|
||||||
if (argc < 3)
|
if (argc < 3)
|
||||||
{
|
{
|
||||||
printf ("Missing paramters - you need COM port and IP Address and rigctl port of BPQ, eg \r\n"
|
printf ("Missing parameters - you need COM port and IP Address and rigctl port of BPQ, eg \r\n"
|
||||||
" WinRPRHelper com10 192.168.1.64:4532\r\n\r\n"
|
" WinRPRHelper com10 192.168.1.64:4532\r\n\r\n"
|
||||||
"Press any key to exit\r\n");
|
"Press any key to exit\r\n");
|
||||||
|
|
||||||
|
|
1
adif.c
1
adif.c
|
@ -609,7 +609,6 @@ VOID ADIFWriteFreqList()
|
||||||
|
|
||||||
fprintf(Handle, "[Channels]\r\n");
|
fprintf(Handle, "[Channels]\r\n");
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < freqCount; i++)
|
for (i = 0; i < freqCount; i++)
|
||||||
fprintf(Handle, "Frequency %d=%lld\r\n" , i + 1, Freqs[i]);
|
fprintf(Handle, "Frequency %d=%lld\r\n" , i + 1, Freqs[i]);
|
||||||
|
|
||||||
|
|
28
asmstrucs.h
28
asmstrucs.h
|
@ -62,15 +62,15 @@ extern int ENDOFDATA;
|
||||||
extern int L3LIVES;
|
extern int L3LIVES;
|
||||||
extern int NUMBEROFNODES;
|
extern int NUMBEROFNODES;
|
||||||
|
|
||||||
typedef struct _CMDX
|
struct CMDX
|
||||||
{
|
{
|
||||||
char String[12]; // COMMAND STRING
|
char String[12]; // COMMAND STRING
|
||||||
UCHAR CMDLEN; // SIGNIFICANT LENGTH
|
UCHAR CMDLEN; // SIGNIFICANT LENGTH
|
||||||
VOID (* CMDPROC)(); // COMMAND PROCESSOR
|
// VOID (*CMDPROC)(struct _TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);// COMMAND PROCESSOR
|
||||||
|
VOID (*CMDPROC)();// COMMAND PROCESSOR
|
||||||
size_t CMDFLAG; // FLAG/VALUE Offset
|
size_t CMDFLAG; // FLAG/VALUE Offset
|
||||||
|
|
||||||
} CMDX;
|
};
|
||||||
|
|
||||||
|
|
||||||
struct APPLCONFIG
|
struct APPLCONFIG
|
||||||
{
|
{
|
||||||
|
@ -547,14 +547,14 @@ typedef struct PORTCONTROL
|
||||||
PMESSAGE PORTRX_Q; // FRAMES RECEIVED ON THIS PORT
|
PMESSAGE PORTRX_Q; // FRAMES RECEIVED ON THIS PORT
|
||||||
PMESSAGE PORTTX_Q; // FRAMES TO BE SENT ON THIS PORT
|
PMESSAGE PORTTX_Q; // FRAMES TO BE SENT ON THIS PORT
|
||||||
|
|
||||||
void (FAR * PORTTXROUTINE)(); // POINTER TO TRANSMIT ROUTINE FOR THIS PORT
|
void (FAR * PORTTXROUTINE)(struct _EXTPORTDATA * PORTVEC, MESSAGE * Buffer); // POINTER TO TRANSMIT ROUTINE FOR THIS PORT
|
||||||
void (FAR * PORTRXROUTINE)(); // POINTER TO RECEIVE ROUTINE FOR THIS PORT
|
void (FAR * PORTRXROUTINE)(struct _EXTPORTDATA * PORTVEC); // POINTER TO RECEIVE ROUTINE FOR THIS PORT
|
||||||
void (FAR * PORTINITCODE)(); // INITIALISATION ROUTINE
|
void (FAR * PORTINITCODE)(struct PORTCONTROL * PortVector); // INITIALISATION ROUTINE
|
||||||
void (FAR * PORTTIMERCODE)(); //
|
void (FAR * PORTTIMERCODE)(struct PORTCONTROL * PortVector); //
|
||||||
void (FAR * PORTCLOSECODE)(); // CLOSE ROUTINE
|
void (FAR * PORTCLOSECODE)(struct PORTCONTROL * PortVector); // CLOSE ROUTINE
|
||||||
int (FAR * PORTTXCHECKCODE)(); // OK to TX Check
|
int (FAR * PORTTXCHECKCODE)(struct PORTCONTROL * PORTVEC, int Chan); // OK to TX Check
|
||||||
BOOL (FAR * PORTSTOPCODE)(); // Temporarily Stop Port
|
BOOL (FAR * PORTSTOPCODE)(struct PORTCONTROL * PORT); // Temporarily Stop Port
|
||||||
BOOL (FAR * PORTSTARTCODE)(); // Restart Port
|
BOOL (FAR * PORTSTARTCODE)(struct PORTCONTROL * PORT); // Restart Port
|
||||||
BOOL PortStopped; // STOPPORT command used
|
BOOL PortStopped; // STOPPORT command used
|
||||||
BOOL PortSuspended; // Suspended by interlock
|
BOOL PortSuspended; // Suspended by interlock
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@ typedef struct PORTCONTROL
|
||||||
BOOL IgnoreUnlocked; // Ignore Unlocked routes
|
BOOL IgnoreUnlocked; // Ignore Unlocked routes
|
||||||
BOOL INP3ONLY; // Default to INP3 and disallow NODES
|
BOOL INP3ONLY; // Default to INP3 and disallow NODES
|
||||||
|
|
||||||
FARPROCY UIHook; // Used for KISSARQ
|
void (* UIHook)(struct _LINKTABLE * LINK, struct PORTCONTROL * PORT, MESSAGE * Buffer, MESSAGE * ADJBUFFER, UCHAR CTL, UCHAR MSGFLAG); // Used for KISSARQ
|
||||||
struct PORTCONTROL * HookPort;
|
struct PORTCONTROL * HookPort;
|
||||||
int PortSlot; // Index in Port Table
|
int PortSlot; // Index in Port Table
|
||||||
struct TNCINFO * TNC; // Associated TNC record
|
struct TNCINFO * TNC; // Associated TNC record
|
||||||
|
@ -766,7 +766,7 @@ typedef struct _EXTPORTDATA
|
||||||
{
|
{
|
||||||
struct PORTCONTROL PORTCONTROL ; // REMAP HARDWARE INFO
|
struct PORTCONTROL PORTCONTROL ; // REMAP HARDWARE INFO
|
||||||
|
|
||||||
void * (* PORT_EXT_ADDR) (); // ADDR OF RESIDENT ROUTINE
|
void * (* PORT_EXT_ADDR) (int fn, int port, PDATAMESSAGE buff); // ADDR OF RESIDENT ROUTINE
|
||||||
char PORT_DLL_NAME[16];
|
char PORT_DLL_NAME[16];
|
||||||
UCHAR EXTRESTART; // FLAG FOR DRIVER REINIT
|
UCHAR EXTRESTART; // FLAG FOR DRIVER REINIT
|
||||||
HINSTANCE DLLhandle;
|
HINSTANCE DLLhandle;
|
||||||
|
|
|
@ -194,7 +194,7 @@ extern int OffsetH, OffsetW;
|
||||||
|
|
||||||
static void ResolveNames(struct AXIPPORTINFO * PORT);
|
static void ResolveNames(struct AXIPPORTINFO * PORT);
|
||||||
void OpenSockets(struct AXIPPORTINFO * PORT);
|
void OpenSockets(struct AXIPPORTINFO * PORT);
|
||||||
void CloseSockets();
|
void CloseSockets(struct AXIPPORTINFO * PORT);
|
||||||
|
|
||||||
|
|
||||||
static int CONVFROMAX25(char * incall, char * outcall);
|
static int CONVFROMAX25(char * incall, char * outcall);
|
||||||
|
|
|
@ -603,7 +603,7 @@ VOID __cdecl nprintf(ChatCIRCUIT * conn, const char * format, ...);
|
||||||
VOID nputs(ChatCIRCUIT * conn, char * buf);
|
VOID nputs(ChatCIRCUIT * conn, char * buf);
|
||||||
#endif
|
#endif
|
||||||
BOOL matchi(char * p1, char * p2);
|
BOOL matchi(char * p1, char * p2);
|
||||||
char * strlop(char * buf, char delim);
|
char * strlop(const char * buf, char delim);
|
||||||
int rt_cmd(ChatCIRCUIT *circuit, char * Buffer);
|
int rt_cmd(ChatCIRCUIT *circuit, char * Buffer);
|
||||||
ChatCIRCUIT *circuit_new(ChatCIRCUIT *circuit, int flags);
|
ChatCIRCUIT *circuit_new(ChatCIRCUIT *circuit, int flags);
|
||||||
void makelinks(void);
|
void makelinks(void);
|
||||||
|
|
18
bpqmail.h
18
bpqmail.h
|
@ -471,6 +471,8 @@ struct UserInfo
|
||||||
{
|
{
|
||||||
// New Format - with stats maintained by message type and unused fields removed.
|
// New Format - with stats maintained by message type and unused fields removed.
|
||||||
|
|
||||||
|
// This is no longer a fixed length record so can't be saved as a binarl
|
||||||
|
|
||||||
char Call[10]; // Connected call without SSID
|
char Call[10]; // Connected call without SSID
|
||||||
|
|
||||||
int Length; // To make subsequent format changes easier
|
int Length; // To make subsequent format changes easier
|
||||||
|
@ -643,9 +645,9 @@ struct MsgInfo
|
||||||
// For 64 bit time_t compatibility define as long long
|
// For 64 bit time_t compatibility define as long long
|
||||||
// (so struct is same with 32 or 64 bit time_t)
|
// (so struct is same with 32 or 64 bit time_t)
|
||||||
|
|
||||||
long long datereceived;
|
int64_t datereceived;
|
||||||
long long datecreated;
|
int64_t datecreated;
|
||||||
long long datechanged;
|
int64_t datechanged;
|
||||||
|
|
||||||
char Spare[61 - 24]; // For future use
|
char Spare[61 - 24]; // For future use
|
||||||
} ;
|
} ;
|
||||||
|
@ -877,7 +879,7 @@ struct MSESSION
|
||||||
};
|
};
|
||||||
|
|
||||||
VOID __cdecl nprintf(CIRCUIT * conn, const char * format, ...);
|
VOID __cdecl nprintf(CIRCUIT * conn, const char * format, ...);
|
||||||
char * strlop(char * buf, char delim);
|
char * strlop(const char * buf, char delim);
|
||||||
int rt_cmd(CIRCUIT *circuit, char * Buffer);
|
int rt_cmd(CIRCUIT *circuit, char * Buffer);
|
||||||
CIRCUIT *circuit_new(CIRCUIT *circuit, int flags);
|
CIRCUIT *circuit_new(CIRCUIT *circuit, int flags);
|
||||||
VOID BBSputs(CIRCUIT * conn, char * buf);
|
VOID BBSputs(CIRCUIT * conn, char * buf);
|
||||||
|
@ -1191,6 +1193,7 @@ BOOL FBBDoForward(CIRCUIT * conn);
|
||||||
BOOL FindMessagestoForward(CIRCUIT * conn);
|
BOOL FindMessagestoForward(CIRCUIT * conn);
|
||||||
BOOL SeeifMessagestoForward(int BBSNumber, CIRCUIT * Conn);
|
BOOL SeeifMessagestoForward(int BBSNumber, CIRCUIT * Conn);
|
||||||
int CountMessagestoForward(struct UserInfo * user);
|
int CountMessagestoForward(struct UserInfo * user);
|
||||||
|
int CountBytestoForward(struct UserInfo * user);
|
||||||
|
|
||||||
VOID * GetMultiLineDialogParam(HWND hDialog, int DLGItem);
|
VOID * GetMultiLineDialogParam(HWND hDialog, int DLGItem);
|
||||||
|
|
||||||
|
@ -1210,10 +1213,9 @@ VOID Do_Delete_User(HWND hDlg);
|
||||||
VOID FlagSentMessages(CIRCUIT * conn, struct UserInfo * user);
|
VOID FlagSentMessages(CIRCUIT * conn, struct UserInfo * user);
|
||||||
VOID HoldSentMessages(CIRCUIT * conn, struct UserInfo * user);
|
VOID HoldSentMessages(CIRCUIT * conn, struct UserInfo * user);
|
||||||
VOID Do_Save_User(HWND hDlg, BOOL ShowBox);
|
VOID Do_Save_User(HWND hDlg, BOOL ShowBox);
|
||||||
VOID DeleteBBS();
|
VOID DeleteBBS(struct UserInfo * user);
|
||||||
VOID AddBBS();
|
|
||||||
VOID SaveBBSConfig();
|
VOID SaveBBSConfig();
|
||||||
BOOL GetChatConfig();
|
BOOL GetChatConfig(char * ConfigName);
|
||||||
VOID SaveChatConfig();
|
VOID SaveChatConfig();
|
||||||
VOID SaveISPConfig();
|
VOID SaveISPConfig();
|
||||||
VOID SaveFWDConfig();
|
VOID SaveFWDConfig();
|
||||||
|
@ -1633,6 +1635,8 @@ extern char ** SendWPAddrs; // Replacers WP To and VIA
|
||||||
|
|
||||||
extern BOOL DontCheckFromCall;
|
extern BOOL DontCheckFromCall;
|
||||||
|
|
||||||
|
extern time_t APIClock;;
|
||||||
|
|
||||||
// YAPP stuff
|
// YAPP stuff
|
||||||
|
|
||||||
#define SOH 1
|
#define SOH 1
|
||||||
|
|
64
cMain.c
64
cMain.c
|
@ -42,7 +42,7 @@ VOID L2Routine(struct PORTCONTROL * PORT, PMESSAGE Buffer);
|
||||||
VOID ProcessIframe(struct _LINKTABLE * LINK, PDATAMESSAGE Buffer);
|
VOID ProcessIframe(struct _LINKTABLE * LINK, PDATAMESSAGE Buffer);
|
||||||
VOID FindLostBuffers();
|
VOID FindLostBuffers();
|
||||||
VOID ReadMH();
|
VOID ReadMH();
|
||||||
void GetPortCTEXT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, CMDX * CMD);
|
void GetPortCTEXT(TRANSPORTENTRY * Session, char * Bufferptr, char * CmdTail, struct CMDX * CMD);
|
||||||
int upnpInit();
|
int upnpInit();
|
||||||
void AISTimer();
|
void AISTimer();
|
||||||
void ADSBTimer();
|
void ADSBTimer();
|
||||||
|
@ -50,6 +50,7 @@ VOID SendSmartID(struct PORTCONTROL * PORT);
|
||||||
int CanPortDigi(int Port);
|
int CanPortDigi(int Port);
|
||||||
int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len);
|
int KissEncode(UCHAR * inbuff, UCHAR * outbuff, int len);
|
||||||
void MQTTTimer();
|
void MQTTTimer();
|
||||||
|
void SaveMH();
|
||||||
|
|
||||||
#include "configstructs.h"
|
#include "configstructs.h"
|
||||||
|
|
||||||
|
@ -331,7 +332,7 @@ BOOL LINKTXCHECK()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void * Dummy() // Dummy for missing EXT Driver
|
void * Dummy(int fn, int port, PDATAMESSAGE buff) // Dummy for missing EXT Driver
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -340,26 +341,31 @@ VOID EXTINIT(PEXTPORTDATA PORTVEC)
|
||||||
{
|
{
|
||||||
// LOAD DLL - NAME IS IN PORT_DLL_NAME
|
// LOAD DLL - NAME IS IN PORT_DLL_NAME
|
||||||
|
|
||||||
VOID * Routine;
|
void *(* Startup) (PEXTPORTDATA PORTVEC); // ADDR OF Startup ROUTINE
|
||||||
|
|
||||||
PORTVEC->PORT_EXT_ADDR = Dummy;
|
PORTVEC->PORT_EXT_ADDR = Dummy;
|
||||||
|
|
||||||
Routine = InitializeExtDriver(PORTVEC);
|
Startup = InitializeExtDriver(PORTVEC);
|
||||||
|
|
||||||
if (Routine == 0)
|
if (Startup == 0)
|
||||||
{
|
{
|
||||||
WritetoConsoleLocal("Driver installation failed\n");
|
WritetoConsoleLocal("Driver installation failed\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PORTVEC->PORT_EXT_ADDR = Routine;
|
|
||||||
|
|
||||||
// ALSO CALL THE ROUTINE TO START IT UP, ESPECIALLY IF A L2 ROUTINE
|
|
||||||
|
|
||||||
Routine = (VOID *)PORTVEC->PORT_EXT_ADDR(PORTVEC);
|
// CALL THE ROUTINE TO START IT UP
|
||||||
|
|
||||||
// Startup returns address of processing routine
|
// Startup returns address of processing routine
|
||||||
|
|
||||||
PORTVEC->PORT_EXT_ADDR = Routine;
|
PORTVEC->PORT_EXT_ADDR = (void *(__cdecl *)(int,int,PDATAMESSAGE))Startup(PORTVEC);;
|
||||||
|
|
||||||
|
if (PORTVEC->PORT_EXT_ADDR == 0)
|
||||||
|
{
|
||||||
|
WritetoConsoleLocal("Driver Initialisation failed\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID EXTTX(PEXTPORTDATA PORTVEC, MESSAGE * Buffer)
|
VOID EXTTX(PEXTPORTDATA PORTVEC, MESSAGE * Buffer)
|
||||||
|
@ -371,7 +377,7 @@ VOID EXTTX(PEXTPORTDATA PORTVEC, MESSAGE * Buffer)
|
||||||
|
|
||||||
if (PORT->KISSFLAGS == 255) // Used for BAYCOM
|
if (PORT->KISSFLAGS == 255) // Used for BAYCOM
|
||||||
{
|
{
|
||||||
PORTVEC->PORT_EXT_ADDR(2, PORT->PORTNUMBER, Buffer);
|
PORTVEC->PORT_EXT_ADDR(2, PORT->PORTNUMBER, (PDATAMESSAGE)Buffer);
|
||||||
|
|
||||||
return; // Baycom driver passes frames to trace once sent
|
return; // Baycom driver passes frames to trace once sent
|
||||||
}
|
}
|
||||||
|
@ -387,7 +393,7 @@ VOID EXTTX(PEXTPORTDATA PORTVEC, MESSAGE * Buffer)
|
||||||
Buffer->Linkptr = 0; // CLEAR FLAG FROM BUFFER
|
Buffer->Linkptr = 0; // CLEAR FLAG FROM BUFFER
|
||||||
}
|
}
|
||||||
|
|
||||||
PORTVEC->PORT_EXT_ADDR(2, PORT->PORTNUMBER, Buffer);
|
PORTVEC->PORT_EXT_ADDR(2, PORT->PORTNUMBER, (PDATAMESSAGE)Buffer);
|
||||||
|
|
||||||
if (PORT->PROTOCOL == 10 && PORT->TNC && PORT->TNC->Hardware != H_KISSHF)
|
if (PORT->PROTOCOL == 10 && PORT->TNC && PORT->TNC->Hardware != H_KISSHF)
|
||||||
{
|
{
|
||||||
|
@ -417,7 +423,7 @@ Loop:
|
||||||
if (Message == NULL)
|
if (Message == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Len = (size_t)PORTVEC->PORT_EXT_ADDR(1, PORT->PORTNUMBER, Message);
|
Len = (size_t)PORTVEC->PORT_EXT_ADDR(1, PORT->PORTNUMBER, (PDATAMESSAGE)Message);
|
||||||
|
|
||||||
if (Len == 0)
|
if (Len == 0)
|
||||||
{
|
{
|
||||||
|
@ -501,7 +507,9 @@ VOID EXTSLOWTIMER(PEXTPORTDATA PORTVEC)
|
||||||
|
|
||||||
size_t EXTTXCHECK(PEXTPORTDATA PORTVEC, int Chan)
|
size_t EXTTXCHECK(PEXTPORTDATA PORTVEC, int Chan)
|
||||||
{
|
{
|
||||||
return (size_t)PORTVEC->PORT_EXT_ADDR(3, PORTVEC->PORTCONTROL.PORTNUMBER, Chan);
|
uintptr_t Temp = Chan;
|
||||||
|
|
||||||
|
return (size_t)PORTVEC->PORT_EXT_ADDR(3, PORTVEC->PORTCONTROL.PORTNUMBER, (void *)Temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID PostDataAvailable(TRANSPORTENTRY * Session)
|
VOID PostDataAvailable(TRANSPORTENTRY * Session)
|
||||||
|
@ -577,8 +585,8 @@ extern VOID HDLCTXCHECK();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern VOID KISSINIT(), KISSTX(), KISSRX(), KISSTIMER(), KISSCLOSE();
|
extern VOID KISSINIT(), KISSTX(), KISSRX(), KISSTIMER(), KISSCLOSE();
|
||||||
extern VOID EXTINIT(), EXTTX(), LINKRX(), EXTRX();
|
extern VOID EXTINIT(PEXTPORTDATA PORTVEC), EXTTX(PEXTPORTDATA PORTVEC, MESSAGE * Buffer), LINKRX(), EXTRX(PEXTPORTDATA PORTVEC);
|
||||||
extern VOID LINKCLOSE(), EXTCLOSE() ,LINKTIMER(), EXTTIMER();
|
extern VOID LINKCLOSE(), EXTCLOSE() ,LINKTIMER(), EXTTIMER(PEXTPORTDATA PORTVEC);
|
||||||
|
|
||||||
// VECTORS TO HARDWARE DEPENDENT ROUTINES
|
// VECTORS TO HARDWARE DEPENDENT ROUTINES
|
||||||
|
|
||||||
|
@ -608,7 +616,7 @@ extern int L4TimerProc();
|
||||||
extern int L3FastTimer();
|
extern int L3FastTimer();
|
||||||
extern int StatsTimer();
|
extern int StatsTimer();
|
||||||
extern int COMMANDHANDLER();
|
extern int COMMANDHANDLER();
|
||||||
extern int SDETX();
|
VOID SDETX(struct _LINKTABLE * LINK);
|
||||||
extern int L4BG();
|
extern int L4BG();
|
||||||
extern int L3BG();
|
extern int L3BG();
|
||||||
extern int TNCTimerProc();
|
extern int TNCTimerProc();
|
||||||
|
@ -627,7 +635,7 @@ BOOL Start()
|
||||||
APPLCALLS * APPL;
|
APPLCALLS * APPL;
|
||||||
struct ROUTE * ROUTE;
|
struct ROUTE * ROUTE;
|
||||||
struct DEST_LIST * DEST;
|
struct DEST_LIST * DEST;
|
||||||
CMDX * CMD;
|
struct CMDX * CMD;
|
||||||
int PortSlot = 1;
|
int PortSlot = 1;
|
||||||
uintptr_t int3;
|
uintptr_t int3;
|
||||||
|
|
||||||
|
@ -911,7 +919,7 @@ BOOL Start()
|
||||||
PORT->PROTOCOL = (char)PortRec->PROTOCOL;
|
PORT->PROTOCOL = (char)PortRec->PROTOCOL;
|
||||||
PORT->IOBASE = PortRec->IOADDR;
|
PORT->IOBASE = PortRec->IOADDR;
|
||||||
|
|
||||||
if (PortRec->SerialPortName[0])
|
if (PortRec->SerialPortName && PortRec->SerialPortName[0])
|
||||||
PORT->SerialPortName = _strdup(PortRec->SerialPortName);
|
PORT->SerialPortName = _strdup(PortRec->SerialPortName);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1507,7 +1515,7 @@ BOOL Start()
|
||||||
|
|
||||||
upnpInit();
|
upnpInit();
|
||||||
|
|
||||||
CurrentSecs = lastSlowSecs = time(NULL);
|
lastSaveSecs = CurrentSecs = lastSlowSecs = time(NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2106,6 +2114,18 @@ VOID TIMERINTERRUPT()
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check Autosave Nodes and MH timer
|
||||||
|
|
||||||
|
if (CurrentSecs - lastSaveSecs >= 3600) // 1 per hour
|
||||||
|
{
|
||||||
|
lastSaveSecs = CurrentSecs;
|
||||||
|
|
||||||
|
if (AUTOSAVE == 1)
|
||||||
|
SaveNodes();
|
||||||
|
if (AUTOSAVEMH == 1)
|
||||||
|
SaveMH();
|
||||||
|
}
|
||||||
|
|
||||||
if (L4TIMERFLAG >= 10) // 1 PER SEC
|
if (L4TIMERFLAG >= 10) // 1 PER SEC
|
||||||
{
|
{
|
||||||
L4TIMERFLAG -= 10;
|
L4TIMERFLAG -= 10;
|
||||||
|
@ -2329,7 +2349,7 @@ L2Packet:
|
||||||
PORT->L2FRAMESSENT++;
|
PORT->L2FRAMESSENT++;
|
||||||
OutOctets[PORT->PORTNUMBER] += Buffer->LENGTH - MSGHDDRLEN;
|
OutOctets[PORT->PORTNUMBER] += Buffer->LENGTH - MSGHDDRLEN;
|
||||||
|
|
||||||
PORT->PORTTXROUTINE(PORT, Buffer);
|
PORT->PORTTXROUTINE((struct _EXTPORTDATA *)PORT, Buffer);
|
||||||
Sent++;
|
Sent++;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
@ -2375,7 +2395,7 @@ PACTORLOOP:
|
||||||
PORT->L2FRAMESSENT++;
|
PORT->L2FRAMESSENT++;
|
||||||
OutOctets[PORT->PORTNUMBER] += Message->LENGTH;
|
OutOctets[PORT->PORTNUMBER] += Message->LENGTH;
|
||||||
|
|
||||||
PORT->PORTTXROUTINE(PORT, Buffer);
|
PORT->PORTTXROUTINE((struct _EXTPORTDATA *)PORT, Buffer);
|
||||||
Sent++;
|
Sent++;
|
||||||
|
|
||||||
if (Sent < 5)
|
if (Sent < 5)
|
||||||
|
@ -2388,7 +2408,7 @@ ENDOFLIST:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PORT->PORTRXROUTINE(PORT); // SEE IF MESSAGE RECEIVED
|
PORT->PORTRXROUTINE((struct _EXTPORTDATA *)PORT); // SEE IF MESSAGE RECEIVED
|
||||||
PORT = PORT->PORTPOINTER;
|
PORT = PORT->PORTPOINTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,10 +208,6 @@ VOID md5(char *arg, unsigned char * checksum);
|
||||||
int APIENTRY SendRaw(int port, char * msg, int len);
|
int APIENTRY SendRaw(int port, char * msg, int len);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BOOL MySetDlgItemText();
|
|
||||||
|
|
||||||
VOID OutputDebugString(char * string);
|
VOID OutputDebugString(char * string);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
79
config.c
79
config.c
|
@ -174,15 +174,20 @@ extern BOOL Loopflag;
|
||||||
extern char NodeMapServer[80];
|
extern char NodeMapServer[80];
|
||||||
extern char ChatMapServer[80];
|
extern char ChatMapServer[80];
|
||||||
|
|
||||||
|
double LatFromLOC;
|
||||||
|
double LonFromLOC;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID * zalloc(int len);
|
VOID * zalloc(int len);
|
||||||
|
|
||||||
int WritetoConsoleLocal(char * buff);
|
int WritetoConsoleLocal(char * buff);
|
||||||
char * stristr (char *ch1, char *ch2);
|
char * stristr (char *ch1, char *ch2);
|
||||||
|
int FromLOC(char * Locator, double * pLat, double * pLon);
|
||||||
|
|
||||||
VOID Consoleprintf(const char * format, ...)
|
VOID Consoleprintf(const char * format, ...)
|
||||||
{
|
{
|
||||||
char Mess[255];
|
char Mess[512];
|
||||||
va_list(arglist);
|
va_list(arglist);
|
||||||
|
|
||||||
va_start(arglist, format);
|
va_start(arglist, format);
|
||||||
|
@ -342,7 +347,7 @@ static int routine[] =
|
||||||
14, 14, 14, 14,
|
14, 14, 14, 14,
|
||||||
14, 14 ,14, 14,
|
14, 14 ,14, 14,
|
||||||
15, 0, 2, 9, 9,
|
15, 0, 2, 9, 9,
|
||||||
2, 2, 2, 2, 2, 2,
|
2, 2, 1, 2, 2, 2,
|
||||||
2, 2, 0, 1, 20, 20} ; // Routine to process param
|
2, 2, 0, 1, 20, 20} ; // Routine to process param
|
||||||
|
|
||||||
int PARAMLIM = sizeof(routine)/sizeof(int);
|
int PARAMLIM = sizeof(routine)/sizeof(int);
|
||||||
|
@ -644,7 +649,7 @@ BOOL ProcessConfig()
|
||||||
if (LOCATOR[0] == 0 && LocSpecified == 0 && RFOnly == 0)
|
if (LOCATOR[0] == 0 && LocSpecified == 0 && RFOnly == 0)
|
||||||
{
|
{
|
||||||
Consoleprintf("");
|
Consoleprintf("");
|
||||||
Consoleprintf("Please enter a LOCATOR statment in your BPQ32.cfg");
|
Consoleprintf("Please enter a LOCATOR statement in your BPQ32.cfg");
|
||||||
Consoleprintf("If you really don't want to be on the Node Map you can enter LOCATOR=NONE");
|
Consoleprintf("If you really don't want to be on the Node Map you can enter LOCATOR=NONE");
|
||||||
Consoleprintf("");
|
Consoleprintf("");
|
||||||
|
|
||||||
|
@ -924,11 +929,21 @@ NextAPRS:
|
||||||
strcat(LOCATOR, ":");
|
strcat(LOCATOR, ":");
|
||||||
strcat(LOCATOR, ptr2);
|
strcat(LOCATOR, ptr2);
|
||||||
ToLOC(atof(ptr1), atof(ptr2), LOC);
|
ToLOC(atof(ptr1), atof(ptr2), LOC);
|
||||||
|
LatFromLOC = atof(ptr1);
|
||||||
|
LonFromLOC = atof(ptr2);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (strlen(ptr1) == 6)
|
if (strlen(ptr1) == 6)
|
||||||
|
{
|
||||||
strcpy(LOC, ptr1);
|
strcpy(LOC, ptr1);
|
||||||
|
FromLOC(LOC, &LatFromLOC, &LonFromLOC);
|
||||||
|
// Randomise in square
|
||||||
|
LatFromLOC += ((rand() / 24.0) / RAND_MAX);
|
||||||
|
LonFromLOC += ((rand() / 12.0) / RAND_MAX);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1740,8 +1755,7 @@ int tncports(int i)
|
||||||
/* FIND OCCURENCE OF ONE STRING WITHIN ANOTHER */
|
/* FIND OCCURENCE OF ONE STRING WITHIN ANOTHER */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
int xindex(s, t)
|
int xindex(char s[], char t[])
|
||||||
char s[], t[];
|
|
||||||
{
|
{
|
||||||
int i, j ,k;
|
int i, j ,k;
|
||||||
|
|
||||||
|
@ -1760,8 +1774,7 @@ char s[], t[];
|
||||||
/* FIND FIRST OCCURENCE OF A CHARACTER THAT IS NOT c */
|
/* FIND FIRST OCCURENCE OF A CHARACTER THAT IS NOT c */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
int verify(s, c)
|
int verify(char s[], char c)
|
||||||
char s[], c;
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -2282,10 +2295,7 @@ int decode_port_rec(char * rec)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int doid(i, value, rec)
|
int doid(int i, char value[], char rec[])
|
||||||
int i;
|
|
||||||
char value[];
|
|
||||||
char rec[];
|
|
||||||
{
|
{
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
for (j = 3;( j < (unsigned int)strlen(rec)+1); j++)
|
for (j = 3;( j < (unsigned int)strlen(rec)+1); j++)
|
||||||
|
@ -2319,10 +2329,7 @@ char rec[];
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int dodll(i, value, rec)
|
int dodll(int i, char value[], char rec[])
|
||||||
int i;
|
|
||||||
char value[];
|
|
||||||
char rec[];
|
|
||||||
{
|
{
|
||||||
unsigned int j;
|
unsigned int j;
|
||||||
|
|
||||||
|
@ -2397,11 +2404,11 @@ int doSerialPortName(int i, char * value, char * rec)
|
||||||
{
|
{
|
||||||
rec += 8;
|
rec += 8;
|
||||||
|
|
||||||
if (strlen(rec) > 79)
|
if (strlen(rec) > 250)
|
||||||
{
|
{
|
||||||
Consoleprintf("Serial Port Name too long - Truncated");
|
Consoleprintf("Serial Port Name too long - Truncated");
|
||||||
Consoleprintf("%s\r\n",rec);
|
Consoleprintf("%s\r\n",rec);
|
||||||
rec[79] = 0;
|
rec[250] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strlop(rec, ' ');
|
strlop(rec, ' ');
|
||||||
|
@ -2409,7 +2416,7 @@ int doSerialPortName(int i, char * value, char * rec)
|
||||||
if (IsNumeric(rec))
|
if (IsNumeric(rec))
|
||||||
xxp.IOADDR = atoi(rec);
|
xxp.IOADDR = atoi(rec);
|
||||||
else
|
else
|
||||||
strcpy(xxp.SerialPortName, rec);
|
xxp.SerialPortName = _strdup(rec);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2442,10 +2449,7 @@ int doKissCommand(int i, char * value, char * rec)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int hwtypes(i, value, rec)
|
int hwtypes(int i, char value[], char rec[])
|
||||||
int i;
|
|
||||||
char value[];
|
|
||||||
char rec[];
|
|
||||||
{
|
{
|
||||||
hw = 255;
|
hw = 255;
|
||||||
if (_stricmp(value,"ASYNC") == 0)
|
if (_stricmp(value,"ASYNC") == 0)
|
||||||
|
@ -2528,10 +2532,7 @@ char rec[];
|
||||||
|
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
int protocols(i, value, rec)
|
int protocols(int i, char value[], char rec[])
|
||||||
int i;
|
|
||||||
char value[];
|
|
||||||
char rec[];
|
|
||||||
{
|
{
|
||||||
int hw;
|
int hw;
|
||||||
|
|
||||||
|
@ -2565,10 +2566,7 @@ char rec[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int bbsflag(i, value, rec)
|
int bbsflag(int i, char value[],char rec[])
|
||||||
int i;
|
|
||||||
char value[];
|
|
||||||
char rec[];
|
|
||||||
{
|
{
|
||||||
int hw=255;
|
int hw=255;
|
||||||
|
|
||||||
|
@ -2619,10 +2617,7 @@ int validcalls(int i, char * value, char * rec)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int kissoptions(i, value, rec)
|
int kissoptions(int i, char value[], char rec[])
|
||||||
int i;
|
|
||||||
char value[];
|
|
||||||
char rec[];
|
|
||||||
{
|
{
|
||||||
int err=255;
|
int err=255;
|
||||||
|
|
||||||
|
@ -2674,7 +2669,19 @@ static int troutine[] =
|
||||||
|
|
||||||
#define TPARAMLIM 6
|
#define TPARAMLIM 6
|
||||||
|
|
||||||
extern CMDX TNCCOMMANDLIST[];
|
|
||||||
|
typedef struct _TCMDX
|
||||||
|
{
|
||||||
|
char String[12]; // COMMAND STRING
|
||||||
|
UCHAR CMDLEN; // SIGNIFICANT LENGTH
|
||||||
|
VOID (* CMDPROC)(struct TNCDATA * TNC, char * Tail, struct _TCMDX * CMD);// COMMAND PROCESSOR
|
||||||
|
size_t CMDFLAG; // FLAG/VALUE Offset
|
||||||
|
|
||||||
|
} TCMDX;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern TCMDX TNCCOMMANDLIST[];
|
||||||
extern int NUMBEROFTNCCOMMANDS;
|
extern int NUMBEROFTNCCOMMANDS;
|
||||||
|
|
||||||
int decode_tnc_rec(char * rec)
|
int decode_tnc_rec(char * rec)
|
||||||
|
@ -2751,7 +2758,7 @@ int decode_tnc_rec(char * rec)
|
||||||
// Try process as TNC2 Command
|
// Try process as TNC2 Command
|
||||||
|
|
||||||
int n = 0;
|
int n = 0;
|
||||||
CMDX * CMD = &TNCCOMMANDLIST[0];
|
TCMDX * CMD = &TNCCOMMANDLIST[0];
|
||||||
char * ptr1 = key_word;
|
char * ptr1 = key_word;
|
||||||
UCHAR * valueptr;
|
UCHAR * valueptr;
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct PORTCONFIG
|
||||||
char Pad2[10]; // 246
|
char Pad2[10]; // 246
|
||||||
char VALIDCALLS[256]; // 256 - 512
|
char VALIDCALLS[256]; // 256 - 512
|
||||||
struct WL2KInfo * WL2K; // 512
|
struct WL2KInfo * WL2K; // 512
|
||||||
char SerialPortName[80]; // 516
|
char * SerialPortName; // 516
|
||||||
struct XDIGI * XDIGIS; // 596 Cross port digi setup
|
struct XDIGI * XDIGIS; // 596 Cross port digi setup
|
||||||
int RIGPORT; // Linked port with RigControl
|
int RIGPORT; // Linked port with RigControl
|
||||||
unsigned int PERMITTEDAPPLS; // Appls allowed on this port
|
unsigned int PERMITTEDAPPLS; // Appls allowed on this port
|
||||||
|
|
|
@ -49,6 +49,9 @@ char MAPCOMMENT[250] = "";
|
||||||
char LOC[7] = ""; // Must be in shared mem// Maidenhead Locator for Reporting
|
char LOC[7] = ""; // Must be in shared mem// Maidenhead Locator for Reporting
|
||||||
char ReportDest[7];
|
char ReportDest[7];
|
||||||
|
|
||||||
|
double LatFromLOC = 0;
|
||||||
|
double LonFromLOC = 0;
|
||||||
|
|
||||||
UCHAR BPQDirectory[260] = ".";
|
UCHAR BPQDirectory[260] = ".";
|
||||||
UCHAR ConfigDirectory[260] = ".";
|
UCHAR ConfigDirectory[260] = ".";
|
||||||
UCHAR LogDirectory[260] = "";
|
UCHAR LogDirectory[260] = "";
|
||||||
|
@ -62,6 +65,7 @@ UCHAR L3KEEP[7] = {'K'+'K','E'+'E','E'+'E','P'+'P','L'+'L','I'+'I', 0xe0}; // K
|
||||||
|
|
||||||
time_t CurrentSecs;
|
time_t CurrentSecs;
|
||||||
time_t lastSlowSecs;
|
time_t lastSlowSecs;
|
||||||
|
time_t lastSaveSecs;
|
||||||
|
|
||||||
char WL2KCall[10] = "";
|
char WL2KCall[10] = "";
|
||||||
char WL2KLoc[7] = "";
|
char WL2KLoc[7] = "";
|
||||||
|
|
|
@ -1,3 +1,58 @@
|
||||||
|
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
|
linbpq (6.0.24.50-1~hibbian+1) bookworm-hibbian-unstable; urgency=medium
|
||||||
|
|
||||||
* New upstream import
|
* New upstream import
|
||||||
|
|
|
@ -6,7 +6,7 @@ Standards-Version: 4.7.0.0
|
||||||
Vcs-Browser: https://github.com/Online-Amateur-Radio-Club-M0OUK/oarc-bpqnode
|
Vcs-Browser: https://github.com/Online-Amateur-Radio-Club-M0OUK/oarc-bpqnode
|
||||||
Vcs-Git: https://github.com/Online-Amateur-Radio-Club-M0OUK/oarc-bpqnode.git
|
Vcs-Git: https://github.com/Online-Amateur-Radio-Club-M0OUK/oarc-bpqnode.git
|
||||||
Homepage: https://www.cantab.net/users/john.wiseman/Documents/
|
Homepage: https://www.cantab.net/users/john.wiseman/Documents/
|
||||||
Build-Depends: debhelper-compat (= 13), libssl-dev, libminiupnpc-dev, libpcap-dev, libconfig-dev, zlib1g-dev, libpaho-mqtt-dev, libjansson-dev
|
Build-Depends: debhelper-compat (= 13), libssl-dev, libminiupnpc-dev, libpcap-dev, libconfig-dev, zlib1g-dev, libpaho-mqtt-dev, libjansson-dev, libpng-dev
|
||||||
Rules-Requires-Root: no
|
Rules-Requires-Root: no
|
||||||
|
|
||||||
Package: linbpq
|
Package: linbpq
|
||||||
|
|
|
@ -3,6 +3,8 @@ Upstream-Name: linBPQ
|
||||||
Upstream-Contact: John Wiseman G8BPQ <john.wiseman@cantab.net>
|
Upstream-Contact: John Wiseman G8BPQ <john.wiseman@cantab.net>
|
||||||
Source: https://www.cantab.net/users/john.wiseman/Documents/
|
Source: https://www.cantab.net/users/john.wiseman/Documents/
|
||||||
Files-Excluded: *.vcproj* *.bak *.lib *.dll *.wav *.asm *.vcxproj* *.pdb *.exe
|
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
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: 1990-2024 John Wiseman G8BPQ <john.wiseman@cantab.net>
|
Copyright: 1990-2024 John Wiseman G8BPQ <john.wiseman@cantab.net>
|
||||||
|
|
|
@ -1,18 +1,11 @@
|
||||||
# weirdness from oarc packaging
|
# weirdness from oarc packaging
|
||||||
linbpq: dir-or-file-in-opt [opt/oarc/]
|
linbpq: dir-or-file-in-opt [opt/oarc/]
|
||||||
linbpq: dir-or-file-in-opt [opt/oarc/bpq/]
|
linbpq: dir-or-file-in-opt [opt/oarc/bpq/]
|
||||||
# these are ok, just held within the program
|
|
||||||
linbpq: embedded-library libminiupnpc [usr/sbin/linbpq]
|
|
||||||
linbpq: embedded-library libpng [usr/sbin/linbpq]
|
|
||||||
# i know!
|
# i know!
|
||||||
linbpq: no-manual-page [usr/sbin/linbpq]
|
linbpq: no-manual-page [usr/sbin/linbpq]
|
||||||
# Build fails
|
|
||||||
linbpq: hardening-no-bindnow [usr/sbin/linbpq]
|
|
||||||
# Directory is populated on first run
|
# Directory is populated on first run
|
||||||
linbpq: package-contains-empty-directory [opt/oarc/bpq/]
|
linbpq: package-contains-empty-directory [opt/oarc/bpq/]
|
||||||
# Code convenience
|
# Code convenience
|
||||||
linbpq: spelling-error-in-binary Dont Don't [usr/sbin/linbpq]
|
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 Paramters Parameters [usr/sbin/linbpq]
|
||||||
linbpq: spelling-error-in-binary WiH With [usr/sbin/linbpq]
|
|
||||||
linbpq: spelling-error-in-binary lable label [usr/sbin/linbpq]
|
|
||||||
linbpq: spelling-error-in-binary lon long [usr/sbin/linbpq]
|
linbpq: spelling-error-in-binary lon long [usr/sbin/linbpq]
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
--- a/Multicast.c
|
|
||||||
+++ b/Multicast.c
|
|
||||||
@@ -620,7 +620,7 @@
|
|
||||||
int r;
|
|
||||||
|
|
||||||
UINT rlen;
|
|
||||||
- UINT outlen;
|
|
||||||
+ size_t outlen;
|
|
||||||
|
|
||||||
memcpy(&rlen, &Decoded[5], 4);
|
|
||||||
|
|
||||||
--- a/bpqmail.h
|
|
||||||
+++ b/bpqmail.h
|
|
||||||
@@ -695,8 +695,8 @@
|
|
||||||
unsigned char Type;
|
|
||||||
unsigned char changed;
|
|
||||||
unsigned short seen;
|
|
||||||
- long long last_modif;
|
|
||||||
- long long last_seen;
|
|
||||||
+ time_t last_modif;
|
|
||||||
+ time_t last_seen;
|
|
||||||
char first_homebbs[41];
|
|
||||||
char secnd_homebbs[41];
|
|
||||||
char first_zip[9];
|
|
||||||
--- a/AGWAPI.c
|
|
||||||
+++ b/AGWAPI.c
|
|
||||||
@@ -128,7 +128,7 @@
|
|
||||||
int AGWGetSessionKey(char * key, struct AGWSocketConnectionInfo * sockptr);
|
|
||||||
int ProcessAGWCommand(struct AGWSocketConnectionInfo * sockptr);
|
|
||||||
int SendDataToAppl(int Stream, byte * Buffer, int Length);
|
|
||||||
-int InternalAGWDecodeFrame(char * msg, char * buffer, int Stamp, int * FrameType, int useLocalTime, int doNodes);
|
|
||||||
+int InternalAGWDecodeFrame(char * msg, char * buffer, time_t Stamp, int * FrameType, int useLocalTime, int doNodes);
|
|
||||||
int AGWDataSocket_Disconnect( struct AGWSocketConnectionInfo * sockptr);
|
|
||||||
int SendRawPacket(struct AGWSocketConnectionInfo * sockptr, char *txmsg, int Length);
|
|
||||||
int ShowApps();
|
|
|
@ -1,259 +0,0 @@
|
||||||
--- /dev/null
|
|
||||||
+++ b/bpqheaders.h
|
|
||||||
@@ -0,0 +1,8 @@
|
|
||||||
+//Header for an easier build under debian GCC-14
|
|
||||||
+#include <stdio.h>
|
|
||||||
+#include <time.h>
|
|
||||||
+#include <fcntl.h>
|
|
||||||
+
|
|
||||||
+int CanPortDigi(int Port);
|
|
||||||
+
|
|
||||||
+int KissEncode(unsigned char * inbuff, unsigned char * outbuff, int len);
|
|
||||||
--- a/cMain.c
|
|
||||||
+++ b/cMain.c
|
|
||||||
@@ -29,9 +29,10 @@
|
|
||||||
//#include "windows.h"
|
|
||||||
//#include "winerror.h"
|
|
||||||
|
|
||||||
-#include "time.h"
|
|
||||||
-#include "stdio.h"
|
|
||||||
+#include <time.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#include "bpqheaders.h"
|
|
||||||
|
|
||||||
#include "kernelresource.h"
|
|
||||||
#include "CHeaders.h"
|
|
||||||
--- a/CHeaders.h
|
|
||||||
+++ b/CHeaders.h
|
|
||||||
@@ -93,7 +93,7 @@
|
|
||||||
char * MOVEANDCHECK(TRANSPORTENTRY * Session, char * Bufferptr, char * Source, int Len);
|
|
||||||
VOID DISPLAYCIRCUIT(TRANSPORTENTRY * L4, char * Buffer);
|
|
||||||
char * FormatUptime(int Uptime);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
+char * strlop(const char * buf, char delim);
|
|
||||||
BOOL CompareCalls(UCHAR * c1, UCHAR * c2);
|
|
||||||
|
|
||||||
VOID PostDataAvailable(TRANSPORTENTRY * Session);
|
|
||||||
@@ -437,7 +437,6 @@
|
|
||||||
|
|
||||||
DllExport uint64_t APIENTRY GetPortFrequency(int PortNo, char * FreqStringMhz);
|
|
||||||
|
|
||||||
-
|
|
||||||
void hookL2SessionAccepted(int Port, char * remotecall, char * ourcall, struct _LINKTABLE * LINK);
|
|
||||||
void hookL2SessionDeleted(struct _LINKTABLE * LINK);
|
|
||||||
void hookL2SessionAttempt(int Port, char * ourcall, char * remotecall, struct _LINKTABLE * LINK);
|
|
||||||
--- a/WinRPR.c
|
|
||||||
+++ b/WinRPR.c
|
|
||||||
@@ -63,7 +63,6 @@
|
|
||||||
static RECT Rect;
|
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
char NodeCall[11]; // Nodecall, Null Terminated
|
|
||||||
|
|
||||||
--- a/bpqmail.h
|
|
||||||
+++ b/bpqmail.h
|
|
||||||
@@ -877,7 +877,6 @@
|
|
||||||
};
|
|
||||||
|
|
||||||
VOID __cdecl nprintf(CIRCUIT * conn, const char * format, ...);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
int rt_cmd(CIRCUIT *circuit, char * Buffer);
|
|
||||||
CIRCUIT *circuit_new(CIRCUIT *circuit, int flags);
|
|
||||||
VOID BBSputs(CIRCUIT * conn, char * buf);
|
|
||||||
--- a/APRSCode.c
|
|
||||||
+++ b/APRSCode.c
|
|
||||||
@@ -63,7 +63,6 @@
|
|
||||||
VOID __cdecl Consoleprintf(const char * format, ...);
|
|
||||||
BOOL APIENTRY Send_AX(PMESSAGE Block, DWORD Len, UCHAR Port);
|
|
||||||
VOID Send_AX_Datagram(PDIGIMESSAGE Block, DWORD Len, UCHAR Port);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
int APRSDecodeFrame(char * msg, char * buffer, time_t Stamp, uint64_t Mask); // Unsemaphored DecodeFrame
|
|
||||||
APRSHEARDRECORD * UpdateHeard(UCHAR * Call, int Port);
|
|
||||||
BOOL CheckforDups(char * Call, char * Msg, int Len);
|
|
||||||
--- a/FLDigi.c
|
|
||||||
+++ b/FLDigi.c
|
|
||||||
@@ -101,8 +101,6 @@
|
|
||||||
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
|
||||||
VOID WritetoTrace(struct TNCINFO * TNC, char * Msg, int Len);
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
-
|
|
||||||
extern UCHAR BPQDirectory[];
|
|
||||||
|
|
||||||
#define MAXMPSKPORTS 16
|
|
||||||
--- a/MULTIPSK.c
|
|
||||||
+++ b/MULTIPSK.c
|
|
||||||
@@ -71,8 +71,6 @@
|
|
||||||
static VOID DoMonitorHddr(struct TNCINFO * TNC, struct AGWHEADER * RXHeader, UCHAR * Msg);
|
|
||||||
VOID SendRPBeacon(struct TNCINFO * TNC);
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
-
|
|
||||||
extern UCHAR BPQDirectory[];
|
|
||||||
|
|
||||||
#define MAXMPSKPORTS 16
|
|
||||||
--- a/AGWMoncode.c
|
|
||||||
+++ b/AGWMoncode.c
|
|
||||||
@@ -61,7 +61,6 @@
|
|
||||||
|
|
||||||
#define NODES_SIG 0xFF
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, int msglen);
|
|
||||||
|
|
||||||
static UCHAR * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen, int DoNodes);
|
|
||||||
--- a/Bpq32.c
|
|
||||||
+++ b/Bpq32.c
|
|
||||||
@@ -1415,7 +1415,6 @@
|
|
||||||
VOID FindLostBuffers();
|
|
||||||
BOOL InitializeTNCEmulator();
|
|
||||||
VOID TNCTimer();
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
DllExport int APIENTRY Get_APPLMASK(int Stream);
|
|
||||||
DllExport int APIENTRY GetStreamPID(int Stream);
|
|
||||||
--- a/CMSAuth.c
|
|
||||||
+++ b/CMSAuth.c
|
|
||||||
@@ -31,7 +31,7 @@
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
+char * strlop(const char * buf, char delim);
|
|
||||||
|
|
||||||
VOID APIENTRY md5 (char *arg, unsigned char * checksum);
|
|
||||||
|
|
||||||
--- a/FLDigi64.c
|
|
||||||
+++ b/FLDigi64.c
|
|
||||||
@@ -102,8 +102,6 @@
|
|
||||||
VOID SuspendOtherPorts(struct TNCINFO * ThisTNC);
|
|
||||||
VOID ReleaseOtherPorts(struct TNCINFO * ThisTNC);
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
-
|
|
||||||
extern UCHAR BPQDirectory[];
|
|
||||||
|
|
||||||
#define MAXBPQPORTS 32
|
|
||||||
--- a/HTTPcode.c
|
|
||||||
+++ b/HTTPcode.c
|
|
||||||
@@ -102,7 +102,6 @@
|
|
||||||
|
|
||||||
extern UCHAR ConfigDirectory[260];
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
VOID sendandcheck(SOCKET sock, const char * Buffer, int Len);
|
|
||||||
int CompareNode(const void *a, const void *b);
|
|
||||||
int CompareAlias(const void *a, const void *b);
|
|
||||||
--- a/MULTIPSK64.c
|
|
||||||
+++ b/MULTIPSK64.c
|
|
||||||
@@ -74,8 +74,6 @@
|
|
||||||
static VOID DoMonitorHddr(struct TNCINFO * TNC, struct AGWHEADER * RXHeader, UCHAR * Msg);
|
|
||||||
VOID SendRPBeacon(struct TNCINFO * TNC);
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
-
|
|
||||||
extern UCHAR BPQDirectory[];
|
|
||||||
|
|
||||||
#define MAXBPQPORTS 32
|
|
||||||
--- a/Moncode.c
|
|
||||||
+++ b/Moncode.c
|
|
||||||
@@ -59,7 +59,6 @@
|
|
||||||
|
|
||||||
#define NODES_SIG 0xFF
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
UCHAR * DisplayINP3RIF(UCHAR * ptr1, UCHAR * ptr2, unsigned int msglen);
|
|
||||||
|
|
||||||
char * DISPLAY_NETROM(MESSAGE * ADJBUFFER, UCHAR * Output, int MsgLen);
|
|
||||||
--- a/NodeMapTest.c
|
|
||||||
+++ b/NodeMapTest.c
|
|
||||||
@@ -201,7 +201,6 @@
|
|
||||||
int ConvFromAX25(unsigned char * incall, char * outcall);
|
|
||||||
void GenerateOutputFiles(time_t Now);
|
|
||||||
void UpdateHeardData(struct NodeData * Node, struct NodeData * Call, char * Freq, char * LOC, char * Flags);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
void ProcessChatUpdate(char * From, char * Msg);
|
|
||||||
void ProcessNodeUpdate(char * From, char * Msg);
|
|
||||||
|
|
||||||
--- a/SCSTracker.c
|
|
||||||
+++ b/SCSTracker.c
|
|
||||||
@@ -52,7 +52,6 @@
|
|
||||||
static RECT Rect;
|
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
char NodeCall[11]; // Nodecall, Null Terminated
|
|
||||||
|
|
||||||
--- a/TelnetV6.c
|
|
||||||
+++ b/TelnetV6.c
|
|
||||||
@@ -127,8 +127,6 @@
|
|
||||||
|
|
||||||
static int ProcessLine(char * buf, int Port);
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
-
|
|
||||||
|
|
||||||
int DisplaySessions(struct TNCINFO * TNC);
|
|
||||||
int DoStateChange(int Stream);
|
|
||||||
--- a/UIARQ.c
|
|
||||||
+++ b/UIARQ.c
|
|
||||||
@@ -78,7 +78,6 @@
|
|
||||||
VOID Send_AX_Datagram(PDIGIMESSAGE Block, DWORD Len, UCHAR Port);
|
|
||||||
int DoScanLine(struct TNCINFO * TNC, char * Buff, int Len);
|
|
||||||
VOID ProcessARQPacket(struct PORTCONTROL * PORT, MESSAGE * Buffer);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
|
|
||||||
extern UCHAR BPQDirectory[];
|
|
||||||
extern char MYALIASLOPPED[10];
|
|
||||||
--- a/bpqchat.h
|
|
||||||
+++ b/bpqchat.h
|
|
||||||
@@ -603,7 +603,6 @@
|
|
||||||
VOID nputs(ChatCIRCUIT * conn, char * buf);
|
|
||||||
#endif
|
|
||||||
BOOL matchi(char * p1, char * p2);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
int rt_cmd(ChatCIRCUIT *circuit, char * Buffer);
|
|
||||||
ChatCIRCUIT *circuit_new(ChatCIRCUIT *circuit, int flags);
|
|
||||||
void makelinks(void);
|
|
||||||
@@ -775,4 +774,4 @@
|
|
||||||
|
|
||||||
struct ConsoleInfo * ConsHeader[2];
|
|
||||||
|
|
||||||
-extern BOOL LogCHAT;
|
|
||||||
\ No newline at end of file
|
|
||||||
+extern BOOL LogCHAT;
|
|
||||||
--- a/SCSTrackeMulti.c
|
|
||||||
+++ b/SCSTrackeMulti.c
|
|
||||||
@@ -48,7 +48,6 @@
|
|
||||||
static RECT Rect;
|
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
BOOL KAMStartPort(struct PORTCONTROL * PORT);
|
|
||||||
BOOL KAMStopPort(struct PORTCONTROL * PORT);
|
|
||||||
|
|
||||||
--- a/SCSTrackeMulti64.c
|
|
||||||
+++ b/SCSTrackeMulti64.c
|
|
||||||
@@ -52,7 +52,6 @@
|
|
||||||
struct TNCINFO * TNCInfo[34]; // Records are Malloc'd
|
|
||||||
|
|
||||||
VOID __cdecl Debugprintf(const char * format, ...);
|
|
||||||
-char * strlop(char * buf, char delim);
|
|
||||||
BOOL KAMStartPort(struct PORTCONTROL * PORT);
|
|
||||||
BOOL KAMStopPort(struct PORTCONTROL * PORT);
|
|
||||||
|
|
||||||
--- a/CommonCode.c
|
|
||||||
+++ b/CommonCode.c
|
|
||||||
@@ -571,7 +571,7 @@
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
-char * strlop(char * buf, char delim)
|
|
||||||
+char * strlop(const char * buf, char delim)
|
|
||||||
{
|
|
||||||
// Terminate buf at delim, and return rest of string
|
|
||||||
|
|
|
@ -1,10 +1,38 @@
|
||||||
--- a/makefile
|
--- a/makefile
|
||||||
+++ b/makefile
|
+++ b/makefile
|
||||||
@@ -33,11 +33,14 @@
|
@@ -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\
|
||||||
|
@@ -18,9 +17,12 @@
|
||||||
|
# Configuration:
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
-
|
||||||
|
-all: CFLAGS = -DLINBPQ -MMD -g -fcommon
|
||||||
|
-all: LDFLAGS = -l:libpaho-mqtt3a.a -l:libjansson.a
|
||||||
|
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
|
||||||
|
+CFLAGS+=$(shell dpkg-buildflags --get CPPFLAGS)
|
||||||
|
+LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
|
||||||
|
+
|
||||||
|
+all: CFLAGS += -DLINBPQ -MMD -g -fcommon
|
||||||
|
+all: LIBS = -lpaho-mqtt3a -ljansson -lminiupnpc -lrt -lm -lz -lpthread -lconfig -lpcap -lpng
|
||||||
|
all: linbpq
|
||||||
|
|
||||||
|
|
||||||
|
@@ -32,12 +34,15 @@
|
||||||
|
|
||||||
|
|
||||||
linbpq: $(OBJS)
|
linbpq: $(OBJS)
|
||||||
gcc $(OBJS) -Xlinker -Map=output.map -l:libminiupnpc.a -lrt -lm -lz $(LDFLAGS) -lpthread -lconfig -lpcap -o linbpq
|
- gcc $(OBJS) -Xlinker -Map=output.map -l:libminiupnpc.a -lrt -lm -lz $(LDFLAGS) -lpthread -lconfig -lpcap -o linbpq
|
||||||
- sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq
|
- sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq
|
||||||
|
+ gcc $(OBJS) $(CLFAGS) $(LDFLAGS) $(LIBS) -o linbpq
|
||||||
+ # sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq
|
+ # sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq
|
||||||
|
|
||||||
-include *.d
|
-include *.d
|
||||||
|
@ -12,10 +40,11 @@
|
||||||
-clean :
|
-clean :
|
||||||
- rm *.d
|
- rm *.d
|
||||||
- rm linbpq $(OBJS)
|
- rm linbpq $(OBJS)
|
||||||
|
-
|
||||||
+install:
|
+install:
|
||||||
+ install -b -m 755 -D -d debian/linbpq/usr/sbin
|
+ install -b -m 755 -D -d debian/linbpq/usr/sbin
|
||||||
+ install -b -m 755 -s -p linbpq debian/linbpq/usr/sbin
|
+ install -b -m 755 -p linbpq debian/linbpq/usr/sbin
|
||||||
|
+
|
||||||
+clean:
|
+clean:
|
||||||
+ $(RM) *.d
|
+ $(RM) *.d
|
||||||
+ $(RM) linbpq $(OBJS)
|
+ $(RM) linbpq $(OBJS)
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/TelnetV6.c
|
|
||||||
+++ b/TelnetV6.c
|
|
||||||
@@ -427,6 +427,7 @@
|
|
||||||
TCP->IPV4 = TRUE;
|
|
||||||
TCP->SecureTelnet = 1;
|
|
||||||
strcpy(TCP->CMSServer, "cms.winlink.org");
|
|
||||||
+ TCP->SecureTelnet = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
TNC = TNCInfo[Port];
|
|
|
@ -1,5 +1,2 @@
|
||||||
headers.patch
|
spelling-fixes.patch
|
||||||
ftbfs-gcc14.patch
|
|
||||||
spelling-errors.patch
|
|
||||||
makefile
|
makefile
|
||||||
secure-by-default.patch
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/UZ7HODrv.c
|
||||||
|
+++ b/UZ7HODrv.c
|
||||||
|
@@ -382,7 +382,7 @@
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
|
export DEB_BUILD_MAINT_OPTIONS=hardening=+all,-format qa=-bug-implicit-func
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
# i don't care that much on this
|
|
||||||
linbpq source: source-contains-prebuilt-windows-binary [PG/Loop.exe]
|
|
||||||
linbpq source: source-contains-prebuilt-windows-binary [PG/PGTest.exe]
|
|
|
@ -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)))
|
|
@ -1,49 +0,0 @@
|
||||||
/* $Id: igd_desc_parse.h,v 1.12 2014/11/17 17:19:13 nanard Exp $ */
|
|
||||||
/* Project : miniupnp
|
|
||||||
* http://miniupnp.free.fr/
|
|
||||||
* Author : Thomas Bernard
|
|
||||||
* Copyright (c) 2005-2014 Thomas Bernard
|
|
||||||
* This software is subject to the conditions detailed in the
|
|
||||||
* LICENCE file provided in this distribution.
|
|
||||||
* */
|
|
||||||
#ifndef IGD_DESC_PARSE_H_INCLUDED
|
|
||||||
#define IGD_DESC_PARSE_H_INCLUDED
|
|
||||||
|
|
||||||
/* Structure to store the result of the parsing of UPnP
|
|
||||||
* descriptions of Internet Gateway Devices */
|
|
||||||
#define MINIUPNPC_URL_MAXSIZE (128)
|
|
||||||
struct IGDdatas_service {
|
|
||||||
char controlurl[MINIUPNPC_URL_MAXSIZE];
|
|
||||||
char eventsuburl[MINIUPNPC_URL_MAXSIZE];
|
|
||||||
char scpdurl[MINIUPNPC_URL_MAXSIZE];
|
|
||||||
char servicetype[MINIUPNPC_URL_MAXSIZE];
|
|
||||||
/*char devicetype[MINIUPNPC_URL_MAXSIZE];*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct IGDdatas {
|
|
||||||
char cureltname[MINIUPNPC_URL_MAXSIZE];
|
|
||||||
char urlbase[MINIUPNPC_URL_MAXSIZE];
|
|
||||||
char presentationurl[MINIUPNPC_URL_MAXSIZE];
|
|
||||||
int level;
|
|
||||||
/*int state;*/
|
|
||||||
/* "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1" */
|
|
||||||
struct IGDdatas_service CIF;
|
|
||||||
/* "urn:schemas-upnp-org:service:WANIPConnection:1"
|
|
||||||
* "urn:schemas-upnp-org:service:WANPPPConnection:1" */
|
|
||||||
struct IGDdatas_service first;
|
|
||||||
/* if both WANIPConnection and WANPPPConnection are present */
|
|
||||||
struct IGDdatas_service second;
|
|
||||||
/* "urn:schemas-upnp-org:service:WANIPv6FirewallControl:1" */
|
|
||||||
struct IGDdatas_service IPv6FC;
|
|
||||||
/* tmp */
|
|
||||||
struct IGDdatas_service tmp;
|
|
||||||
};
|
|
||||||
|
|
||||||
void IGDstartelt(void *, const char *, int);
|
|
||||||
void IGDendelt(void *, const char *, int);
|
|
||||||
void IGDdata(void *, const char *, int);
|
|
||||||
#ifdef DEBUG
|
|
||||||
void printIGD(struct IGDdatas *);
|
|
||||||
#endif /* DEBUG */
|
|
||||||
|
|
||||||
#endif /* IGD_DESC_PARSE_H_INCLUDED */
|
|
6
kiss.c
6
kiss.c
|
@ -209,7 +209,7 @@ VOID EnableFLDIGIReports(struct PORTCONTROL * PORT)
|
||||||
|
|
||||||
VOID ASYDISP(struct PORTCONTROL * PortVector)
|
VOID ASYDISP(struct PORTCONTROL * PortVector)
|
||||||
{
|
{
|
||||||
char Msg[80];
|
char Msg[512];
|
||||||
|
|
||||||
if (PortVector->PORTIPADDR.s_addr || PortVector->KISSTCP)
|
if (PortVector->PORTIPADDR.s_addr || PortVector->KISSTCP)
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ VOID ASYDISP(struct PORTCONTROL * PortVector)
|
||||||
|
|
||||||
int ASYINIT(int comport, int speed, struct PORTCONTROL * PortVector, char Channel )
|
int ASYINIT(int comport, int speed, struct PORTCONTROL * PortVector, char Channel )
|
||||||
{
|
{
|
||||||
char Msg[80];
|
char Msg[256];
|
||||||
NPASYINFO npKISSINFO;
|
NPASYINFO npKISSINFO;
|
||||||
int BPQPort = PortVector->PORTNUMBER;
|
int BPQPort = PortVector->PORTNUMBER;
|
||||||
|
|
||||||
|
@ -1485,7 +1485,7 @@ SeeifMore:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Debugprintf("Polled KISS - response from wrong address - Polled %d Reponse %d",
|
Debugprintf("Polled KISS - response from wrong address - Polled %d Response %d",
|
||||||
KISS->POLLPOINTER->OURCTRL, (Port->RXMSG[0] & 0xf0));
|
KISS->POLLPOINTER->OURCTRL, (Port->RXMSG[0] & 0xf0));
|
||||||
|
|
||||||
goto SeeifMore; // SEE IF ANYTHING ELSE
|
goto SeeifMore; // SEE IF ANYTHING ELSE
|
||||||
|
|
|
@ -768,6 +768,9 @@ BOOL CheckifPacket(char * Via)
|
||||||
if (FindContinent(ptr1))
|
if (FindContinent(ptr1))
|
||||||
return TRUE; // Packet
|
return TRUE; // Packet
|
||||||
|
|
||||||
|
if (FindCountry(ptr1))
|
||||||
|
return TRUE; // Packet
|
||||||
|
|
||||||
if ((_stricmp(ptr1, "MARS") == 0) || (_stricmp(ptr1, "USA") == 0)) // MARS used both
|
if ((_stricmp(ptr1, "MARS") == 0) || (_stricmp(ptr1, "USA") == 0)) // MARS used both
|
||||||
return TRUE; // Packet
|
return TRUE; // Packet
|
||||||
|
|
||||||
|
|
406
mailapi.c
406
mailapi.c
|
@ -38,7 +38,7 @@ typedef struct MailAPI
|
||||||
{
|
{
|
||||||
char *URL;
|
char *URL;
|
||||||
int URLLen;
|
int URLLen;
|
||||||
int (* APIRoutine)();
|
int (* APIRoutine)(struct HTTPConnectionInfo * Session, char * response, char * Rest, int Auth);
|
||||||
int Auth;
|
int Auth;
|
||||||
} MailAPI;
|
} MailAPI;
|
||||||
|
|
||||||
|
@ -706,3 +706,407 @@ packetmail_queue_length{partner="GB7NWL"} 0 1729090716916
|
||||||
packetmail_queue_length{partner="GM8BPQ"} 0 1729090716916
|
packetmail_queue_length{partner="GM8BPQ"} 0 1729090716916
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Stuff send to packetnodes.spots.radio/api/bbsdata/{bbsCall}
|
||||||
|
//https://nodes.ukpacketradio.network/swagger/index.html
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
BbsData{
|
||||||
|
callsign* [...]
|
||||||
|
time* [...]
|
||||||
|
hroute* [...]
|
||||||
|
peers [...]
|
||||||
|
software* [...]
|
||||||
|
version* [...]
|
||||||
|
mailQueues [...]
|
||||||
|
messages [...]
|
||||||
|
latitude [...]
|
||||||
|
longitude [...]
|
||||||
|
locator [...]
|
||||||
|
location [...]
|
||||||
|
unroutable [...]
|
||||||
|
}
|
||||||
|
|
||||||
|
[
|
||||||
|
|
||||||
|
{
|
||||||
|
"callsign": "GE8PZT",
|
||||||
|
"time": "2024-11-25T10:07:41+00:00",
|
||||||
|
"hroute": ".#24.GBR.EU",
|
||||||
|
"peers": [
|
||||||
|
"GB7BBS",
|
||||||
|
"VE2PKT",
|
||||||
|
"GB7NXT",
|
||||||
|
"VA2OM"
|
||||||
|
],
|
||||||
|
"software": "XrLin",
|
||||||
|
"version": "504a",
|
||||||
|
"mailQueues": [],
|
||||||
|
"messages": [
|
||||||
|
{
|
||||||
|
"to": "TECH@WW",
|
||||||
|
"mid": "20539_GB7CIP",
|
||||||
|
"rcvd": "2024-11-24T09:27:59+00:00",
|
||||||
|
"routing": [
|
||||||
|
"R:241124/0927Z @:GE8PZT.#24.GBR.EU [Lamanva] #:2315 XrLin504a",
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"to": "TNC@WW",
|
||||||
|
"mid": "37_PA2SNK",
|
||||||
|
"rcvd": "2024-11-18T21:56:55+00:00",
|
||||||
|
"routing": [
|
||||||
|
"R:241118/2156Z @:GE8PZT.#24.GBR.EU [] #:2215 XrLin504a",
|
||||||
|
"R:241118/2156Z 12456@VE2PKT.#TRV.QC.CAN.NOAM BPQ6.0.24",
|
||||||
|
"R:241118/2130Z 51539@VE3KPG.#ECON.ON.CAN.NOAM BPQK6.0.23",
|
||||||
|
"R:241118/2130Z 26087@VE3CGR.#SCON.ON.CAN.NOAM LinBPQ6.0.24",
|
||||||
|
"R:241118/2130Z 37521@PA8F.#ZH1.NLD.EURO LinBPQ6.0.24",
|
||||||
|
"R:241118/2129Z 48377@PI8LAP.#ZLD.NLD.EURO LinBPQ6.0.24",
|
||||||
|
"R:241118/2129Z @:PD0LPM.FRL.EURO.NLD #:33044 [Joure] $:37_PA2SNK"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"latitude": 50.145832,
|
||||||
|
"longitude": -5.125,
|
||||||
|
"locator": "IO70KD",
|
||||||
|
"location": "Lamanva",
|
||||||
|
"unroutable": [
|
||||||
|
{
|
||||||
|
"type": "P",
|
||||||
|
"at": "WW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "P",
|
||||||
|
"at": "G8PZT-2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "P",
|
||||||
|
"at": "g8pzt._24.gbr.eu"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "P",
|
||||||
|
"at": "G8PZT.#24.GBR.EU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "P",
|
||||||
|
"at": "GE8PZT.#24.GBR.EU"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "P",
|
||||||
|
"at": "G8PZT.#24.GBR.EURO"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// https://packetnodes.spots.radio/swagger/index.html
|
||||||
|
|
||||||
|
// "unroutable": [{"type": "P","at": "WW"}, {"type": "P", "at": "G8PZT.#24.GBR.EURO"}]
|
||||||
|
|
||||||
|
char * ViaList[100000]; // Pointers to the Message Header field
|
||||||
|
char TypeList[100000];
|
||||||
|
|
||||||
|
int unroutableCount = 0;
|
||||||
|
|
||||||
|
|
||||||
|
void CheckifRoutable(struct MsgInfo * Msg)
|
||||||
|
{
|
||||||
|
char NextBBS[64];
|
||||||
|
int n;
|
||||||
|
|
||||||
|
if (Msg->status == 'K')
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (Msg->via[0] == 0) // No routing
|
||||||
|
return;
|
||||||
|
|
||||||
|
strcpy(NextBBS, Msg->via);
|
||||||
|
strlop(NextBBS, '.');
|
||||||
|
|
||||||
|
if (strcmp(NextBBS, BBSName) == 0) // via this BBS
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ((memcmp(Msg->fbbs, zeros, NBMASK) != 0) || (memcmp(Msg->forw, zeros, NBMASK) != 0)) // Has Forwarding Info
|
||||||
|
return;
|
||||||
|
|
||||||
|
// See if we already have it
|
||||||
|
|
||||||
|
for (n = 0; n < unroutableCount; n++)
|
||||||
|
{
|
||||||
|
if ((TypeList[n] == Msg->type) && strcmp(ViaList[n], Msg->via) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add to list
|
||||||
|
|
||||||
|
TypeList[unroutableCount] = Msg->type;
|
||||||
|
ViaList[unroutableCount] = Msg->via;
|
||||||
|
|
||||||
|
unroutableCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
extern char LOC[7];
|
||||||
|
|
||||||
|
|
||||||
|
DllExport VOID WINAPI SendWebRequest(char * Host, char * Request, char * Params, char * Return);
|
||||||
|
|
||||||
|
#ifdef LINBPQ
|
||||||
|
extern double LatFromLOC;
|
||||||
|
extern double LonFromLOC;
|
||||||
|
#else
|
||||||
|
typedef int (WINAPI FAR *FARPROCX)();
|
||||||
|
extern FARPROCX pSendWebRequest;
|
||||||
|
extern FARPROCX pGetLatLon;
|
||||||
|
double LatFromLOC = 0;
|
||||||
|
double LonFromLOC = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void SendBBSDataToPktMap()
|
||||||
|
{
|
||||||
|
char Request[64];
|
||||||
|
char * Params;
|
||||||
|
char * ptr;
|
||||||
|
int paramLen;
|
||||||
|
struct MsgInfo * Msg;
|
||||||
|
|
||||||
|
struct UserInfo * ourBBSRec = LookupCall(BBSName);
|
||||||
|
struct UserInfo * USER;
|
||||||
|
char Time[64];
|
||||||
|
struct tm * tm;
|
||||||
|
time_t Date = time(NULL);
|
||||||
|
char Peers[2048] = "[]";
|
||||||
|
char MsgQueues[16000] = "[]";
|
||||||
|
char * Messages = malloc(1000000);
|
||||||
|
char * Unroutables;
|
||||||
|
int m;
|
||||||
|
char * MsgBytes;
|
||||||
|
char * Rlineptr;
|
||||||
|
char * Rlineend;
|
||||||
|
char * RLines;
|
||||||
|
char * ptr1, * ptr2;
|
||||||
|
int n;
|
||||||
|
|
||||||
|
#ifndef LINBPQ
|
||||||
|
if (pSendWebRequest == 0)
|
||||||
|
return; // Old Version of bpq32.dll
|
||||||
|
|
||||||
|
pGetLatLon(&LatFromLOC, &LonFromLOC);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
if (ourBBSRec == 0)
|
||||||
|
return; // Wot!!
|
||||||
|
|
||||||
|
// Get peers and Mail Queues
|
||||||
|
|
||||||
|
ptr = &Peers[1];
|
||||||
|
ptr1 = &MsgQueues[1];
|
||||||
|
|
||||||
|
for (USER = BBSChain; USER; USER = USER->BBSNext)
|
||||||
|
{
|
||||||
|
if (strcmp(USER->Call, BBSName) != 0)
|
||||||
|
{
|
||||||
|
int Bytes;
|
||||||
|
|
||||||
|
int Count = CountMessagestoForward(USER);
|
||||||
|
|
||||||
|
ptr += sprintf(ptr, "\"%s\",", USER->Call);
|
||||||
|
|
||||||
|
if (Count)
|
||||||
|
{
|
||||||
|
Bytes = CountBytestoForward(USER);
|
||||||
|
|
||||||
|
ptr1 += sprintf(ptr1, "{\"peerCall\": \"%s\", \"numQueued\": %d, \"bytesQueued\": %d},",
|
||||||
|
USER->Call, Count, Bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*ptr) != ']') // Have some entries
|
||||||
|
{
|
||||||
|
ptr--; // over trailing comms
|
||||||
|
*(ptr++) = ']';
|
||||||
|
*(ptr) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*ptr1) != ']') // Have some entries
|
||||||
|
{
|
||||||
|
ptr1--; // over trailing comms
|
||||||
|
*(ptr1++) = ']';
|
||||||
|
*(ptr1) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get Messages
|
||||||
|
|
||||||
|
strcpy(Messages, "[]");
|
||||||
|
ptr = &Messages[1];
|
||||||
|
|
||||||
|
for (m = LatestMsg; m >= 1; m--)
|
||||||
|
{
|
||||||
|
if (ptr > &Messages[999000])
|
||||||
|
break; // protect buffer
|
||||||
|
|
||||||
|
Msg = GetMsgFromNumber(m);
|
||||||
|
|
||||||
|
if (Msg == 0 || Msg->type == 0 || Msg->status == 0)
|
||||||
|
continue; // Protect against corrupt messages
|
||||||
|
|
||||||
|
// Paula suggests including H and K but limit it to the last 30 days or the last 100 messages, whichever is the smaller.
|
||||||
|
|
||||||
|
// if (Msg->status == 'K' || Msg->status == 'H')
|
||||||
|
// continue;
|
||||||
|
|
||||||
|
if ((Date - Msg->datereceived) > 30 * 86400) // Too old
|
||||||
|
continue;
|
||||||
|
|
||||||
|
CheckifRoutable(Msg);
|
||||||
|
|
||||||
|
tm = gmtime((time_t *)&Msg->datereceived);
|
||||||
|
|
||||||
|
sprintf(Time, "%04d-%02d-%02dT%02d:%02d:%02d+00:00",
|
||||||
|
tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||||
|
|
||||||
|
// Get Routing
|
||||||
|
|
||||||
|
MsgBytes = ReadMessageFile(Msg->number);
|
||||||
|
RLines = malloc(Msg->length * 2); // Very unlikely to need so much but better safe..
|
||||||
|
|
||||||
|
strcpy(RLines, "[]");
|
||||||
|
|
||||||
|
ptr2 = &RLines[1];
|
||||||
|
|
||||||
|
// Need to skip B2 header if B2 Message
|
||||||
|
|
||||||
|
Rlineptr = MsgBytes;
|
||||||
|
|
||||||
|
// If it is a B2 Message, Must Skip B2 Header
|
||||||
|
|
||||||
|
if (Msg->B2Flags & B2Msg)
|
||||||
|
{
|
||||||
|
Rlineptr = strstr(Rlineptr, "\r\n\r\n");
|
||||||
|
if (Rlineptr)
|
||||||
|
Rlineptr += 4;
|
||||||
|
else
|
||||||
|
Rlineptr = MsgBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We have to process R: lines one at a time as we need to send each one as a separate string
|
||||||
|
|
||||||
|
while (memcmp(Rlineptr, "R:", 2) == 0)
|
||||||
|
{
|
||||||
|
// Have R Lines
|
||||||
|
|
||||||
|
Rlineend = strstr(Rlineptr, "\r\n");
|
||||||
|
Rlineend[0] = 0;
|
||||||
|
ptr2 += sprintf(ptr2, "\"%s\",", Rlineptr);
|
||||||
|
|
||||||
|
Rlineptr = Rlineend + 2; // over crlf
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*ptr2) == ']') // no entries
|
||||||
|
continue;
|
||||||
|
|
||||||
|
ptr2--; // over trailing comms
|
||||||
|
*(ptr2++) = ']';
|
||||||
|
*(ptr2) = 0;
|
||||||
|
|
||||||
|
ptr += sprintf(ptr, "{\"to\": \"%s\", \"mid\": \"%s\", \"rcvd\": \"%s\", \"routing\": %s},",
|
||||||
|
Msg->to, Msg->bid, Time, RLines);
|
||||||
|
|
||||||
|
free(MsgBytes);
|
||||||
|
free(RLines);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*ptr) != ']') // Have some entries?
|
||||||
|
{
|
||||||
|
ptr--; // over trailing comms
|
||||||
|
*(ptr++) = ']';
|
||||||
|
*(ptr) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get unroutables
|
||||||
|
|
||||||
|
Unroutables = malloc((unroutableCount + 1) * 100);
|
||||||
|
|
||||||
|
strcpy(Unroutables, "[]");
|
||||||
|
ptr = &Unroutables[1];
|
||||||
|
|
||||||
|
|
||||||
|
for (n = 0; n < unroutableCount; n++)
|
||||||
|
{
|
||||||
|
ptr += sprintf(ptr, "{\"type\": \"%c\",\"at\": \"%s\"},", TypeList[n], ViaList[n]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*ptr) != ']') // Have some entries?
|
||||||
|
{
|
||||||
|
ptr--; // over trailing comms
|
||||||
|
*(ptr++) = ']';
|
||||||
|
*(ptr) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
char * ViaList[100000]; // Pointers to the Message Header field
|
||||||
|
char TypeList[100000];
|
||||||
|
|
||||||
|
int unroutableCount = 0;
|
||||||
|
"unroutable": [{"type": "P","at": "WW"}, {"type": "P", "at": "G8PZT.#24.GBR.EURO"}]
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
tm = gmtime(&Date);
|
||||||
|
|
||||||
|
sprintf(Time, "%04d-%02d-%02dT%02d:%02d:%02d+00:00",
|
||||||
|
tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||||
|
|
||||||
|
|
||||||
|
paramLen = strlen(Peers) + strlen(MsgQueues) + strlen(Messages) + strlen(Unroutables);
|
||||||
|
|
||||||
|
Params = malloc(paramLen + 1000);
|
||||||
|
|
||||||
|
if (Params == 0)
|
||||||
|
{
|
||||||
|
free(Messages);
|
||||||
|
free(Unroutables);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ptr = Params;
|
||||||
|
|
||||||
|
sprintf(Request, "/api/bbsdata/%s", BBSName);
|
||||||
|
|
||||||
|
ptr += sprintf(ptr, "{\"callsign\": \"%s\",\r\n", BBSName);
|
||||||
|
ptr += sprintf(ptr, "\"time\": \"%s\",\r\n", Time);
|
||||||
|
ptr += sprintf(ptr, "\"hroute\": \"%s\",\r\n", HRoute);
|
||||||
|
ptr += sprintf(ptr, "\"peers\": %s,\r\n", Peers);
|
||||||
|
#ifdef LINBPQ
|
||||||
|
ptr += sprintf(ptr, "\"software\": \"%s\",\r\n", "linbpq");
|
||||||
|
#else
|
||||||
|
ptr += sprintf(ptr, "\"software\": \"%s\",\r\n", "BPQMail");
|
||||||
|
#endif
|
||||||
|
ptr += sprintf(ptr, "\"version\": \"%s\",\r\n", VersionString);
|
||||||
|
ptr += sprintf(ptr, "\"mailQueues\": %s,\r\n", MsgQueues);
|
||||||
|
ptr += sprintf(ptr, "\"messages\": %s,\r\n", Messages);
|
||||||
|
ptr += sprintf(ptr, "\"latitude\": %1.6f,\r\n", LatFromLOC);
|
||||||
|
ptr += sprintf(ptr, "\"longitude\": %.6f,\r\n", LonFromLOC);
|
||||||
|
ptr += sprintf(ptr, "\"locator\": \"%s\",\r\n", LOC);
|
||||||
|
ptr += sprintf(ptr, "\"location\": \"%s\",\r\n", ourBBSRec->Address);
|
||||||
|
ptr += sprintf(ptr, "\"unroutable\": %s\r\n}\r\n", Unroutables);
|
||||||
|
|
||||||
|
#ifdef LINBPQ
|
||||||
|
SendWebRequest("packetnodes.spots.radio", Request, Params, 0);
|
||||||
|
#else
|
||||||
|
pSendWebRequest("packetnodes.spots.radio", Request, Params, 0);
|
||||||
|
#endif
|
||||||
|
free(Messages);
|
||||||
|
free(Unroutables);
|
||||||
|
free(Params);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
26
md5.c
26
md5.c
|
@ -74,17 +74,14 @@ along with LinBPQ/BPQ32. If not, see http://www.gnu.org/licenses
|
||||||
surprised if they were a performance bottleneck for MD5. */
|
surprised if they were a performance bottleneck for MD5. */
|
||||||
|
|
||||||
static cvs_uint32
|
static cvs_uint32
|
||||||
getu32 (addr)
|
getu32(const unsigned char *addr)
|
||||||
const unsigned char *addr;
|
|
||||||
{
|
{
|
||||||
return (((((uint32_t)addr[3] << 8) | addr[2]) << 8)
|
return (((((uint32_t)addr[3] << 8) | addr[2]) << 8)
|
||||||
| addr[1]) << 8 | addr[0];
|
| addr[1]) << 8 | addr[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
putu32 (data, addr)
|
putu32 (cvs_uint32 data, unsigned char *addr)
|
||||||
cvs_uint32 data;
|
|
||||||
unsigned char *addr;
|
|
||||||
{
|
{
|
||||||
addr[0] = (unsigned char)data;
|
addr[0] = (unsigned char)data;
|
||||||
addr[1] = (unsigned char)(data >> 8);
|
addr[1] = (unsigned char)(data >> 8);
|
||||||
|
@ -97,8 +94,7 @@ putu32 (data, addr)
|
||||||
* initialization constants.
|
* initialization constants.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cvs_MD5Init (ctx)
|
cvs_MD5Init (struct cvs_MD5Context *ctx)
|
||||||
struct cvs_MD5Context *ctx;
|
|
||||||
{
|
{
|
||||||
ctx->buf[0] = 0x67452301;
|
ctx->buf[0] = 0x67452301;
|
||||||
ctx->buf[1] = 0xefcdab89;
|
ctx->buf[1] = 0xefcdab89;
|
||||||
|
@ -114,10 +110,8 @@ cvs_MD5Init (ctx)
|
||||||
* of bytes.
|
* of bytes.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cvs_MD5Update (ctx, buf, len)
|
cvs_MD5Update (
|
||||||
struct cvs_MD5Context *ctx;
|
struct cvs_MD5Context *ctx, unsigned char const *buf, unsigned len)
|
||||||
unsigned char const *buf;
|
|
||||||
unsigned len;
|
|
||||||
{
|
{
|
||||||
cvs_uint32 t;
|
cvs_uint32 t;
|
||||||
|
|
||||||
|
@ -164,10 +158,7 @@ cvs_MD5Update (ctx, buf, len)
|
||||||
* Final wrapup - pad to 64-byte boundary with the bit pattern
|
* Final wrapup - pad to 64-byte boundary with the bit pattern
|
||||||
* 1 0* (64-bit count of bits processed, MSB-first)
|
* 1 0* (64-bit count of bits processed, MSB-first)
|
||||||
*/
|
*/
|
||||||
void
|
void cvs_MD5Final (unsigned char digest[16], struct cvs_MD5Context *ctx)
|
||||||
cvs_MD5Final (digest, ctx)
|
|
||||||
unsigned char digest[16];
|
|
||||||
struct cvs_MD5Context *ctx;
|
|
||||||
{
|
{
|
||||||
unsigned count;
|
unsigned count;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
@ -227,10 +218,7 @@ cvs_MD5Final (digest, ctx)
|
||||||
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
||||||
* the data and converts bytes into longwords for this routine.
|
* the data and converts bytes into longwords for this routine.
|
||||||
*/
|
*/
|
||||||
void
|
void cvs_MD5Transform (cvs_uint32 buf[4], const unsigned char inraw[64])
|
||||||
cvs_MD5Transform (buf, inraw)
|
|
||||||
cvs_uint32 buf[4];
|
|
||||||
const unsigned char inraw[64];
|
|
||||||
{
|
{
|
||||||
register cvs_uint32 a, b, c, d;
|
register cvs_uint32 a, b, c, d;
|
||||||
cvs_uint32 in[16];
|
cvs_uint32 in[16];
|
||||||
|
|
153
miniupnpc.h
153
miniupnpc.h
|
@ -1,153 +0,0 @@
|
||||||
/* $Id: miniupnpc.h,v 1.56 2020/12/20 18:07:35 nanard Exp $ */
|
|
||||||
/* vim: tabstop=4 shiftwidth=4 noexpandtab
|
|
||||||
* Project: miniupnp
|
|
||||||
* http://miniupnp.free.fr/
|
|
||||||
* Author: Thomas Bernard
|
|
||||||
* Copyright (c) 2005-2018 Thomas Bernard
|
|
||||||
* This software is subjects to the conditions detailed
|
|
||||||
* in the LICENCE file provided within this distribution */
|
|
||||||
#ifndef MINIUPNPC_H_INCLUDED
|
|
||||||
#define MINIUPNPC_H_INCLUDED
|
|
||||||
|
|
||||||
#include "miniupnpc_declspec.h"
|
|
||||||
#include "igd_desc_parse.h"
|
|
||||||
#include "upnpdev.h"
|
|
||||||
|
|
||||||
/* error codes : */
|
|
||||||
#define UPNPDISCOVER_SUCCESS (0)
|
|
||||||
#define UPNPDISCOVER_UNKNOWN_ERROR (-1)
|
|
||||||
#define UPNPDISCOVER_SOCKET_ERROR (-101)
|
|
||||||
#define UPNPDISCOVER_MEMORY_ERROR (-102)
|
|
||||||
|
|
||||||
/* versions : */
|
|
||||||
#define MINIUPNPC_VERSION "2.2.2"
|
|
||||||
#define MINIUPNPC_API_VERSION 17
|
|
||||||
|
|
||||||
/* Source port:
|
|
||||||
Using "1" as an alias for 1900 for backwards compatibility
|
|
||||||
(presuming one would have used that for the "sameport" parameter) */
|
|
||||||
#define UPNP_LOCAL_PORT_ANY 0
|
|
||||||
#define UPNP_LOCAL_PORT_SAME 1
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Structures definitions : */
|
|
||||||
struct UPNParg { const char * elt; const char * val; };
|
|
||||||
|
|
||||||
char *
|
|
||||||
simpleUPnPcommand(int, const char *, const char *,
|
|
||||||
const char *, struct UPNParg *,
|
|
||||||
int *);
|
|
||||||
|
|
||||||
/* upnpDiscover()
|
|
||||||
* discover UPnP devices on the network.
|
|
||||||
* The discovered devices are returned as a chained list.
|
|
||||||
* It is up to the caller to free the list with freeUPNPDevlist().
|
|
||||||
* delay (in millisecond) is the maximum time for waiting any device
|
|
||||||
* response.
|
|
||||||
* If available, device list will be obtained from MiniSSDPd.
|
|
||||||
* Default path for minissdpd socket will be used if minissdpdsock argument
|
|
||||||
* is NULL.
|
|
||||||
* If multicastif is not NULL, it will be used instead of the default
|
|
||||||
* multicast interface for sending SSDP discover packets.
|
|
||||||
* If localport is set to UPNP_LOCAL_PORT_SAME(1) SSDP packets will be sent
|
|
||||||
* from the source port 1900 (same as destination port), if set to
|
|
||||||
* UPNP_LOCAL_PORT_ANY(0) system assign a source port, any other value will
|
|
||||||
* be attempted as the source port.
|
|
||||||
* "searchalltypes" parameter is useful when searching several types,
|
|
||||||
* if 0, the discovery will stop with the first type returning results.
|
|
||||||
* TTL should default to 2. */
|
|
||||||
MINIUPNP_LIBSPEC struct UPNPDev *
|
|
||||||
upnpDiscover(int delay, const char * multicastif,
|
|
||||||
const char * minissdpdsock, int localport,
|
|
||||||
int ipv6, unsigned char ttl,
|
|
||||||
int * error);
|
|
||||||
|
|
||||||
MINIUPNP_LIBSPEC struct UPNPDev *
|
|
||||||
upnpDiscoverAll(int delay, const char * multicastif,
|
|
||||||
const char * minissdpdsock, int localport,
|
|
||||||
int ipv6, unsigned char ttl,
|
|
||||||
int * error);
|
|
||||||
|
|
||||||
MINIUPNP_LIBSPEC struct UPNPDev *
|
|
||||||
upnpDiscoverDevice(const char * device, int delay, const char * multicastif,
|
|
||||||
const char * minissdpdsock, int localport,
|
|
||||||
int ipv6, unsigned char ttl,
|
|
||||||
int * error);
|
|
||||||
|
|
||||||
MINIUPNP_LIBSPEC struct UPNPDev *
|
|
||||||
upnpDiscoverDevices(const char * const deviceTypes[],
|
|
||||||
int delay, const char * multicastif,
|
|
||||||
const char * minissdpdsock, int localport,
|
|
||||||
int ipv6, unsigned char ttl,
|
|
||||||
int * error,
|
|
||||||
int searchalltypes);
|
|
||||||
|
|
||||||
/* parserootdesc() :
|
|
||||||
* parse root XML description of a UPnP device and fill the IGDdatas
|
|
||||||
* structure. */
|
|
||||||
MINIUPNP_LIBSPEC void parserootdesc(const char *, int, struct IGDdatas *);
|
|
||||||
|
|
||||||
/* structure used to get fast access to urls
|
|
||||||
* controlURL: controlURL of the WANIPConnection
|
|
||||||
* ipcondescURL: url of the description of the WANIPConnection
|
|
||||||
* controlURL_CIF: controlURL of the WANCommonInterfaceConfig
|
|
||||||
* controlURL_6FC: controlURL of the WANIPv6FirewallControl
|
|
||||||
*/
|
|
||||||
struct UPNPUrls {
|
|
||||||
char * controlURL;
|
|
||||||
char * ipcondescURL;
|
|
||||||
char * controlURL_CIF;
|
|
||||||
char * controlURL_6FC;
|
|
||||||
char * rootdescURL;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* UPNP_GetValidIGD() :
|
|
||||||
* return values :
|
|
||||||
* 0 = NO IGD found
|
|
||||||
* 1 = A valid connected IGD has been found
|
|
||||||
* 2 = A valid IGD has been found but it reported as
|
|
||||||
* not connected
|
|
||||||
* 3 = an UPnP device has been found but was not recognized as an IGD
|
|
||||||
*
|
|
||||||
* In any non zero return case, the urls and data structures
|
|
||||||
* passed as parameters are set. Donc forget to call FreeUPNPUrls(urls) to
|
|
||||||
* free allocated memory.
|
|
||||||
*/
|
|
||||||
MINIUPNP_LIBSPEC int
|
|
||||||
UPNP_GetValidIGD(struct UPNPDev * devlist,
|
|
||||||
struct UPNPUrls * urls,
|
|
||||||
struct IGDdatas * data,
|
|
||||||
char * lanaddr, int lanaddrlen);
|
|
||||||
|
|
||||||
/* UPNP_GetIGDFromUrl()
|
|
||||||
* Used when skipping the discovery process.
|
|
||||||
* When succeding, urls, data, and lanaddr arguments are set.
|
|
||||||
* return value :
|
|
||||||
* 0 - Not ok
|
|
||||||
* 1 - OK */
|
|
||||||
MINIUPNP_LIBSPEC int
|
|
||||||
UPNP_GetIGDFromUrl(const char * rootdescurl,
|
|
||||||
struct UPNPUrls * urls,
|
|
||||||
struct IGDdatas * data,
|
|
||||||
char * lanaddr, int lanaddrlen);
|
|
||||||
|
|
||||||
MINIUPNP_LIBSPEC void
|
|
||||||
GetUPNPUrls(struct UPNPUrls *, struct IGDdatas *,
|
|
||||||
const char *, unsigned int);
|
|
||||||
|
|
||||||
MINIUPNP_LIBSPEC void
|
|
||||||
FreeUPNPUrls(struct UPNPUrls *);
|
|
||||||
|
|
||||||
/* return 0 or 1 */
|
|
||||||
MINIUPNP_LIBSPEC int UPNPIGD_IsConnected(struct UPNPUrls *, struct IGDdatas *);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
/* $Id: miniupnpctypes.h,v 1.2 2012/09/27 15:42:10 nanard Exp $ */
|
|
||||||
/* Miniupnp project : http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org
|
|
||||||
* Author : Thomas Bernard
|
|
||||||
* Copyright (c) 2011 Thomas Bernard
|
|
||||||
* This software is subject to the conditions detailed in the
|
|
||||||
* LICENCE file provided within this distribution */
|
|
||||||
#ifndef MINIUPNPCTYPES_H_INCLUDED
|
|
||||||
#define MINIUPNPCTYPES_H_INCLUDED
|
|
||||||
|
|
||||||
#if (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
|
|
||||||
#define UNSIGNED_INTEGER unsigned long long
|
|
||||||
#define STRTOUI strtoull
|
|
||||||
#else
|
|
||||||
#define UNSIGNED_INTEGER unsigned int
|
|
||||||
#define STRTOUI strtoul
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
56
mqtt.c
56
mqtt.c
|
@ -317,7 +317,60 @@ int MQTTConnect(char* host, int port, char* user, char* pass)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Message Database Entry. Designed to be compatible with FBB
|
||||||
|
|
||||||
|
#define NBBBS 160 // Max BBSes we can forward to. Must be Multiple of 8, and must be 80 for FBB compatibliliy
|
||||||
|
#define NBMASK NBBBS/8 // Number of bytes in Forward bitlists.
|
||||||
|
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
struct MsgInfo
|
||||||
|
{
|
||||||
|
char type;
|
||||||
|
char status;
|
||||||
|
int number;
|
||||||
|
int length;
|
||||||
|
int xdatereceived;
|
||||||
|
char bbsfrom[7]; // ? BBS we got it from ?
|
||||||
|
char via[41];
|
||||||
|
char from[7];
|
||||||
|
char to[7];
|
||||||
|
char bid[13];
|
||||||
|
char title[61];
|
||||||
|
int nntpnum; // Number within topic (ie Bull TO Addr) - used for nntp
|
||||||
|
|
||||||
|
UCHAR B2Flags; // Not all flags specific to B2
|
||||||
|
|
||||||
|
#define B2Msg 1 // Set if Message File is a formatted B2 message
|
||||||
|
#define Attachments 2 // Set if B2 message has attachments
|
||||||
|
#define FromPaclink 4
|
||||||
|
#define FromCMS 8
|
||||||
|
#define FromRMSExpress 16
|
||||||
|
#define RadioOnlyMsg 32 // Received using call-T
|
||||||
|
#define RadioOnlyFwd 64 // Received using call-R
|
||||||
|
#define WarnNotForwardedSent 128
|
||||||
|
|
||||||
|
int xdatecreated;
|
||||||
|
int xdatechanged;
|
||||||
|
UCHAR fbbs[NBMASK];
|
||||||
|
UCHAR forw[NBMASK];
|
||||||
|
char emailfrom[41];
|
||||||
|
char Locked; // Set if selected for sending (NTS Pickup)
|
||||||
|
char Defered; // FBB response '=' received
|
||||||
|
UCHAR UTF8; // Set if Message is in UTF8 (ie from POP/SMTP)
|
||||||
|
|
||||||
|
// For 64 bit time_t compatibility define as long long
|
||||||
|
// (so struct is same with 32 or 64 bit time_t)
|
||||||
|
|
||||||
|
int64_t datereceived;
|
||||||
|
int64_t datecreated;
|
||||||
|
int64_t datechanged;
|
||||||
|
|
||||||
|
char Spare[61 - 24]; // For future use
|
||||||
|
} ;
|
||||||
|
|
||||||
|
#pragma pack()
|
||||||
|
|
||||||
void MQTTMessageEvent(void* message)
|
void MQTTMessageEvent(void* message)
|
||||||
{
|
{
|
||||||
struct MsgInfo* msg = (struct MsgInfo *)message;
|
struct MsgInfo* msg = (struct MsgInfo *)message;
|
||||||
|
@ -360,7 +413,6 @@ void MQTTMessageEvent(void* message)
|
||||||
|
|
||||||
MQTTAsync_sendMessage(client, topic, &pubmsg, &opts);
|
MQTTAsync_sendMessage(client, topic, &pubmsg, &opts);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ typedef struct API
|
||||||
{
|
{
|
||||||
char *URL;
|
char *URL;
|
||||||
int URLLen;
|
int URLLen;
|
||||||
int (* APIRoutine)();
|
int (* APIRoutine)(char * response, char * token, char * param);
|
||||||
int Auth;
|
int Auth;
|
||||||
} API;
|
} API;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue