From 8c70eaedd9aa838928f29844c496c8286a89f8b1 Mon Sep 17 00:00:00 2001 From: N2WNS <67504960+n2wns@users.noreply.github.com> Date: Thu, 18 Mar 2021 16:07:52 -0400 Subject: [PATCH 01/20] Update NXDNHosts.txt Added Reflector 3400 --- NXDNGateway/NXDNHosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 4f375c3..1e0ce3e 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -81,6 +81,9 @@ # PRadise 3300 nxdn3300.from-pr.com 41400 +# 3400 W2BTN Group +3400 w2btn.dmrnet.net 41400 + # 5057 VK7 TAS 5057 45.248.50.37 41400 From 3c300d47a0fc9668eaaeb2a5a7e7c4329a63727f Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 23 Mar 2021 22:56:06 +0000 Subject: [PATCH 02/20] Update NXDNHosts.txt --- NXDNGateway/NXDNHosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 1e0ce3e..a6cf83f 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -135,6 +135,9 @@ # 20330 NXDN German DE-RAMSES Project 20330 161.97.140.131 41400 +# 20333 NXDN LausitzLink Germany +20333 nxdn02.bzsax.de 41400 + # 20421 DL-Nordwest (dl-nordwest.com) by 9V1LH/DG1BGS and DK5BS 20421 9v1lh.spdns.org 41400 From 249c0da5c42eec79b48879db1d90ab990cc5d0db Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 24 Mar 2021 21:34:00 +0000 Subject: [PATCH 03/20] Update NXDNHosts.txt --- NXDNGateway/NXDNHosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index a6cf83f..11d3b90 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -3,6 +3,9 @@ # The format of this file is the number of the Talk Group followed by the host name or address and port # +# 138 Thailand +138 e23jwe.ddns.net 41400 + # 202 HELLAS Zone 202 hellaszone.com 41400 From afe102c3bebe0972a85178ed88f4068a4b81fc2d Mon Sep 17 00:00:00 2001 From: Merlinv3 <59935740+Merlinv3@users.noreply.github.com> Date: Wed, 31 Mar 2021 12:01:34 +0200 Subject: [PATCH 04/20] Update NXDNHosts.txt Update NXDNHosts.txt 914 reflector add new ip --- NXDNGateway/NXDNHosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 11d3b90..82ad5c0 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -43,7 +43,7 @@ 911 nxdn.k2cop.com 41400 # 914 Latin America -914 164.132.96.157 41400 +914 80.211.94.145 41400 # 1200 Florida 1200 florida.nxref.org 41400 From 8b7bee2d6f36f2faee67f4be77161ad9fd2796bc Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Wed, 31 Mar 2021 13:40:02 +0200 Subject: [PATCH 05/20] Fix nasty bug in UDPSocket::close(). --- NXDNGateway/UDPSocket.cpp | 8 +++++--- NXDNParrot/UDPSocket.cpp | 8 +++++--- NXDNReflector/UDPSocket.cpp | 6 ++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/NXDNGateway/UDPSocket.cpp b/NXDNGateway/UDPSocket.cpp index 510c8a2..e083477 100644 --- a/NXDNGateway/UDPSocket.cpp +++ b/NXDNGateway/UDPSocket.cpp @@ -187,6 +187,8 @@ bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std return false; } + close(index); + int fd = ::socket(addr.ss_family, SOCK_DGRAM, 0); if (fd < 0) { #if defined(_WIN32) || defined(_WIN64) @@ -343,13 +345,13 @@ bool CUDPSocket::write(const unsigned char* buffer, unsigned int length, const s void CUDPSocket::close() { - for (int i = 0; i < UDP_SOCKET_MAX; i++) - close(m_fd[i]); + for (unsigned int i = 0; i < UDP_SOCKET_MAX; i++) + close(i); } void CUDPSocket::close(const unsigned int index) { - if (m_fd[index] >= 0) { + if ((index < UDP_SOCKET_MAX) && (m_fd[index] >= 0)) { #if defined(_WIN32) || defined(_WIN64) ::closesocket(m_fd[index]); #else diff --git a/NXDNParrot/UDPSocket.cpp b/NXDNParrot/UDPSocket.cpp index ad8a0eb..7b819fe 100644 --- a/NXDNParrot/UDPSocket.cpp +++ b/NXDNParrot/UDPSocket.cpp @@ -188,6 +188,8 @@ bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std return false; } + close(index); + int fd = ::socket(addr.ss_family, SOCK_DGRAM, 0); if (fd < 0) { #if defined(_WIN32) || defined(_WIN64) @@ -344,13 +346,13 @@ bool CUDPSocket::write(const unsigned char* buffer, unsigned int length, const s void CUDPSocket::close() { - for (int i = 0; i < UDP_SOCKET_MAX; i++) - close(m_fd[i]); + for (unsigned int i = 0; i < UDP_SOCKET_MAX; i++) + close(i); } void CUDPSocket::close(const unsigned int index) { - if (m_fd[index] >= 0) { + if ((index < UDP_SOCKET_MAX) && (m_fd[index] >= 0)) { #if defined(_WIN32) || defined(_WIN64) ::closesocket(m_fd[index]); #else diff --git a/NXDNReflector/UDPSocket.cpp b/NXDNReflector/UDPSocket.cpp index f52249d..e192dc6 100644 --- a/NXDNReflector/UDPSocket.cpp +++ b/NXDNReflector/UDPSocket.cpp @@ -215,6 +215,8 @@ bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std return false; } + close(index); + int fd = ::socket(addr.ss_family, SOCK_DGRAM, 0); if (fd < 0) { #if defined(_WIN32) || defined(_WIN64) @@ -372,12 +374,12 @@ bool CUDPSocket::write(const unsigned char* buffer, unsigned int length, const s void CUDPSocket::close() { for (int i = 0; i < UDP_SOCKET_MAX; i++) - close(m_fd[i]); + close(i); } void CUDPSocket::close(const unsigned int index) { - if (m_fd[index] >= 0) { + if ((index < UDP_SOCKET_MAX) && (m_fd[index] >= 0)) { #if defined(_WIN32) || defined(_WIN64) ::closesocket(m_fd[index]); #else From 9ed16ddef0630f0957b552de00abdf444b1951a9 Mon Sep 17 00:00:00 2001 From: kb9tzq <47874088+kb9tzq@users.noreply.github.com> Date: Sat, 10 Apr 2021 02:57:51 -0500 Subject: [PATCH 06/20] Update NXDNHosts.txt change 31171 Illinois to Illinois Link and add new host illink.radiotechnology.xyz --- NXDNGateway/NXDNHosts.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 82ad5c0..3083af1 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -240,8 +240,8 @@ # 31137 Kingsland Digital Link 31137 74.91.119.94 41400 -# 31171 Illinois -31171 74.208.235.115 41400 +# 31171 Illinois Link +31171 illink.radiotechnology.xyz 41400 # 31188 Southern Indiana 31188 w9windigital.org 41400 From fbdc734b9c3045d810836a9124755663ef479345 Mon Sep 17 00:00:00 2001 From: M0GLJ <32222213+m0glj@users.noreply.github.com> Date: Sun, 11 Apr 2021 00:19:57 +0100 Subject: [PATCH 07/20] Update NXDNHosts.txt Host Server & Reflector Name Change --- NXDNGateway/NXDNHosts.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 3083af1..051d727 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -273,8 +273,8 @@ # 31672 Pi-Star 31672 nxdn-31672.pistar.uk 41400 -# 31769 MB6NG NXDN -31769 xlx235.mb6ng.uk 41400 +# 31769 OZ-DMR +31769 reflector.oz-dmr.uk 41400 # 31777 DX-LINK SYSTEM, 31777 8.9.4.102 41400 From e7f9736e90b834008d9d12749d1650b020e07a34 Mon Sep 17 00:00:00 2001 From: Merlinv3 <59935740+Merlinv3@users.noreply.github.com> Date: Tue, 13 Apr 2021 16:25:09 +0200 Subject: [PATCH 08/20] Update NXDNHosts.txt NXDNHosts.txt update for new NXDN Reflector --- NXDNGateway/NXDNHosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 051d727..74e8c7d 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -150,6 +150,9 @@ # 21410 NXDN SPAIN 21410 nxdn21410.nxdn.es 41400 +# 21401 Andalucia Room +21401 94.177.235.81 41401 + # 21418 NXDN RC Veleta 21418 rcveleta.xreflector.es 41400 From bda691ffeba620fe68349be5873dc32bafd0bc66 Mon Sep 17 00:00:00 2001 From: Merlinv3 <59935740+Merlinv3@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:07:13 +0200 Subject: [PATCH 09/20] Update NXDNHosts.txt fix ip now is ok sorry --- NXDNGateway/NXDNHosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 74e8c7d..def4645 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -151,7 +151,7 @@ 21410 nxdn21410.nxdn.es 41400 # 21401 Andalucia Room -21401 94.177.235.81 41401 +21401 94.177.189.17 41401 # 21418 NXDN RC Veleta 21418 rcveleta.xreflector.es 41400 From d313be6dab3339cc24cb7e1a1f86b04fd3461918 Mon Sep 17 00:00:00 2001 From: M0GLJ <32222213+m0glj@users.noreply.github.com> Date: Thu, 15 Apr 2021 22:17:36 +0100 Subject: [PATCH 10/20] Update NXDNHosts.txt Spelling Correction --- NXDNGateway/NXDNHosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index def4645..c9c417b 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -186,7 +186,7 @@ # 22825 Swiss NXDN Reflerctor 22825 212.237.33.114 41400 -# 23426 FreeSTAR NXDN Reflerctor +# 23426 FreeSTAR NXDN Reflector 23426 obp.freestar.network 41400 # 23551 NXDN Scotland From ae9d88d25491f885b38b12b48b5c416915a7ed48 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Sun, 25 Apr 2021 07:48:10 +0200 Subject: [PATCH 11/20] Fix network ports datatype (unsigned int -> unsigned short). UDPSocket: fix old bug using m_port instead of m_port[x]. --- NXDNGateway/APRSWriter.cpp | 2 +- NXDNGateway/APRSWriter.h | 2 +- NXDNGateway/Conf.cpp | 28 ++++++++++++++-------------- NXDNGateway/Conf.h | 28 ++++++++++++++-------------- NXDNGateway/IcomNetwork.cpp | 2 +- NXDNGateway/IcomNetwork.h | 2 +- NXDNGateway/KenwoodNetwork.cpp | 2 +- NXDNGateway/KenwoodNetwork.h | 2 +- NXDNGateway/NXDNGateway.cpp | 2 +- NXDNGateway/NXDNNetwork.cpp | 2 +- NXDNGateway/NXDNNetwork.h | 4 ++-- NXDNGateway/Reflectors.cpp | 8 ++++---- NXDNGateway/Reflectors.h | 8 ++++---- NXDNGateway/UDPSocket.cpp | 15 ++++++++------- NXDNGateway/UDPSocket.h | 10 +++++----- NXDNParrot/NXDNNetwork.cpp | 2 +- NXDNParrot/NXDNNetwork.h | 2 +- NXDNParrot/NXDNParrot.cpp | 4 ++-- NXDNParrot/NXDNParrot.h | 4 ++-- NXDNParrot/UDPSocket.cpp | 14 +++++++------- NXDNParrot/UDPSocket.h | 10 +++++----- NXDNReflector/Conf.cpp | 4 ++-- NXDNReflector/Conf.h | 4 ++-- NXDNReflector/NXDNNetwork.cpp | 2 +- NXDNReflector/NXDNNetwork.h | 2 +- NXDNReflector/UDPSocket.cpp | 21 +++++++++++---------- NXDNReflector/UDPSocket.h | 10 +++++----- 27 files changed, 99 insertions(+), 97 deletions(-) diff --git a/NXDNGateway/APRSWriter.cpp b/NXDNGateway/APRSWriter.cpp index bc58ea9..6955487 100644 --- a/NXDNGateway/APRSWriter.cpp +++ b/NXDNGateway/APRSWriter.cpp @@ -24,7 +24,7 @@ #include #include -CAPRSWriter::CAPRSWriter(const std::string& callsign, const std::string& suffix, const std::string& address, unsigned int port, bool debug) : +CAPRSWriter::CAPRSWriter(const std::string& callsign, const std::string& suffix, const std::string& address, unsigned short port, bool debug) : m_idTimer(1000U), m_callsign(callsign), m_debug(debug), diff --git a/NXDNGateway/APRSWriter.h b/NXDNGateway/APRSWriter.h index b4a113c..8dab91f 100644 --- a/NXDNGateway/APRSWriter.h +++ b/NXDNGateway/APRSWriter.h @@ -42,7 +42,7 @@ class CAPRSWriter { public: - CAPRSWriter(const std::string& callsign, const std::string& suffix, const std::string& address, unsigned int port, bool debug); + CAPRSWriter(const std::string& callsign, const std::string& suffix, const std::string& address, unsigned short port, bool debug); ~CAPRSWriter(); bool open(); diff --git a/NXDNGateway/Conf.cpp b/NXDNGateway/Conf.cpp index 358c114..fd36aa7 100644 --- a/NXDNGateway/Conf.cpp +++ b/NXDNGateway/Conf.cpp @@ -177,9 +177,9 @@ bool CConf::read() else if (::strcmp(key, "RptAddress") == 0) m_rptAddress = value; else if (::strcmp(key, "RptPort") == 0) - m_rptPort = (unsigned int)::atoi(value); + m_rptPort = (unsigned short)::atoi(value); else if (::strcmp(key, "LocalPort") == 0) - m_myPort = (unsigned int)::atoi(value); + m_myPort = (unsigned short)::atoi(value); else if (::strcmp(key, "Debug") == 0) m_debug = ::atoi(value) == 1; else if (::strcmp(key, "Daemon") == 0) @@ -230,14 +230,14 @@ bool CConf::read() else if (::strcmp(key, "Address") == 0) m_aprsAddress = value; else if (::strcmp(key, "Port") == 0) - m_aprsPort = (unsigned int)::atoi(value); + m_aprsPort = (unsigned short)::atoi(value); else if (::strcmp(key, "Suffix") == 0) m_aprsSuffix = value; else if (::strcmp(key, "Description") == 0) m_aprsDescription = value; } else if (section == SECTION_NETWORK) { if (::strcmp(key, "Port") == 0) - m_networkPort = (unsigned int)::atoi(value); + m_networkPort = (unsigned short)::atoi(value); else if (::strcmp(key, "HostsFile1") == 0) m_networkHosts1 = value; else if (::strcmp(key, "HostsFile2") == 0) @@ -247,11 +247,11 @@ bool CConf::read() else if (::strcmp(key, "ParrotAddress") == 0) m_networkParrotAddress = value; else if (::strcmp(key, "ParrotPort") == 0) - m_networkParrotPort = (unsigned int)::atoi(value); + m_networkParrotPort = (unsigned short)::atoi(value); else if (::strcmp(key, "NXDN2DMRAddress") == 0) m_networkNXDN2DMRAddress = value; else if (::strcmp(key, "NXDN2DMRPort") == 0) - m_networkNXDN2DMRPort = (unsigned int)::atoi(value); + m_networkNXDN2DMRPort = (unsigned short)::atoi(value); else if (::strcmp(key, "Static") == 0) { char* p = ::strtok(value, ",\r\n"); while (p != NULL) { @@ -276,7 +276,7 @@ bool CConf::read() if (::strcmp(key, "Enable") == 0) m_remoteCommandsEnabled = ::atoi(value) == 1; else if (::strcmp(key, "Port") == 0) - m_remoteCommandsPort = (unsigned int)::atoi(value); + m_remoteCommandsPort = (unsigned short)::atoi(value); } } @@ -305,12 +305,12 @@ std::string CConf::getRptAddress() const return m_rptAddress; } -unsigned int CConf::getRptPort() const +unsigned short CConf::getRptPort() const { return m_rptPort; } -unsigned int CConf::getMyPort() const +unsigned short CConf::getMyPort() const { return m_myPort; } @@ -400,7 +400,7 @@ std::string CConf::getAPRSAddress() const return m_aprsAddress; } -unsigned int CConf::getAPRSPort() const +unsigned short CConf::getAPRSPort() const { return m_aprsPort; } @@ -440,7 +440,7 @@ bool CConf::getLogFileRotate() const return m_logFileRotate; } -unsigned int CConf::getNetworkPort() const +unsigned short CConf::getNetworkPort() const { return m_networkPort; } @@ -465,7 +465,7 @@ std::string CConf::getNetworkParrotAddress() const return m_networkParrotAddress; } -unsigned int CConf::getNetworkParrotPort() const +unsigned short CConf::getNetworkParrotPort() const { return m_networkParrotPort; } @@ -475,7 +475,7 @@ std::string CConf::getNetworkNXDN2DMRAddress() const return m_networkNXDN2DMRAddress; } -unsigned int CConf::getNetworkNXDN2DMRPort() const +unsigned short CConf::getNetworkNXDN2DMRPort() const { return m_networkNXDN2DMRPort; } @@ -520,7 +520,7 @@ bool CConf::getRemoteCommandsEnabled() const return m_remoteCommandsEnabled; } -unsigned int CConf::getRemoteCommandsPort() const +unsigned short CConf::getRemoteCommandsPort() const { return m_remoteCommandsPort; } diff --git a/NXDNGateway/Conf.h b/NXDNGateway/Conf.h index ca217af..1e272f6 100644 --- a/NXDNGateway/Conf.h +++ b/NXDNGateway/Conf.h @@ -35,8 +35,8 @@ public: std::string getSuffix() const; std::string getRptProtocol() const; std::string getRptAddress() const; - unsigned int getRptPort() const; - unsigned int getMyPort() const; + unsigned short getRptPort() const; + unsigned short getMyPort() const; bool getDebug() const; bool getDaemon() const; @@ -62,7 +62,7 @@ public: // The APRS section bool getAPRSEnabled() const; std::string getAPRSAddress() const; - unsigned int getAPRSPort() const; + unsigned short getAPRSPort() const; std::string getAPRSSuffix() const; std::string getAPRSDescription() const; @@ -74,14 +74,14 @@ public: bool getLogFileRotate() const; // The Network section - unsigned int getNetworkPort() const; + unsigned short getNetworkPort() const; std::string getNetworkHosts1() const; std::string getNetworkHosts2() const; unsigned int getNetworkReloadTime() const; std::string getNetworkParrotAddress() const; - unsigned int getNetworkParrotPort() const; + unsigned short getNetworkParrotPort() const; std::string getNetworkNXDN2DMRAddress() const; - unsigned int getNetworkNXDN2DMRPort() const; + unsigned short getNetworkNXDN2DMRPort() const; std::vector getNetworkStatic() const; unsigned int getNetworkRFHangTime() const; unsigned int getNetworkNetHangTime() const; @@ -94,7 +94,7 @@ public: // The Remote Commands section bool getRemoteCommandsEnabled() const; - unsigned int getRemoteCommandsPort() const; + unsigned short getRemoteCommandsPort() const; private: std::string m_file; @@ -102,8 +102,8 @@ private: std::string m_suffix; std::string m_rptProtocol; std::string m_rptAddress; - unsigned int m_rptPort; - unsigned int m_myPort; + unsigned short m_rptPort; + unsigned short m_myPort; bool m_debug; bool m_daemon; @@ -131,18 +131,18 @@ private: bool m_aprsEnabled; std::string m_aprsAddress; - unsigned int m_aprsPort; + unsigned short m_aprsPort; std::string m_aprsSuffix; std::string m_aprsDescription; - unsigned int m_networkPort; + unsigned short m_networkPort; std::string m_networkHosts1; std::string m_networkHosts2; unsigned int m_networkReloadTime; std::string m_networkParrotAddress; - unsigned int m_networkParrotPort; + unsigned short m_networkParrotPort; std::string m_networkNXDN2DMRAddress; - unsigned int m_networkNXDN2DMRPort; + unsigned short m_networkNXDN2DMRPort; std::vector m_networkStatic; unsigned int m_networkRFHangTime; unsigned int m_networkNetHangTime; @@ -153,7 +153,7 @@ private: std::string m_gpsdPort; bool m_remoteCommandsEnabled; - unsigned int m_remoteCommandsPort; + unsigned short m_remoteCommandsPort; }; #endif diff --git a/NXDNGateway/IcomNetwork.cpp b/NXDNGateway/IcomNetwork.cpp index da3e1bd..133796e 100644 --- a/NXDNGateway/IcomNetwork.cpp +++ b/NXDNGateway/IcomNetwork.cpp @@ -26,7 +26,7 @@ const unsigned int BUFFER_LENGTH = 200U; -CIcomNetwork::CIcomNetwork(unsigned int localPort, const std::string& rptAddress, unsigned int rptPort, bool debug) : +CIcomNetwork::CIcomNetwork(unsigned short localPort, const std::string& rptAddress, unsigned short rptPort, bool debug) : m_socket(localPort), m_addr(), m_addrLen(0U), diff --git a/NXDNGateway/IcomNetwork.h b/NXDNGateway/IcomNetwork.h index 040f5dd..ad82be8 100644 --- a/NXDNGateway/IcomNetwork.h +++ b/NXDNGateway/IcomNetwork.h @@ -27,7 +27,7 @@ class CIcomNetwork : public IRptNetwork { public: - CIcomNetwork(unsigned int localPort, const std::string& rptAddress, unsigned int rptPort, bool debug); + CIcomNetwork(unsigned short localPort, const std::string& rptAddress, unsigned short rptPort, bool debug); virtual ~CIcomNetwork(); virtual bool open(); diff --git a/NXDNGateway/KenwoodNetwork.cpp b/NXDNGateway/KenwoodNetwork.cpp index a5f1abe..80274a9 100644 --- a/NXDNGateway/KenwoodNetwork.cpp +++ b/NXDNGateway/KenwoodNetwork.cpp @@ -33,7 +33,7 @@ const unsigned char BIT_MASK_TABLE[] = { 0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04 const unsigned int BUFFER_LENGTH = 200U; -CKenwoodNetwork::CKenwoodNetwork(unsigned int localPort, const std::string& rptAddress, unsigned int rptPort, bool debug) : +CKenwoodNetwork::CKenwoodNetwork(unsigned short localPort, const std::string& rptAddress, unsigned short rptPort, bool debug) : m_rtpSocket(localPort + 0U), m_rtcpSocket(localPort + 1U), m_rtcpAddr(), diff --git a/NXDNGateway/KenwoodNetwork.h b/NXDNGateway/KenwoodNetwork.h index bcaa950..c0e654b 100644 --- a/NXDNGateway/KenwoodNetwork.h +++ b/NXDNGateway/KenwoodNetwork.h @@ -29,7 +29,7 @@ class CKenwoodNetwork : public IRptNetwork { public: - CKenwoodNetwork(unsigned int localPort, const std::string& rptAddress, unsigned int rptPort, bool debug); + CKenwoodNetwork(unsigned short localPort, const std::string& rptAddress, unsigned short rptPort, bool debug); virtual ~CKenwoodNetwork(); virtual bool open(); diff --git a/NXDNGateway/NXDNGateway.cpp b/NXDNGateway/NXDNGateway.cpp index cc89c3a..39fbccb 100644 --- a/NXDNGateway/NXDNGateway.cpp +++ b/NXDNGateway/NXDNGateway.cpp @@ -628,7 +628,7 @@ void CNXDNGateway::createGPS() std::string callsign = m_conf.getCallsign(); std::string rptSuffix = m_conf.getSuffix(); std::string address = m_conf.getAPRSAddress(); - unsigned int port = m_conf.getAPRSPort(); + unsigned short port = m_conf.getAPRSPort(); std::string suffix = m_conf.getAPRSSuffix(); bool debug = m_conf.getDebug(); diff --git a/NXDNGateway/NXDNNetwork.cpp b/NXDNGateway/NXDNNetwork.cpp index aecbf85..c7644cc 100644 --- a/NXDNGateway/NXDNNetwork.cpp +++ b/NXDNGateway/NXDNNetwork.cpp @@ -24,7 +24,7 @@ #include #include -CNXDNNetwork::CNXDNNetwork(unsigned int port, const std::string& callsign, bool debug) : +CNXDNNetwork::CNXDNNetwork(unsigned short port, const std::string& callsign, bool debug) : m_callsign(callsign), m_socket(), m_port(port), diff --git a/NXDNGateway/NXDNNetwork.h b/NXDNGateway/NXDNNetwork.h index 55a706c..1d4dd85 100644 --- a/NXDNGateway/NXDNNetwork.h +++ b/NXDNGateway/NXDNNetwork.h @@ -26,7 +26,7 @@ class CNXDNNetwork { public: - CNXDNNetwork(unsigned int port, const std::string& callsign, bool debug); + CNXDNNetwork(unsigned short port, const std::string& callsign, bool debug); ~CNXDNNetwork(); bool open(); @@ -44,7 +44,7 @@ public: private: std::string m_callsign; CUDPSocket m_socket; - unsigned int m_port; + unsigned short m_port; bool m_debug; }; diff --git a/NXDNGateway/Reflectors.cpp b/NXDNGateway/Reflectors.cpp index 9b509eb..98d254e 100644 --- a/NXDNGateway/Reflectors.cpp +++ b/NXDNGateway/Reflectors.cpp @@ -46,13 +46,13 @@ CReflectors::~CReflectors() m_reflectors.clear(); } -void CReflectors::setParrot(const std::string& address, unsigned int port) +void CReflectors::setParrot(const std::string& address, unsigned short port) { m_parrotAddress = address; m_parrotPort = port; } -void CReflectors::setNXDN2DMR(const std::string& address, unsigned int port) +void CReflectors::setNXDN2DMR(const std::string& address, unsigned short port) { m_nxdn2dmrAddress = address; m_nxdn2dmrPort = port; @@ -79,7 +79,7 @@ bool CReflectors::load() if (p1 != NULL && p2 != NULL && p3 != NULL) { std::string host = std::string(p2); - unsigned int port = (unsigned int)::atoi(p3); + unsigned short port = (unsigned short)::atoi(p3); sockaddr_storage addr; unsigned int addrLen; @@ -114,7 +114,7 @@ bool CReflectors::load() unsigned int id = (unsigned int)::atoi(p1); if (find(id) == NULL) { std::string host = std::string(p2); - unsigned int port = (unsigned int)::atoi(p3); + unsigned short port = (unsigned short)::atoi(p3); sockaddr_storage addr; unsigned int addrLen; diff --git a/NXDNGateway/Reflectors.h b/NXDNGateway/Reflectors.h index 9e0358a..692e3f8 100644 --- a/NXDNGateway/Reflectors.h +++ b/NXDNGateway/Reflectors.h @@ -44,8 +44,8 @@ public: CReflectors(const std::string& hostsFile1, const std::string& hostsFile2, unsigned int reloadTime); ~CReflectors(); - void setParrot(const std::string& address, unsigned int port); - void setNXDN2DMR(const std::string& address, unsigned int port); + void setParrot(const std::string& address, unsigned short port); + void setNXDN2DMR(const std::string& address, unsigned short port); bool load(); @@ -57,9 +57,9 @@ private: std::string m_hostsFile1; std::string m_hostsFile2; std::string m_parrotAddress; - unsigned int m_parrotPort; + unsigned short m_parrotPort; std::string m_nxdn2dmrAddress; - unsigned int m_nxdn2dmrPort; + unsigned short m_nxdn2dmrPort; std::vector m_reflectors; CTimer m_timer; }; diff --git a/NXDNGateway/UDPSocket.cpp b/NXDNGateway/UDPSocket.cpp index e083477..0792863 100644 --- a/NXDNGateway/UDPSocket.cpp +++ b/NXDNGateway/UDPSocket.cpp @@ -28,11 +28,12 @@ #if defined(HAVE_LOG_H) #include "Log.h" #else +#define LogMessage(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #define LogError(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #define LogInfo(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #endif -CUDPSocket::CUDPSocket(const std::string& address, unsigned int port) : +CUDPSocket::CUDPSocket(const std::string& address, unsigned short port) : m_address_save(address), m_port_save(port), m_counter(0U) @@ -45,7 +46,7 @@ m_counter(0U) } } -CUDPSocket::CUDPSocket(unsigned int port) : +CUDPSocket::CUDPSocket(unsigned short port) : m_address_save(), m_port_save(port), m_counter(0U) @@ -79,7 +80,7 @@ void CUDPSocket::shutdown() #endif } -int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_storage& addr, unsigned int& address_length) +int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockaddr_storage& addr, unsigned int& address_length) { struct addrinfo hints; ::memset(&hints, 0, sizeof(hints)); @@ -87,7 +88,7 @@ int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_ return lookup(hostname, port, addr, address_length, hints); } -int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_storage& addr, unsigned int& address_length, struct addrinfo& hints) +int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockaddr_storage& addr, unsigned int& address_length, struct addrinfo& hints) { std::string portstr = std::to_string(port); struct addrinfo *res; @@ -170,7 +171,7 @@ bool CUDPSocket::open(unsigned int af) return open(0, af, m_address_save, m_port_save); } -bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned int port) +bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned short port) { sockaddr_storage addr; unsigned int addrlen; @@ -224,7 +225,7 @@ bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std return false; } - LogInfo("Opening UDP port on %u", port); + LogInfo("Opening UDP port on %hu", port); } return true; @@ -293,7 +294,7 @@ int CUDPSocket::read(unsigned char* buffer, unsigned int length, sockaddr_storag LogError("Error returned from recvfrom, err: %d", errno); if (len == -1 && errno == ENOTSOCK) { - LogMessage("Re-opening UDP port on %u", m_port); + LogMessage("Re-opening UDP port on %hu", m_port[index]); close(); open(); } diff --git a/NXDNGateway/UDPSocket.h b/NXDNGateway/UDPSocket.h index 6e3846c..3e75554 100644 --- a/NXDNGateway/UDPSocket.h +++ b/NXDNGateway/UDPSocket.h @@ -46,13 +46,13 @@ enum IPMATCHTYPE { class CUDPSocket { public: - CUDPSocket(const std::string& address, unsigned int port = 0U); - CUDPSocket(unsigned int port = 0U); + CUDPSocket(const std::string& address, unsigned short port = 0U); + CUDPSocket(unsigned short port = 0U); ~CUDPSocket(); bool open(unsigned int af = AF_UNSPEC); bool open(const sockaddr_storage& address); - bool open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned int port); + bool open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned short port); int read(unsigned char* buffer, unsigned int length, sockaddr_storage& address, unsigned int &address_length); bool write(const unsigned char* buffer, unsigned int length, const sockaddr_storage& address, unsigned int address_length); @@ -63,8 +63,8 @@ public: static void startup(); static void shutdown(); - static int lookup(const std::string& hostName, unsigned int port, sockaddr_storage& address, unsigned int& address_length); - static int lookup(const std::string& hostName, unsigned int port, sockaddr_storage& address, unsigned int& address_length, struct addrinfo& hints); + static int lookup(const std::string& hostName, unsigned short port, sockaddr_storage& address, unsigned int& address_length); + static int lookup(const std::string& hostName, unsigned short port, sockaddr_storage& address, unsigned int& address_length, struct addrinfo& hints); static bool match(const sockaddr_storage& addr1, const sockaddr_storage& addr2, IPMATCHTYPE type = IMT_ADDRESS_AND_PORT); diff --git a/NXDNParrot/NXDNNetwork.cpp b/NXDNParrot/NXDNNetwork.cpp index 3600b71..a0d975e 100644 --- a/NXDNParrot/NXDNNetwork.cpp +++ b/NXDNParrot/NXDNNetwork.cpp @@ -22,7 +22,7 @@ #include #include -CNXDNNetwork::CNXDNNetwork(unsigned int port) : +CNXDNNetwork::CNXDNNetwork(unsigned short port) : m_socket(port), m_addr(), m_addrLen(0U) diff --git a/NXDNParrot/NXDNNetwork.h b/NXDNParrot/NXDNNetwork.h index 6d00263..8f2f5b9 100644 --- a/NXDNParrot/NXDNNetwork.h +++ b/NXDNParrot/NXDNNetwork.h @@ -26,7 +26,7 @@ class CNXDNNetwork { public: - CNXDNNetwork(unsigned int port); + CNXDNNetwork(unsigned short port); ~CNXDNNetwork(); bool open(); diff --git a/NXDNParrot/NXDNParrot.cpp b/NXDNParrot/NXDNParrot.cpp index 9e63a20..793236b 100644 --- a/NXDNParrot/NXDNParrot.cpp +++ b/NXDNParrot/NXDNParrot.cpp @@ -35,7 +35,7 @@ int main(int argc, char** argv) return 1; } - unsigned int port = ::atoi(argv[1U]); + unsigned short port = (unsigned short)::atoi(argv[1U]); if (port == 0U) { ::fprintf(stderr, "NXDNParrot: invalid port number - %s\n", argv[1U]); return 1; @@ -47,7 +47,7 @@ int main(int argc, char** argv) return 0; } -CNXDNParrot::CNXDNParrot(unsigned int port) : +CNXDNParrot::CNXDNParrot(unsigned short port) : m_port(port) { CUDPSocket::startup(); diff --git a/NXDNParrot/NXDNParrot.h b/NXDNParrot/NXDNParrot.h index 1d3c190..b06c2b3 100644 --- a/NXDNParrot/NXDNParrot.h +++ b/NXDNParrot/NXDNParrot.h @@ -22,13 +22,13 @@ class CNXDNParrot { public: - CNXDNParrot(unsigned int port); + CNXDNParrot(unsigned short port); ~CNXDNParrot(); void run(); private: - unsigned int m_port; + unsigned short m_port; }; #endif diff --git a/NXDNParrot/UDPSocket.cpp b/NXDNParrot/UDPSocket.cpp index 7b819fe..0792863 100644 --- a/NXDNParrot/UDPSocket.cpp +++ b/NXDNParrot/UDPSocket.cpp @@ -33,7 +33,7 @@ #define LogInfo(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #endif -CUDPSocket::CUDPSocket(const std::string& address, unsigned int port) : +CUDPSocket::CUDPSocket(const std::string& address, unsigned short port) : m_address_save(address), m_port_save(port), m_counter(0U) @@ -46,7 +46,7 @@ m_counter(0U) } } -CUDPSocket::CUDPSocket(unsigned int port) : +CUDPSocket::CUDPSocket(unsigned short port) : m_address_save(), m_port_save(port), m_counter(0U) @@ -80,7 +80,7 @@ void CUDPSocket::shutdown() #endif } -int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_storage& addr, unsigned int& address_length) +int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockaddr_storage& addr, unsigned int& address_length) { struct addrinfo hints; ::memset(&hints, 0, sizeof(hints)); @@ -88,7 +88,7 @@ int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_ return lookup(hostname, port, addr, address_length, hints); } -int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_storage& addr, unsigned int& address_length, struct addrinfo& hints) +int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockaddr_storage& addr, unsigned int& address_length, struct addrinfo& hints) { std::string portstr = std::to_string(port); struct addrinfo *res; @@ -171,7 +171,7 @@ bool CUDPSocket::open(unsigned int af) return open(0, af, m_address_save, m_port_save); } -bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned int port) +bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned short port) { sockaddr_storage addr; unsigned int addrlen; @@ -225,7 +225,7 @@ bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std return false; } - LogInfo("Opening UDP port on %u", port); + LogInfo("Opening UDP port on %hu", port); } return true; @@ -294,7 +294,7 @@ int CUDPSocket::read(unsigned char* buffer, unsigned int length, sockaddr_storag LogError("Error returned from recvfrom, err: %d", errno); if (len == -1 && errno == ENOTSOCK) { - LogMessage("Re-opening UDP port on %u", m_port); + LogMessage("Re-opening UDP port on %hu", m_port[index]); close(); open(); } diff --git a/NXDNParrot/UDPSocket.h b/NXDNParrot/UDPSocket.h index 6e3846c..3e75554 100644 --- a/NXDNParrot/UDPSocket.h +++ b/NXDNParrot/UDPSocket.h @@ -46,13 +46,13 @@ enum IPMATCHTYPE { class CUDPSocket { public: - CUDPSocket(const std::string& address, unsigned int port = 0U); - CUDPSocket(unsigned int port = 0U); + CUDPSocket(const std::string& address, unsigned short port = 0U); + CUDPSocket(unsigned short port = 0U); ~CUDPSocket(); bool open(unsigned int af = AF_UNSPEC); bool open(const sockaddr_storage& address); - bool open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned int port); + bool open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned short port); int read(unsigned char* buffer, unsigned int length, sockaddr_storage& address, unsigned int &address_length); bool write(const unsigned char* buffer, unsigned int length, const sockaddr_storage& address, unsigned int address_length); @@ -63,8 +63,8 @@ public: static void startup(); static void shutdown(); - static int lookup(const std::string& hostName, unsigned int port, sockaddr_storage& address, unsigned int& address_length); - static int lookup(const std::string& hostName, unsigned int port, sockaddr_storage& address, unsigned int& address_length, struct addrinfo& hints); + static int lookup(const std::string& hostName, unsigned short port, sockaddr_storage& address, unsigned int& address_length); + static int lookup(const std::string& hostName, unsigned short port, sockaddr_storage& address, unsigned int& address_length, struct addrinfo& hints); static bool match(const sockaddr_storage& addr1, const sockaddr_storage& addr2, IPMATCHTYPE type = IMT_ADDRESS_AND_PORT); diff --git a/NXDNReflector/Conf.cpp b/NXDNReflector/Conf.cpp index 6593fa3..3a363f5 100644 --- a/NXDNReflector/Conf.cpp +++ b/NXDNReflector/Conf.cpp @@ -148,7 +148,7 @@ bool CConf::read() m_logFileRotate = ::atoi(value) == 1; } else if (section == SECTION_NETWORK) { if (::strcmp(key, "Port") == 0) - m_networkPort = (unsigned int)::atoi(value); + m_networkPort = (unsigned short)::atoi(value); else if (::strcmp(key, "Debug") == 0) m_networkDebug = ::atoi(value) == 1; } else if (section == SECTION_ICOM_NETWORK) { @@ -226,7 +226,7 @@ bool CConf::getLogFileRotate() const return m_logFileRotate; } -unsigned int CConf::getNetworkPort() const +unsigned short CConf::getNetworkPort() const { return m_networkPort; } diff --git a/NXDNReflector/Conf.h b/NXDNReflector/Conf.h index a89b28b..4c590d1 100644 --- a/NXDNReflector/Conf.h +++ b/NXDNReflector/Conf.h @@ -46,7 +46,7 @@ public: bool getLogFileRotate() const; // The Network section - unsigned int getNetworkPort() const; + unsigned short getNetworkPort() const; bool getNetworkDebug() const; // The Icom Network section @@ -77,7 +77,7 @@ private: std::string m_logFileRoot; bool m_logFileRotate; - unsigned int m_networkPort; + unsigned short m_networkPort; bool m_networkDebug; bool m_icomEnabled; diff --git a/NXDNReflector/NXDNNetwork.cpp b/NXDNReflector/NXDNNetwork.cpp index c59c360..c071c2f 100644 --- a/NXDNReflector/NXDNNetwork.cpp +++ b/NXDNReflector/NXDNNetwork.cpp @@ -24,7 +24,7 @@ #include #include -CNXDNNetwork::CNXDNNetwork(unsigned int port, bool debug) : +CNXDNNetwork::CNXDNNetwork(unsigned short port, bool debug) : m_socket(port), m_debug(debug) { diff --git a/NXDNReflector/NXDNNetwork.h b/NXDNReflector/NXDNNetwork.h index 8dba4f4..4af9b27 100644 --- a/NXDNReflector/NXDNNetwork.h +++ b/NXDNReflector/NXDNNetwork.h @@ -26,7 +26,7 @@ class CNXDNNetwork { public: - CNXDNNetwork(unsigned int port, bool debug); + CNXDNNetwork(unsigned short port, bool debug); ~CNXDNNetwork(); bool open(); diff --git a/NXDNReflector/UDPSocket.cpp b/NXDNReflector/UDPSocket.cpp index e192dc6..377330f 100644 --- a/NXDNReflector/UDPSocket.cpp +++ b/NXDNReflector/UDPSocket.cpp @@ -28,11 +28,12 @@ #if defined(HAVE_LOG_H) #include "Log.h" #else +#define LogMessage(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #define LogError(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #define LogInfo(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #endif -CUDPSocket::CUDPSocket(const std::string& address, unsigned int port) : +CUDPSocket::CUDPSocket(const std::string& address, unsigned short port) : m_address_save(address), m_port_save(port), m_counter(0U) @@ -45,7 +46,7 @@ m_counter(0U) } } -CUDPSocket::CUDPSocket(unsigned int port) : +CUDPSocket::CUDPSocket(unsigned short port) : m_address_save(), m_port_save(port), m_counter(0U) @@ -79,7 +80,7 @@ void CUDPSocket::shutdown() #endif } -int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_storage& addr, unsigned int& address_length) +int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockaddr_storage& addr, unsigned int& address_length) { struct addrinfo hints; ::memset(&hints, 0, sizeof(hints)); @@ -87,7 +88,7 @@ int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_ return lookup(hostname, port, addr, address_length, hints); } -int CUDPSocket::lookup(const std::string& hostname, unsigned int port, sockaddr_storage& addr, unsigned int& address_length, struct addrinfo& hints) +int CUDPSocket::lookup(const std::string& hostname, unsigned short port, sockaddr_storage& addr, unsigned int& address_length, struct addrinfo& hints) { std::string portstr = std::to_string(port); struct addrinfo *res; @@ -171,14 +172,14 @@ char* CUDPSocket::display(const sockaddr_storage& addr, char* buffer, unsigned i ::inet_ntop(AF_INET, &in4, buffer, length); ::sprintf(buffer + ::strlen(buffer), ":%u", in4->sin_port); } - break; + break; case AF_INET6: { struct sockaddr_in6* in6 = (struct sockaddr_in6*)&addr; ::inet_ntop(AF_INET6, &in6, buffer, length); ::sprintf(buffer + ::strlen(buffer), ":%u", in6->sin6_port); } - break; + break; default: ::strcpy(buffer, "Unknown"); @@ -198,7 +199,7 @@ bool CUDPSocket::open(unsigned int af) return open(0, af, m_address_save, m_port_save); } -bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned int port) +bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned short port) { sockaddr_storage addr; unsigned int addrlen; @@ -252,7 +253,7 @@ bool CUDPSocket::open(const unsigned int index, const unsigned int af, const std return false; } - LogInfo("Opening UDP port on %u", port); + LogInfo("Opening UDP port on %hu", port); } return true; @@ -321,7 +322,7 @@ int CUDPSocket::read(unsigned char* buffer, unsigned int length, sockaddr_storag LogError("Error returned from recvfrom, err: %d", errno); if (len == -1 && errno == ENOTSOCK) { - LogMessage("Re-opening UDP port on %u", m_port); + LogMessage("Re-opening UDP port on %hu", m_port[index]); close(); open(); } @@ -373,7 +374,7 @@ bool CUDPSocket::write(const unsigned char* buffer, unsigned int length, const s void CUDPSocket::close() { - for (int i = 0; i < UDP_SOCKET_MAX; i++) + for (unsigned int i = 0; i < UDP_SOCKET_MAX; i++) close(i); } diff --git a/NXDNReflector/UDPSocket.h b/NXDNReflector/UDPSocket.h index 003483b..e7e1449 100644 --- a/NXDNReflector/UDPSocket.h +++ b/NXDNReflector/UDPSocket.h @@ -46,13 +46,13 @@ enum IPMATCHTYPE { class CUDPSocket { public: - CUDPSocket(const std::string& address, unsigned int port = 0U); - CUDPSocket(unsigned int port = 0U); + CUDPSocket(const std::string& address, unsigned short port = 0U); + CUDPSocket(unsigned short port = 0U); ~CUDPSocket(); bool open(unsigned int af = AF_UNSPEC); bool open(const sockaddr_storage& address); - bool open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned int port); + bool open(const unsigned int index, const unsigned int af, const std::string& address, const unsigned short port); int read(unsigned char* buffer, unsigned int length, sockaddr_storage& address, unsigned int &address_length); bool write(const unsigned char* buffer, unsigned int length, const sockaddr_storage& address, unsigned int address_length); @@ -63,8 +63,8 @@ public: static void startup(); static void shutdown(); - static int lookup(const std::string& hostName, unsigned int port, sockaddr_storage& address, unsigned int& address_length); - static int lookup(const std::string& hostName, unsigned int port, sockaddr_storage& address, unsigned int& address_length, struct addrinfo& hints); + static int lookup(const std::string& hostName, unsigned short port, sockaddr_storage& address, unsigned int& address_length); + static int lookup(const std::string& hostName, unsigned short port, sockaddr_storage& address, unsigned int& address_length, struct addrinfo& hints); static bool match(const sockaddr_storage& addr1, const sockaddr_storage& addr2, IPMATCHTYPE type = IMT_ADDRESS_AND_PORT); From b391e520fb76ec9bb0a16d006342646841683c25 Mon Sep 17 00:00:00 2001 From: postmasterd1 <83030886+postmasterd1@users.noreply.github.com> Date: Tue, 27 Apr 2021 18:35:41 -0400 Subject: [PATCH 12/20] Push Request Adding 31581 Reflector to NXDN host list, with tab delineations. -KD2UQK --- NXDNGateway/NXDNHosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index c9c417b..e3ac123 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -270,6 +270,9 @@ # 31444 Rhode Island Digital Link 31444 18.219.32.21 41400 +# 31581 KD2UQK Long Island, NY - NXDN Reflector +31581 kd2uqk.ham-radio-op.net 41400 + # 31665 TGIF Network 31665 tgif.network 41400 From 91727939415d5b820027d93ec6c90de969b05373 Mon Sep 17 00:00:00 2001 From: M0GLJ <32222213+m0glj@users.noreply.github.com> Date: Sun, 2 May 2021 22:36:56 +0100 Subject: [PATCH 13/20] Update NXDNHosts.txt Change Reflector Number --- NXDNGateway/NXDNHosts.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index c9c417b..562a5e4 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -192,6 +192,9 @@ # 23551 NXDN Scotland 23551 nxdnscotland.ddns.net 41400 +# 23595 OZ-DMR_CHAT +23595 reflector.oz-dmr.uk 41400 + # 25000 NX Core 25000 173.166.94.77 41400 @@ -276,9 +279,6 @@ # 31672 Pi-Star 31672 nxdn-31672.pistar.uk 41400 -# 31769 OZ-DMR -31769 reflector.oz-dmr.uk 41400 - # 31777 DX-LINK SYSTEM, 31777 8.9.4.102 41400 From 36e35463f1370c722ac080cfd19346413384e886 Mon Sep 17 00:00:00 2001 From: Suttipong Tanuphon <54911012+hs2bmi@users.noreply.github.com> Date: Mon, 3 May 2021 22:28:02 +0700 Subject: [PATCH 14/20] Update NXDNHosts.txt I don't know last edit is gone. please update to add my NXDN Host 822 to NXDNHosts.txt --- NXDNGateway/NXDNHosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index c9c417b..60e7a59 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -39,6 +39,9 @@ # 730 Chile NXDN Reflector to BM TG 730 730 sdradio.cl 41400 +# 822 Thailand NXDN to BM TG 520822 +822 nxdn.dstarthailand.com 41400 + # 911 Cop Talk, Multimode TG for Police and First Responders 911 nxdn.k2cop.com 41400 From e7593bfe169a3f372ae929c7fc1f45ea965d3e07 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 5 May 2021 20:17:30 +0100 Subject: [PATCH 15/20] Update NXDNHosts.txt --- NXDNGateway/NXDNHosts.txt | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index fdc2d6c..9d6218a 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -28,43 +28,46 @@ 505 43.229.63.42 41450 # 530 New Zealand -530 zldigitalreflectors.hopto.org 41400 +530 zldigitalreflectors.hopto.org 41400 # 545 XLX545E PA -545 70.44.20.24 41401 +545 70.44.20.24 41401 # 707 RuralMN Reflector -707 707nxdn.kd0ioe.com 41400 +707 707nxdn.kd0ioe.com 41400 # 730 Chile NXDN Reflector to BM TG 730 -730 sdradio.cl 41400 +730 sdradio.cl 41400 # 822 Thailand NXDN to BM TG 520822 -822 nxdn.dstarthailand.com 41400 +822 nxdn.dstarthailand.com 41400 + +# 910 Washington DC - Virginia - Maryland +910 nxdn910.freeddns.org 41400 # 911 Cop Talk, Multimode TG for Police and First Responders -911 nxdn.k2cop.com 41400 +911 nxdn.k2cop.com 41400 # 914 Latin America -914 80.211.94.145 41400 +914 80.211.94.145 41400 # 1200 Florida 1200 florida.nxref.org 41400 # 2140 DMRplus BM Multi -2140 94.177.235.81 41400 +2140 94.177.235.81 41400 # 2225 IT Tuscany -2225 80.211.99.134 41400 +2225 80.211.99.134 41400 # 2231 IT Multiprotocollo Sardegna -2231 nxdn.is0.org 41400 +2231 nxdn.is0.org 41400 # 2241 IT TUSCANY MULTIP -2241 nxdn.grupporadiofirenze.net 41400 +2241 nxdn.grupporadiofirenze.net 41400 # 2249 IT SICILIA -2249 nxdn.digitalsicilia.it 41400 +2249 nxdn.digitalsicilia.it 41400 # 2263 Bucharest YO3 NXDN Network 2263 nxdn.dstar-yo.ro 41403 From 8929b6af3c528ff8bcd1fff462ad6df7ba89ba13 Mon Sep 17 00:00:00 2001 From: ke8ane <83823727+ke8ane@users.noreply.github.com> Date: Sun, 9 May 2021 22:29:58 -0400 Subject: [PATCH 16/20] Update NXDNHosts.txt --- NXDNGateway/NXDNHosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 9d6218a..951e066 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -258,6 +258,9 @@ # 31188 Southern Indiana 31188 w9windigital.org 41400 +# 31226 WorldWide Dx System +31226 198.245.53.107 41400 + # 31257 NEARC 31257 nxdn.w0jay.com 41400 From 5ba68493d54bf526b4a8eac3bee8295b2b7c050c Mon Sep 17 00:00:00 2001 From: M0GLJ <32222213+m0glj@users.noreply.github.com> Date: Sat, 29 May 2021 00:39:52 +0100 Subject: [PATCH 17/20] Update NXDNHosts.txt No Longer needed # 23426 FreeSTAR NXDN Reflector 23426 obp.freestar.network 41400 --- NXDNGateway/NXDNHosts.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 951e066..ecbf8ef 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -192,9 +192,6 @@ # 22825 Swiss NXDN Reflerctor 22825 212.237.33.114 41400 -# 23426 FreeSTAR NXDN Reflector -23426 obp.freestar.network 41400 - # 23551 NXDN Scotland 23551 nxdnscotland.ddns.net 41400 From 80c97891bda01f698cc4ecd646b573e291b6ab58 Mon Sep 17 00:00:00 2001 From: w4dbg <53235021+w4dbg@users.noreply.github.com> Date: Wed, 2 Jun 2021 06:18:15 -0500 Subject: [PATCH 18/20] Update NXDNHosts.txt Updated Alabama Link 31010 --- NXDNGateway/NXDNHosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 951e066..94006ff 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -235,7 +235,7 @@ 30639 nfonorcalnxdn.dyndns.org 41400 # 31010 Alabama-Link -31010 nxdn.alabamalink.info 41400 +31010 alabamalink.radiotechnology.xyz 41400 # 31031 XLX310 Multimode Reflector 31031 ref.xlx310.com 41400 From be1a97deb6b894feeb3a55521be05fb7670acad5 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 3 Jun 2021 19:20:44 +0100 Subject: [PATCH 19/20] Add TG 26078 --- NXDNGateway/NXDNHosts.txt | 105 ++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/NXDNGateway/NXDNHosts.txt b/NXDNGateway/NXDNHosts.txt index 0869654..51cc7f5 100644 --- a/NXDNGateway/NXDNHosts.txt +++ b/NXDNGateway/NXDNHosts.txt @@ -49,25 +49,25 @@ 911 nxdn.k2cop.com 41400 # 914 Latin America -914 80.211.94.145 41400 +914 80.211.94.145 41400 # 1200 Florida 1200 florida.nxref.org 41400 # 2140 DMRplus BM Multi -2140 94.177.235.81 41400 +2140 94.177.235.81 41400 # 2225 IT Tuscany -2225 80.211.99.134 41400 +2225 80.211.99.134 41400 # 2231 IT Multiprotocollo Sardegna -2231 nxdn.is0.org 41400 +2231 nxdn.is0.org 41400 # 2241 IT TUSCANY MULTIP -2241 nxdn.grupporadiofirenze.net 41400 +2241 nxdn.grupporadiofirenze.net 41400 # 2249 IT SICILIA -2249 nxdn.digitalsicilia.it 41400 +2249 nxdn.digitalsicilia.it 41400 # 2263 Bucharest YO3 NXDN Network 2263 nxdn.dstar-yo.ro 41403 @@ -76,37 +76,37 @@ 2265 nxdn.dstar-yo.ro 41405 # 2503 RU DMR -2503 nxdn.r1ik.ru 41400 +2503 nxdn.r1ik.ru 41400 # 2700 Melbourne FL -2700 2700nxdn.ddns.net 41400 +2700 2700nxdn.ddns.net 41400 # 3023 Ontario Crosslink 3023 ontxlink.hopto.org 41400 # 3142 Pennsylvania -3142 3.215.215.169 41402 +3142 3.215.215.169 41402 # PRadise -3300 nxdn3300.from-pr.com 41400 +3300 nxdn3300.from-pr.com 41400 # 3400 W2BTN Group -3400 w2btn.dmrnet.net 41400 +3400 w2btn.dmrnet.net 41400 # 5057 VK7 TAS 5057 45.248.50.37 41400 # 7160 Peru Digital -7160 nxdn.dmr-peru.pe 41400 +7160 nxdn.dmr-peru.pe 41400 # 7225 Multiprotocolo Argentina -7225 ysfarg.ddns.net 41400 +7225 ysfarg.ddns.net 41400 # 7309 CHILE-LINK NXDN Reflector to BM TG 73099 -7309 sdradio.cl 41401 +7309 sdradio.cl 41401 # 9480 ICQPODCAST -9480 xlx.icqpodcast.com 42400 +9480 xlx.icqpodcast.com 42400 # 9846 NXDN Portal to WW8GM YSF network www.gmarc.org 9846 nxdn.dudetronics.com 41401 @@ -142,67 +142,67 @@ 20328 nxdn.projekt-pegasus.net 41400 # 20330 NXDN German DE-RAMSES Project -20330 161.97.140.131 41400 +20330 161.97.140.131 41400 # 20333 NXDN LausitzLink Germany -20333 nxdn02.bzsax.de 41400 +20333 nxdn02.bzsax.de 41400 # 20421 DL-Nordwest (dl-nordwest.com) by 9V1LH/DG1BGS and DK5BS -20421 9v1lh.spdns.org 41400 +20421 9v1lh.spdns.org 41400 # 20945 Deutschland DL1BH 20945 dl1bh.ddns.net 41400 # 21410 NXDN SPAIN -21410 nxdn21410.nxdn.es 41400 +21410 nxdn21410.nxdn.es 41400 # 21401 Andalucia Room -21401 94.177.189.17 41401 +21401 94.177.189.17 41401 # 21418 NXDN RC Veleta -21418 rcveleta.xreflector.es 41400 +21418 rcveleta.xreflector.es 41400 # 21430 Alcayna -21430 alcayna.duckdns.org 41400 +21430 alcayna.duckdns.org 41400 # 21465 ADER Multimode -21465 aderdigital.ddns.net 41400 +21465 aderdigital.ddns.net 41400 # 22200 IT HBLINK ITALY -22200 nxdn.hblink.it 41400 +22200 nxdn.hblink.it 41400 # 22202 IT SARDINIA -22202 87.106.152.249 41400 +22202 87.106.152.249 41400 # 22221 HBLINK IT-DMR REGIONALE LOMBARDIA -22221 dagobah.hblink.it 41400 +22221 dagobah.hblink.it 41400 # 22245 IT PIEDMONT GDO -22245 nxdngdo.duckdns.org 41400 +22245 nxdngdo.duckdns.org 41400 # 22252 IT MULTIPROTOCOL NETWORK -22252 46.226.178.80 41400 +22252 46.226.178.80 41400 # 22258 D2ALP HBLink Italia -22258 94.177.173.53 41400 +22258 94.177.173.53 41400 # 22292 IT MP XLX039/B BM2222 -22292 hblink.dmrbrescia.it 41400 +22292 hblink.dmrbrescia.it 41400 # 22825 Swiss NXDN Reflerctor -22825 212.237.33.114 41400 +22825 212.237.33.114 41400 # 23551 NXDN Scotland -23551 nxdnscotland.ddns.net 41400 +23551 nxdnscotland.ddns.net 41400 # 23595 OZ-DMR_CHAT 23595 reflector.oz-dmr.uk 41400 # 25000 NX Core -25000 173.166.94.77 41400 +25000 173.166.94.77 41400 # 25577 UA Azimuth -25577 178.136.234.51 41400 +25577 178.136.234.51 41400 # 25617 Russia Kavkaz 25617   kavkaz.qrz.ru 41400 @@ -213,11 +213,14 @@ # 26000 Poland 26000 80.211.249.221 41400 +# 26078 Poland HBLink Network +26078 nxdn.hblink.kutno.pl 41400 + # 26079 NXDN Poland local Group Reflector 26079 nxdn-sp7.noip.pl 41400 # 26085 Poland DMR+ -26085 91.245.81.2 41400 +26085 91.245.81.2 41400 # 26200 Deutschland 26200 135.125.204.81 41400 @@ -244,7 +247,7 @@ 31088 54.191.50.212 41400 # 31092 Connecticut Chat -31092 nxdn.alecwasserman.com 41400 +31092 nxdn.alecwasserman.com 41400 # 31137 Kingsland Digital Link 31137 74.91.119.94 41400 @@ -256,31 +259,31 @@ 31188 w9windigital.org 41400 # 31226 WorldWide Dx System -31226 198.245.53.107 41400 +31226 198.245.53.107 41400 # 31257 NEARC -31257 nxdn.w0jay.com 41400 +31257 nxdn.w0jay.com 41400 # 31264 XLX625 The BROniverse www.wa8bro.com -31264 nxdn.dudetronics.com 41400 +31264 nxdn.dudetronics.com 41400 # 31340 Central New Jersey -31340 cnjham.msmts.com 41400 +31340 cnjham.msmts.com 41400 # 31403 Oklahoma Link 31403 3.208.70.29 41400 # 31425 XLX545A Pennsylvania Cross Mode -31425 70.44.20.24 41400 +31425 70.44.20.24 41400 # 31426 XLX545A Pennsylvania Cross Mode (alt) -31426 3.215.215.169 41400 +31426 3.215.215.169 41400 # 31444 Rhode Island Digital Link 31444 18.219.32.21 41400 # 31581 KD2UQK Long Island, NY - NXDN Reflector -31581 kd2uqk.ham-radio-op.net 41400 +31581 kd2uqk.ham-radio-op.net 41400 # 31665 TGIF Network 31665 tgif.network 41400 @@ -295,25 +298,25 @@ 31983 NXDNReflector31983.K8JTK.org 41400 # 32103 CW-Ops Academy -32103 cwops.dyndns.org 41400 +32103 cwops.dyndns.org 41400 # 33581 OMISS Group -33581 omiss.dyndns.org 41400 +33581 omiss.dyndns.org 41400 # 37224 Haiti NXDN -37224 44.98.254.130 41400 +37224 44.98.254.130 41400 # 40721 Fusion Canada Fr /Wires-x /Ysf /Nxdn Network -40721 158.69.169.205 41400 +40721 158.69.169.205 41400 # 45000 Korea -45000 nxdn.dvham.com 41400 +45000 nxdn.dvham.com 41400 # 46000 China 46000 120.234.41.144 41400 # 43389 SouthEast Link -43389 nxdn.lmarc.net 41400 +43389 nxdn.lmarc.net 41400 # 50525 DMR TG50525 bridge 50525 50525.nxref.org 41400 @@ -322,7 +325,7 @@ 50599 nxdn.duckdns.org 41490 # 52000 Thailand DTDXA XLX520N -52000 nxdn.dtdxa.com 41400 +52000 nxdn.dtdxa.com 41400 # 53099 New Zealand, 53099 linked to BM TG 53099 53099 203.86.206.49 41400 @@ -331,7 +334,7 @@ 65000 176.9.1.168 41400 # 65100 NXDN - 2007DXGROUP -65100 89.46.75.115 41400 +65100 89.46.75.115 41400 # 65208 French-Test 65208 m55.evxonline.net 41400 From 657ab16d172fa50b8b17e555ae8fc2f129ae8f77 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 16 Jun 2021 23:56:49 +0100 Subject: [PATCH 20/20] Update NXDNReflector.ini --- NXDNReflector/NXDNReflector.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NXDNReflector/NXDNReflector.ini b/NXDNReflector/NXDNReflector.ini index 475a6f5..fa0d9ec 100644 --- a/NXDNReflector/NXDNReflector.ini +++ b/NXDNReflector/NXDNReflector.ini @@ -18,18 +18,18 @@ FileRotate=1 Port=41400 Debug=0 +# Please visit www.nxdninfo.com if you are planning to link to the Icom NXCore server in Florida. [Icom Network] Enabled=0 -# Address=208.111.3.45 -Address=44.131.4.1 +Address=flicom.nxcore.org # TGEnable=1234 # TGDisable=3456 Debug=0 +# Note that the Kenwood NXCore server in Florida is offline. [Kenwood Network] Enabled=0 -# Address=208.111.3.45 -Address=44.131.4.1 +Address=flkenwood.nxcore.org # TGEnable=1234 # TGDisable=3456 Debug=0