Skip to content

Releases: DVMProject/dvmhost

R05A02 2025-12-03

03 Dec 19:38
274a8f2

Choose a tag to compare

Merge R05A02 (r04k32_dev branch) into Master (#110)

Below is a summary from the various commits, this release updates the major version number. Backward compatibility, with previous versions should not be a problem. But YMMV and its important to note that FNE backward compatibility, specifically might be problematic (FNE's should be at the same release level).

This release changes significant under the hood implementations, including the lowest level of our network stack.

* update version number for next dev version;

* implement passing complex types as refs in lambda functions;

* move KMM NoService response into its own helper function;

* remove data call collisions (this code was really iffy); refactor log messages; refactor default handling of packets the FNE doesn't process; insert null bits before PDU;

* set RSI data properly for outgoing KMM frame;

* implement TEK encryption with an AES-256 KEK;

* add support for unwrapping (decrypting) a KEK encrypted TEK;

* reorganize code and organization for handling P25 OTAR KMMs for better separation and robustness (this is still a WIP and does not function!);

* force hard disable KMF services if OpenSSL isn't compiled in; add instance of P25 crypto to P25OTARService;

* add support to expose KMF services via DLI UDP; add plumbing to support encrypted KMM frames;

* add some debug dumping;

* BUGFIX: null reference when trying to perform old style lookup of timestamp when debugging is enabled;

* standardize KMM logging;

* begin adding support for V.24 PDU data;

* fix C++ namespace shenanigans;

* fix documentation error;

* add support for outgoing V.24 PDU data;

* minor alterations to bridge UDP audio logic; set better default for bridge udpJitter buffer;

* re-engineer entirely how source untimed raw PCM frames over UDP are handled and timed; refactor how udp end of call is handled;

* add support to resize the recv and send buffers on the raw UDP socket; adjust the recv buffer on bridge to use 131K system buffer for the socket (this allows us to hold ~394 frames worth of *raw* PCM + metadata in the socket's internal buffer in the system kernel;

* set socket buffer sizes to larger values then the default;

* annotate Linux limiting the maximum send and recv socket buffer sizes

* update dvmhost submodule;

* use a 2M buffer for bridge UDP audio;

* display the socket buffer resize as warnings and not errors;

* reduce UDP recv/send buffer size to a lower reasonable value of 512K;

* update README.md;

* add more class copy safety;

* correct missing parens;

* correct loop indexing; remove unused variable;

* deprecate unused DIU flag (this isn't what this byte meant in the first place);

* add call start marker to main application log;

* remove SIP classes (this will be done by a different team, and done differently); begin refactoring Log and ActivityLog implementations into C++-type functions to do away with the C-style va_args functions for log message handling; correct -Wstringop-trunction warnings from BaseNetwork.cpp (we hide the warning for these because we are intentionally copying these strings without the nul terminator);

* whoops accidentally blew away activity log transmission to the FNE, fix that...;

* add better concurrency protection to AffiliationLookup; fix issues when getting the granted source ID from a destination ID by properly ensuring the mapping table has an entry first; add srcId to the release grant callback (callback should never call AffiliationLookup gets as it can deadlock, so adding this parameter gives the source ID to the callback so that it doesn't have to do the lookup);

* remove __spinlock() from touchGrant() and isGranted();

* correct bad ordering of log message for call source switching;

* remove blockTrafficTo; implement promiscuous hub mode for FNE (this mode allows the FNE to pass any and all traffic transparently);

* fix typo;

* for the purposes of my OCD fix incorrect one-liner Doxygen documentation (its //!< and not just //!);

* better document peer ID and rid ACL list files;

* add backward for stacktrace support on crash;

* fix FNE compilation when SSL is not available; make Win32 builds work again;

* remove double error message;

* generate stacktrace file if main logger file is not initialized or unavailable;

* reduce the use of unordered_map::at();

* begin relabeling peer-link to peer replication/peer replica;

* implement identity with qualifier, this makes logs (and only logs) easier to trace by uniquely identifying certain peer types, a peer qualifier is simply a symbol appended to the beginning of a resolved peer identity in the FNE logs (@ = SysView, + = External/Linked FNE, % = Replica FNE); silence the Call Source Switched log messages, we will only actually print these if the call source ID changes; fix missed Peer-Link log branding/naming;

* lock m_status and m_statusPVCall before trying to update data elements;

* don't drop out-of-order packets (this was a bad idea, instead log an issue, the real fix for this will be some sort of RTP jitter buffer); if the current packet sequence reaches the maximum allowed, roll over to 0;

* update order of operations for peer ident;

* normalize log messages;

* differentiate a call end collision from a call collision;

* differentiate a call grant collision from a call collision;

* fix missing code commenting;

* initial implementation of naive round-robin HA mechanism. this mechanism allows the FNE master to communicate to a peer connected to it, to announce alternate IPs for the peer to connect to if the primary configured FNE master becomes inaccessible. the HA mechanism requires peer replication to create a loose cluster of FNEs, each FNE in the cluster is configured with the external WAN IP and port for connection to the FNE, and these IPs are then disseminated to all FNE replicas (and downstream connected peers) in the cluster automatically;

* hide debug messages unless debugging is enabled;

* remove old call in progress global; refactor call collisions, allow the call collision timeout be user definable (with 0 disabling call collisions, user beware);

* simplify sendmmsg implementation;

* BUGFIX: correct scenario where traffic from an upstream master to a downstream peer FNE would lose the RTP sequence numbering;

* refactor how RTP multiplexing by stream is handled;

* fix some odd behavior with very fast calls locking up grants on on DVRS channels;

* refactor RTP sequence count handling;

* whoops this stream ID check was intended for non-promiscuous operation only;

* fix memory leak with PacketBuffer::decode(), dont use a direct heap allocated buffer, instead use a unique_ptr buffer;

* simplify implementation;

* rename backtrace namespace to log_stacktrace, when using simple mode the namespace conflicts with a global function backtrace(); add package element for libdw-dev:arm64 for cross compile instructions;

* whoops forgot to update BridgeMain.cpp for log_stacktrace;

* lock the peer list when writing traffic data to prevent peer removal during traffic operations;

* utilize a shared_timed_mutex for peer list locking on the FNE, this better keeps the peer list locked during traffic operations using lock counting vs the original spinlock mechanism;

* better handling locking peer connections during critical state changes;

* whoops this lock should only take place for a connected peer;

* reflect higher requirements for FNE; fix issue on host where sometimes a stuck network call would cause network traffic to stop incorrectly hanging on the previous TG;

* change around some naming;

* typo;

* [EXPERIMENTAL] implement rudimentary spanning tree mechanism to prevent peer looping; refactor how FNENetwork handled peer disconnect cleanups and consolidate into a singular routine;

* [EXPERIMENTAL] enhance detection for case where FNE A and FNE B are cross-peered to each other (dont do this);

* add REST API endpoint to fetch the master tree;

* make sure master peer ID 0 doesnt ever happen;

* log condition where masterPeerId is 0

* SysView peers announce themselves as an external FNE, but we do not consider them FNE peer links;

* SysView masquarades its masterPeerId as itself;

* instead of killing a peer connection instantly on a duplicate conn drop, increase retry time to 30 minutes and allow up to 3 duplicate conn failures before killing;

* better handle duplicate connection disconnect NAKs; add REST API on FNE to force reset a upstream peer connection;

* fix issue with purely ACL virtual FNEs not being able to replicate configuration further down the master tree;

* deprecate the "external FNE" terming for upstream FNE connections and instead call them "neighbor FNE";

* more code cleanup, simplify naming;

* cleanup code; refactor log messages from the FNE to better categorize them; correct issue where a peer reconnecting may trip tree duplicate conn checking;

* enhance STP peer reconnect logic to allow peers announcing the same peerId and masterId to reconnect between spanning tree updates;

* update log colorizer to match new logging categories in the FNE;

* update log colorizer to match new logging categories in the FNE (round 2);

* update log colorizer to match new logging categories in the FNE (round 3);

* update log colorizer to match new logging categories in the FNE (round 4);

* bump major version numbering in a preliminary fashion, at least until group talks about it are done (so this could be permenant);

* fix messaging for fast peer reconnect (it was misleading as a RPTC NAK which it isnt);

* allow reparenting of a STP node if it moves from one tree node to another;

* implement tree cleanups if the downstream announcement removes child leaves or reports no children at all;

* relabel MasterTree to SpanningTree proper;

* whoops errant i++;

* fix up some concurrency problems when dealing with parrot transmissions, due to migration of parrot playback into its own thread;

* make sure to share lock peers while processing in maintainence loop;

* add mutex locking around spanning tree updates;

* simplify log levels, deprecate LogMessage log level in favor of just using LogInfoEx (message and info logs are basically the same thing);

* better classify log messages;

* simplify FNE configuration for peers, make identity a global applying to all peer connections, remove bogus frequency data;

* better report global identity;

* allow overriding the global identity for upstream connections; implement use of identity for spanning tree;

* update config examples to reflect new log levels;

* add back peer "name" field, this is strictly informational to make the config file easier on the brain;

* Win32: bump version number for file resource metadata;

* add documentation for packet payloads for: writeLogin, writeAuthorisation, writeConfig and writePing;

* add some more packet payload documentation;

* continue packet payload documenting;

* minor comment alteration;

* correct DMR data handling; refactor FNE DMR data calls to be structured more akin to P25 data calls;

* use WASAPI by default on Windows;

* better handle out of order blocks for PDUs; reduce packet retry to 2; correct handling ack response packets;

* refactor how buffered UDP datagram queuing is performed;

* relabel static class variables to use s_ and globals to use g_

* enhance colorize-host.sh to terminate color properly;

* enhance colorize-host.sh to terminate color properly;

* RTS PTT will only assert when audio is present.  Add holdoff timer before removing RTS. (#103)

* add option to enable/disable upstream call start/end event logging;

* more work towards a working DLD-type OTAR service for P25;

* fix typos;

* Add carrier operated relay support to dvmbridge. (#104)

* refactor KMMFrame to properly support message number and add framework to support MAC; refactor all derived KMM classes to properly determine KMM frame length and body offsets; change collision in class naming for KeyItem in the CryptoContainer and KeyItem in the p25::kmm namespace; cleanup magic numbers; add initial code for transmitting a rekey command; add KEK crypto wrapping testcase;

* begin work on generating KMM CMAC for message authentication;

* document sections of doc where a test originates test data;

* begin work on generating CBC-MAC for message authentication;

* minor cleanups;

* test should be using generated key;

* CBC-MAC now works properly; CMAC MAC generation works (just gotta fix CMAC MAC key generation);

* complete CBC-MAC implemenation, at least for the provided samples from TIA-102.AACA-C this is now passing for the rekey example provided in section 14.3.4; anything compiling against libcommon.a while OpenSSL is enabled will require OpenSSL -lssl; fix delete vs free in various tests;

* typo

* implement OFB data encryption per TIA-102.AAAD-B; test proper final encrypted output for CBC-MAC check; implement use of cryptAES_PDU() in P25OTARService;

* add experimental DES crypto;

* move Git hash global defines out of Defines.h and into GitHash.h;

* fix copyrights;

* cleanup file headers containing lingering old comments; update fw/modem submodule; update fw/hotspot submodule;

* remove debug trace not needed anymore;

* add support for PDU auxiliary ES headers;

* complete refactor of how P25 PDUs are assembled from user data and disassembled to user data; various corrections for data path nullptr reference issues; implement several tests for testing the P25 PDU assembler;

* remove left over debug code; fix AMBT CRC-32 calculation error, AMBTs calculate the CRC-32 for the PDU themselves the Assembler does not need to do it; correct default value of p25TxNAC;

* add some better error handling for NetRPC;

* validate LC_CALL_TERM peer ID before allowing them to repeat, this fixes an issue where an errant peer on the network could spam LC_CALL_TERM to cause trunked nodes to terminate/kill a call in progress;

* fix issue with dvmpatch not properly evaluating the destination TEK;

* add support to patch to *disable* enc processing and allow frames to pass transparently; implement DES for bridge and patch;

* reorganize application files, I've wanted to do this for a while JSON isn't really a network service, and REST API while it is a network service, I want to be in a separate namespace;

* add multi-block PDU for V.24;

* add some guard rails on PDU reception so we dont overflow ourselves;

* it seems as if PDU_(UN)CONF_END is variable length, it will always be at least 1 block containing the last PDU block, and PDU_(UN)CONF_BLOCK_X is always 4 blocks;

* cleanup dataBlocks pointer array;

* preliminary code for sending PDU frames >3 blocks over V.24;

* use unsigned numbers for these loops the values should never be negative anyway;

* properly encode sequence opcode;

* whoops missing parens;

* initialize these unordered_maps to allow the max connection cap count number of entries (before it was zero and could result in many reallocations of these maps);

* well that was a little naive of me, I didnt multiply the count by the size of the stored elements...;

* reverse course lets do this more intelligently and implement the passthru for the reserve() function on the concurrency classes;

* add STP check to see if a downstream leaf is blown itself away on the tree;

* implement DMR data PDU assembler based on the P25 PDU assembler;

* expand on the files related to an FNE instance for clarity;

* add preliminary support for enabling peers with call priority, this will give those peers the ability to override any current call in progress;

* implement a more solidified peer call priority mechanism using ICC;

* bump WebSocketPP version to conform to new CMake minimum version; (#108)

* fix typo;

* add some documentation around newer protocol additions;

* whoops typo;

* start adding foundational work for future P25 Phase 2;

* decomplicate foundational changes to RS coders for Phase 2;

* added new peer config options to FNE REST api

* add some locks around pkt maps in DiagNetwork;

* better document the master peerId importance;

* ensure buffers are set to nullptr after deleting to prevent double frees;

* skip trying to transmit any buffer that is null;

* add thread safties to SpanningTree;

* correct bad memory allocation;

* revert previous change to add locking to SpanningTree (this is handled externally in FNENetwork and DiagNetwork); fix issue in FNENetwork which could cause a STP deadlock; fix issue incorrectly labeling a peer as allowing call priority in the log when infact the peer was not configured that way;

* make sure during resetPeer() we lock the connection;

* readd SpanningTree internal locking mechanisms;

* make sure pointers are set to null after delete;

* ensure when a FNE loses all its downstream leaves, that it will properly notify upstream FNEs; fix issue where dangling tree nodes were being incorrectly left in the flat peer node list for the spanning tree;

* fix defaultNetIdleTalkgroup being treated as a hex value instead of dec; enhance P25 defaultNetIdleTalkgroup slightly to better pass traffic after RF traffic; enhance P25 defaultNetIdleTalkgroup to pass traffic if there are affiliations to the group;

* how about we dont blatently leave debug messages enabled...;

* BUGFIX: hopefully correct crash condition when trying to erase child nodes;

* followup for last commit, simplify implementation;

* this will be unpopular, but I am deprecating support for cross-compiling for armhf/legacy RPi, maintaining this is already causing problems with OpenSSL and will ultimately handcuff us in the future if we upgrade C++ versions because the legacy toolchain uses GCC 4.9;

* remove deprecated patch;

* update README.md;

* correct some cross-compile shennigans for OpenSSL;

* correct some cross-compile shennigans for aarch64;

* BUGFIX: fix issue where the host would incorrectly reset the voice stream ID during a call;

* match code change from previous bugfix to DMR and NXDN;

* dont use the deprecated OpenSSL1.1 functions, use portable AESCrypto functions instead for low-level AES crypto;

* disable STP reparenting when deserializing children of a tree;

* BUGFIX: fix tged and peered in the case where an empty file or file with no entries is provided for editing;

* BUGFIX: add some validation checks around deserialization reparenting;

* implement P25P2 reed-solomon codes for future use;

* BUGFIX: correct bad check for parrot frames end of call;

---------

Co-authored-by: Lorenzo L. Romero <lorenzolrom@gmail.com>
Co-authored-by: Natalie <jelimoore@gmail.com>
Co-authored-by: W3AXL <29879554+W3AXL@users.noreply.github.com>

R04J32 2025-09-02

03 Sep 02:24
7c2bfb3

Choose a tag to compare

R04J32 Merge to Master (#95)

* implement user-defined adj site mapping to allow fine grained control over neighboring site announcements;

* BUGFIX: patch issue where the FNE would not maintain the source peer ID for certain routing scenarios;

* fix typo in original implementation, peerId should be the peerId and ssrc should become the originating peer ID; remove peer check throwing a warning;

* log ssrc for various data points (the ssrc is the RTP originating sync source which would be the peer ID of the origination of a RTP packet);

* bump build number;

* add peer ID masking support (this is useful for FNEs that are "public" links where internal peer IDs don't need to be retained); more work for maintaining the originating stream sync source; refactor how the FNE handles peer network connections;

* throw a warning if the user configured more then 8 upstream peer connections (more than this number can cause performance problems);

* make non-peer-link peer ID masking optional;

* add checking for traffic repeat to verify we are not trying to send traffic back to the source;

* add checking for traffic repeat to verify we are not trying to send traffic back to an external source;

* convert peer network protocol packet processing to a threaded model;

* update copyright dates;

* implement REST API for manipulating adjacent site map entries;

* fix missed REST API initializer, need to pass the adj site map;

* add DFSI/V.24 full duplex option (this allows dvmhost to repeat incoming frames back out);

* Fix incorrect check of DFSI and FSC operating modes that resulted in a segfault (#92)

Co-authored-by: faulty <faulty@evilcomputing.net>

* document p25CorrCount in depth more; set the default p25CorrCount to 2;

* properly call PacketBuffers clear() before leaving a scope to ensure contained buffers are deleted (otherwise we'll leak memory);

* skip the first 6 bits of the TIA-102 DFSI VHDR (this is very strange, and is probably not kosher);

* transparently pass voice frames with FID $20 (assumed to be Kenwood) when the PF flag is set (this allows Kenwoods flavor of encryption to pass);

* relabel FID_DMRA to FID_MOT (this feature ID is assigned to Motorola); handle more conditions for FID $20 (Kenwood) on voice frames;

* remove filterHeaders (this is deprecated, HDUs aren't sent over the network); perform frame length validation for P25 network frames (unlike DMR and NXDN P25 frames are variable length, requring length validation to prevent buffer under or overflows); fix issue with addr variable not being freed in InfluxDB handler;

* [EXPERIMENTAL] add very initial support for dvmpatch to talk to a MMDVM P25 Gateway in P25 mode;

* fixup dvmpatch support for talking to MMDVM P25 Gateway;

* fix up handling of MMDVM call termination;

* more work on better signalling end of call for MMDVM P25 gateway patches; better log traffic from MMDVM;

* correct some incorrect timing;

* add support for properly authorizing a peer to send Inhibit/Uninhibit commands; add some NXDN constants for remote control;

* add columns to main peered peer list to represent if a peer is allowed to inhibit;

* fixup informational logging;

* add auto generation of a peer password; slightly increase the dialog size of the peer edit window;

* fix TIA VHDR incorrect length; correct gatekeep accidentally setting TIA StartOfStream to 4 bytes instead of 3, because you know the TIA spec is incomprehensible with its bit alignment;

* add some permanent log trace for DFSI over UDP tracing; correct startOfStreamTIA incorrectly sending a LDU1 NID; correct some offsets;

* make sure we send out heartbeats *before* the heartbeat time;

* send Start of Stream with voice data;

* free memory in error case; remove unused variables;

* correct some buffer allocations; ensure the AES class is deleted after use;

* implement support for legacy radio affiliation (like P25) for DMR and NXDN (this fixes an issue where conventional DMR and NXDN systems would be unable to transmit onto affiliation only TGs); correct bad CSBK decoding in the FNE (forgot to check for dataSync);

* code cleanup to correct compiler warnings;

* add string file meta data info to Win32 EXEs; add icons to Win32 EXEs;

* migrate and condense analog audio helper and G.711 codec routines into a common class called AnalogAudio for easy reuse; stub network protocol entries to eventually handle analog audio;

* add support in the DVM network protocol for analog FM audio traffic; add support to the DVM FNE to properly switch analog FM audio traffic; bump revision from H to J;

* add analog enable flag to fne config YAML;

* prelim work to make dvmbridge pass analog audio directly into FNE network;

* handle locking inside deleteBuffers();

* refactor FrameQueue mutex handling; don't start and stop the thread pool when the peer network opens/closes;

* use unique_ptr for compression class instead of passing raw pointers;

* refactor FrameQueue from using a std::unordered_map to a simple fixed array that is directly controlled;

* refactor compression slightly;

* better handle multi-threaded problems;

* use a std::vector instead of a classical C allocated array for timestamp list; add error/logic checking for V.24/DFSI where the VHDR may send a TGID0 during a call causing a call rejection;

* make timestamps vector static;

* dump out of VHDR processing if call is in progress;

* bump tarball version build stamp;

* add option to forcibly allow TGID0 for badly behaved systems this will cause dvmhost to accept the call and not drop it, with the caveat that the TGID will be rewritten to TGID1, the network stack simply cannot service a TGID of 0 and as such we must rewrite the TGID a TIA-102 valid TGID;

* simplify late entry handling where V.24 may send a dstId of 0;

* whoops correct my own stupidity;

* whoops correct my own stupidity (again);

* add opcodes for Harris User Alias and GPS; add opcode for Motorola GPS on PTT; decode Harris User Alias in LDU LCs;

* attempt at decoding the LDU RS values for both V.24 and TIA DFSI, this does not abort decoding in the ModemV24 right now and will simply log an error if the RS values for the LDU1 or LDU2 are to badly invalid;

* alter field data based on recent testing; enhance and update debug log entries; add debug logging for Voice 1 and 10 start of voice frames for V.24;

* add missing tag information for V.24 PDU;

* fix incorrect handling of RFSS ID in host setup;

* experimental fix to ignore wildly illegal TGIDs in the HDU;

* simplify the V.24 HDU TGID logic, entirely ignore the TGID presented in the HDU and just wait for the LDU1 to set the rfLastDstId;

* add grantDemand documentation to dvmpatch;

* [EXPERIMENTAL] add experimental support for cross-encrypting patched P25 traffic;

* reset call algo when a P25 call ends;

* properly handle algo ID's for source and destinations;

* missed reverseCrypto check;

* [EXPERIMENTAL] for some configurations (**you know who you are god damn it**), allow dvmhost to be configured to "idle" on a non-zero TG when the RF talkgroup hangtimer stops, this effectively disables the promiscuous network Rx of the host for certain conventional operations, and requires RF-based TG steering to change the active talkgroup; cleanup the macros for DMR and NXDN that perform various repeated checks;

* major refactor for V.24 support;

* hide RSSI2 ICW errors; report on any voice frames reporting more then 0 errors;

* properly sent VHDR1 and VHDR2 with proper opcodes (whoops);

* add experimental support for TDULC over V.24; add some documentation for the V.24 and TIA voice header byte layout;

* experimental support for transporting V.24 over IP;

* initial super frame should start at 1; make sure to use proper constants instead of magic numbers;

* reorganize code slightly;

* cleanup format for, and make slightly more precise trace and error dumping log messaging;

* add option for the FNE to directly log traffic denials to the system log;

* centralize string for illegal RID access;

* log total voice frame errors for TIA/DFSI mode;

* minor PDU refactoring on when network PDU data is sent; correct issue with accepting a conventional data reg;

* disable allowExplicitSourceId by default (not all subscribers support this); correct some bad handling of LC data;

* log sysId and netId info for call start and end on the FNE log;

* add setting netId and sysId to dvmbridge and dvmpatch for future use;

* reorganize and expose decodeLC/encodeLC from LC; correct typo in TDULC headers; add explicit source id TDULC; add LC_GROUP explicit ID flag;

* use shorthand macros where able;

* enable or disable explicit source ID directly, don't require control to be enabled (important for trunked VC);

* minor correction to handling explicit source ID;

* properly set dummy SiteData for dvmbridge and dvmpatch (necessary to set the WACN and SysId);

* handle condition defaulting WACN and SysId if network data for WACN and SysId is 0;

* ensure unencrypted parameters if encryption is disabled;

* copy dvmbridge change to dvmpatch for: ensure unencrypted parameters if encryption is disabled;

* ignore extra ICW opcodes;

* use raw LDU values from the call data instead of processed values if the MFId on the LC isn't TIA standard;

* collate bit errors reported from V.24 or TIA;

* typos;

* allow a group affiliation on Conv+ (DVRS) to terminate a running TG hang timer;

* add missing stop to the timer;

* add WACN/SysId logging to SysView;

* add global to disable transmitting logging to the network (this is used when the UDP socket fails to send data to prevent a crash condition talking to a null socket); unify errno to string message processing for clearity in logs; refactor network reconnect and retry logic to better handle a full connection reset cycle (this is useful for conditions where the network loss isn't transient and is something like a Ethernet or WiFi link drop causing the entire interface to become down temporarily);

* remove unnecessary debug logging;

* allow encoding user alias at the LC level;

* see if we can calculate error percentages;

* get rid of magic numbers for properly defined constants;

* implement proper support for P25 LDU1 and LDU2 to pass call control bytes; allow a end-point to signal that a call is handing over/switching over from one stream ID/source ID to another; implement support on dvmbridge to properly handle stream/source ID switch over;

* log call source switch over events;

* whoops this should be a OR equals not equals;

* correct issue where network frames would be ignored during RF calls causing buffer overflows;

* cleanup and remove unnecessary and confusing C compiler macros;

* cleanup and unify design a bit, for P25 move traffic collision checking into separate function calls;

* add colorize-host.sh helper tool; update colorize-fne.sh tool for DMR and NXDN;

* store status data for a private call;

* during unit registration store the originating source peer ID for a given unit registration; use unit registration source ID to select the destination peer to send private call data to;

* initial experimental implementation of private call routing:
	this introduces a new configuration flag "restrictPrivateCallToRegOnly", when set, this flag will influence how private calls are routed through the system
	private calls using restrictPrivateCallToRegOnly require both the source and destination subscribers to be unit registered with the system, when a private call
	occurs the system will utilize the source peer ID to restrict repeating the private call traffic only to the 2 peers involved in the private call

	FNEs will *always* receive private call traffic

* rework stream validation for U2U calls slightly for P25; ensure P25 always sends the U2U control byte for private calls;

* enhance handling of NXDN LC on the FNE; fix issue where dvmhost would not process a network RCCH burst;

* refactor NXDN CC handling a bit;

* add support to translate a raw DENY/QUEUE/CAUSE/REASON value for DMR/P25/NXDN into a human readable string;

* whoops hastily missed std::string -> c_str conversion;

* ensure SSRC is maintained for unit registration announcements;

* more implementation for private call routing;

* add missing clear flag to DMR payload activate RPC;

* correct crash for fsc set to true when not using DFSI TIA-102/UDP;

* add support to disable a failed CRC-32 for P25 PDU data; ignore CRC-32 errors for AMBT PDUs;

* Add support in dvmbridge for a serial PTT activation switch.  RTS is asserted on the serial port defined in bridge-config.yml for the duration of audio received, then is removed. (#102)

* P25 PDU packet handling refactor (for future use);

* remove test code;

* fix issue where PDU RSPs weren't being sent to the FNE; correct timing around ARP and packet retry when subscriber is not ready;

* add some more verbose logging;

* experimental changes to PDU data handling;

* correct CSV parsing for iden, peer list and RID lookup tables (we would skip parameters if they were empty); make the FNE P25 packet data handler operate in the TIA-102 asymmetric addressing mode (as would be required with FNE configurations);

---------

Co-authored-by: Jamie <25770089+faultywarrior@users.noreply.github.com>
Co-authored-by: faulty <faulty@evilcomputing.net>
Co-authored-by: Lorenzo L. Romero <lorenzolrom@gmail.com>

R04H31 2025-05-25

25 May 15:57
738ee91

Choose a tag to compare

R04H31 Merge to Master (#89)

* simplify and refactor peer-link packet handling;

* bump version number to match dev branch; alter logging for peer-link data;

* warn on packets generated over 4K;

* don't clear map directly, use clear() helper;

* use parens vs braces for initializers; correct case fall-thru on SysView;

* for clarity relabel RPT_CLOSING and MST_CLOSING to RPT_DISC and MST_DISC;

* discontinue support for TRANSFER command on the traffic port entirely; hide useAlternatePortForDiagnostics and allowActivityTransfer options in FNE configuration; add stern warnings and alerts if the FNE disabled either useAlternatePortForDiagnostics or allowActivityTransfer (these are really critical operations); alert in peer log if the master does not report support for the alternate port for diagnostics;

* make oversized packet warning clearer (this warning is not a end-user warning, the user can't do antyhing about this this is a developer BUGBUG warning);

* apply recv timeout on InfluxDB operations (this hopefully will prevent stuck queries if the InfluxDB server dies while query is in progress);

* prevent InfluxDB query from becoming stuck in a tight infinite loop within select();

* don't bother handling responses from the influx query, remove fluxQL (we don't make queries with this library);

* cleanup unused vars;

* generate an error log if a fluxql worker fails to write data to influx;

* implement support to save/retain configuration pushed from peer link connections;

* fix memory leak caused by not deleting unused packetbuffer;

* refactor ACL updates;

* refactor log messages for channels to be <channel ID>-<channel No> in most cases where applicable;

* add more <channel ID>-<channel No> changes;

* whoops wrong variable type;

* correct fatal bug where update lookup timer was never started;

* check the RF state at the bottom of a talkgroup hang expiration timer for RF talkgroup activity, if the state is not listening, handle the end of call as if it was a frame loss;

* fix potential memory leak in PacketBuffer fragmenter, the encoder was not deleting the storage buffer before end of scope;

* ensure decompressed buffer is deleted;

* ensure decompressed buffer is deleted in error conditions too;

* add support to disable adjacent site broadcast;

* lay the groundwork for explicit channel configuration;

* [EXPERIMENTAL] implement experimental support for a CC to define explicit channel identity information for voice channels (NOTE: this does *NOT* implement support for hotspots to operate in explicit channel mode!);

* don't use the concurrent::unordered_map for this (this gives me great pause for a problem...);

* add some extra debug trace;

* add some extra debug trace;

* display MI data during calibration; update modem submodule;

* this is ugly, and I hate it, but to fix very strange WIN32 deadlock situations, we'll selectively use our concurrent unordered_map on non-WIN32, and on WIN32 use the std unordered_map + a local mutex;

* update modem submodule; change P25 Voice MI logging messages from DEBUG to MESSAGE; fix issue in HostSetup/HostCal where PDU header decoding was broken;

* only dump MI data if the call is encrypted (don't bother displaying zeros for a clear call);

* whoops check right variable;

* cleanup and clarify MI logging;

* cleanup and clarify MI logging (again LDU2 was out of log sequence);

* hate me later, dont use a colon as the string separator for the MI bytes, use equals;

* log DMR PI MI dta;

* refactor debug messaging for HDU;

* reorganize core meta-programming macros, move class property macros into ClassProperties.h, move bit manipulation into BitManipulation.h, move VLA into VariableLengthArray.h; rename meta-programming macros for clarity most of these macros declare some sort of variable and/or functions, as such I'm dropping the notation for __BLAHBLAH and using DECLARE_BLAHBLAH instead; better document class property meta-programming macros; refactor __GET/__SET_UINT16 into __GET/__SET_UINT24 these macros set 24-bit values from and to buffers, this will reduce programming confusion;

* add property documentation for some KMM classes;

* correct file copyright headers;

* change commenting to reflect section more clearly;

* use proper GPL license for file;

* detect arch and properly update internal variable;

* handle instance where the system does not return a valid processor type for arch detection;

* display target arch along side host arch if we're cross compiling;

* strip newlines;

* fix missing parens around response encoding;

R04H30 2025-05-01

01 May 20:15
af2e7c9

Choose a tag to compare

R04H30 Merge to Master (#88)

* implement support for LC_GROUP_UPDT (this includes the RPC between the CC and VC's to announce active TG lists); completely and entirely refactor how packet handling threads are done, use a new method introduced for this, thread pool resources. this will ultimately be more resource consuming depending on configuration as the worker threads for packet processing stay alive along side the main process. this should be more performant (because we're not constantly creating and destroying threads) and will prevent error conditions that can cause an extreme number of threads to spawn;

* reduce influx and V.24 thread pool sizes; add calculation of how long between when a packet was Rx to when it began proper processing;

* don't use void* for the task routines;

* rename ThreadPoolCallback to ThreadPoolTask; add some checking around task validness; correct a valgrind issue with RawFrameQueue() write not deleting the buffer before return;

* valgrind cleanups;

* gate active TG from CC to VC updates at 5s (prevent API spam);

* update package version;

* don't attempt to send active TG updates to 0.0.0.0;

* make notification of active TGs CC -> VC optional;

* correct ThreadPool issue on Win32; split UDP PCM audio processing into its own thread; implement user control of inter-audio frame delay and jitter buffer (if using inter-audio frame delay);

* lock queue;

* add custom classes for STL containers that support mutex locking for thread safe operation; modify ChannelLookup and AffiliationLookup to use concurrent containers; modify FNE to use concurrent containers for internal lists;

* remove mutex used for protecting udp packet deque;

* more concurrency solidification;

* further concurrency class usage; bump version number to R04H30;

* add --boot commandline argument to reboot modem into bootloader without any interactive interface;

* cleanup program -h usage display;

* incorrect opcode define;

* update README.md;

* correct incorrect string format for non-useAlternatePortForDiagnostics;

* update README.md;

* simplify influxdb worker task function;

* refactor PL_ACT_PEER_LIST opcode entirely, use zlib and compress list sent and properly block data sent;

* don't waste cycles on building the peer list repeatedly, build it once for the cycle;

* deduplicate compress/decompress code into a static C++ class;

* stylecop file formatting;

* add table locking and remove at find;

* deduplicate implementation;

* cleanup unused label; change FrameQueue's unordered_map to a concurrent one; fix incorrect setting of __lock() for concurrent containers;

* add more timestream map locking;

* fix incorrect behavior when deriving initial timestamp for a call stream; correct incorrect behavior inserting new stream in to timestamps table for frame queue; fix incorrect behavior deriving timestamp for bridge RTP;

* fix issue with naive approach to handling PL_ACT_PEER_LIST data fragementation;

* disable accidental debug code;

* instead of asserting, throw a log error message and discard network packet;

* lock the talkgroup tables when a find is in progress (this will prevent some weird concurrency behaviors because talkgroup rules does not use the concurrent vector);

* if filter headers or terminators is enabled, and the target peer is in the exclusion list, do not send headers or terminators;

* exclusion check should happen before the rewrite check;

* implement dvmpatch, this is a new utility that allows simple TG to TG patching;

* ensure FNE downstream peers that report as peer link have implicit always rules applied to them (i.e. they will *always* receive *all* traffic); correct order of operations when deleting a peer entry (delete connection *AFTER* removing from peers table);

* document concern over possible null ref concurrency issue;

* don't be overly aggressive with FNE process niceness, nice of -10 is more then sufficient;

R04G21 Build 2025-04-16

16 Apr 15:44

Choose a tag to compare

okay now that I've rewritten history, selectively for amd64 we'll bui…

Release 2023-09-08

08 Sep 11:10

Choose a tag to compare

fix wrong variable used to populate MI data for encryption for networ…

Release 2023-09-05

05 Sep 13:31

Choose a tag to compare

add support to grant demand to support denying a grant and supporting…