diagmunge: shared DIAG transport core (+ format-munge tools)
Copyright 2026 Luke Jenkins

This product includes software developed by Luke Jenkins
(https://github.com/lukejenkins).

Licensed under the Apache License, Version 2.0. See the LICENSE file
for the full license text.

------------------------------------------------------------------------
Third-party attributions
------------------------------------------------------------------------

No third-party code is incorporated into diagmunge. The DIAG transport
core (DiagClient, its serial/raw-fd/TCP/UDP transports, the HDLC framing
and CRC-16/MCRF4XX implementation, and the DGE1 datagram helpers) is
first-party: it arms the modem's DIAG log mask itself and pumps raw
HDLC. It does not import, link, or shell out to other DIAG tooling
(QCSuper, SCAT, osmo-qcdiag) or to pycrate, so none of their license
terms attach; the Apache-2.0 grant above covers the whole of diagmunge.

The measured QSH-trace maskset data in
src/diagmunge/data/qsh_maskset_measured.json was found by trial and error
on five modems (SDX55, SDX62 and SDX72) and is provided AS IS, WITH NO
WARRANTY; see src/diagmunge/data/QSH_MASKSET_MEASURED.md, which also says
how it was measured, before arming it.

Optional integrations are lazy and never required to import diagmunge:
  * pyserial (BSD): imported inside DiagClient.from_serial(); the
    serial transport only. Declared as the `serial` extra.
  * pyusb (BSD-3-Clause): imported inside DiagClient.from_libusb(); the
    direct-USB transport only. Declared as the `libusb` extra.
  * diaggrok (Apache-2.0, sibling repo): imported inside
    DiagClient.wait_for_log_codes() for the decode helper only. Declared as
    the `decode` extra. The dependency edge is inward-only
    (diagmunge -> diaggrok); diaggrok never depends on diagmunge.
