SIGN IN SIGN UP

cmk-agent-ctl: replace bincode with hand-rolled header serialization

The bincode crate is unmaintained (RUSTSEC-2025-0141). Its only use in
the repository was the mailslot transport of the agent controller.

The windows agent reads the mailslot header as the raw bytes of a C
struct (CarrierDataHeader in agents/wnx/include/wnx/carrier.h; packed,
little-endian). bincode reproduced that layout only incidentally,
through its legacy encoding with fixed-width little-endian integers.
The new MailSlotHeader::to_le_bytes() writes the layout directly. A
golden-bytes test pins the 128-byte format. The expected bytes in that
test are the verbatim output of bincode 1.3.3 for the same header.

The message payload was serialized with bincode and then stripped of
the 8-byte length prefix again, which produced exactly the input bytes.
The payload is now appended without the detour.

TESTS: manual
A throwaway harness outside the repository compared bincode 1.3.3
against the new to_le_bytes() for fixed edge cases and for 1000 varied
headers. All serializations were byte-identical. The same harness
generated the golden bytes for the new unit test. The windows-compiled
unit tests, including the mailslot round-trip and the new golden test,
pass under Wine (//packages/cmk-agent-ctl:cmk-agent-ctl-tests-wine).

CMK-29949

Change-Id: I3c6a832fd1b34eae4f626572d1458ddb369e781f
A
Andreas Umbreit committed
2f58b6f74fde9035b9318a327afa618c4995fb98
Parent: c9e2b28