| 1234567891011121314151617181920212223242526272829303132333435363738 |
- /*
- * SPDX-FileCopyrightText: 2026 Benjamin Harris
- * SPDX-License-Identifier: Apache-2.0
- *
- * Dante CMC (device-announce) responder — clean-room, from
- * docs/dante-protocol-notes.md.
- *
- * Listens on the CMC UDP port (8800) and answers the "request device
- * advertisement" message with this device's identity (process id, 8-byte
- * factory device id, IP, info-request port). This is how a peer that found us
- * via mDNS bootstraps to our full identity.
- *
- * Uses the same 10-byte big-endian request/response header as ARC:
- * start_code(u16) total_length(u16) seqnum(u16) opcode1(u16) opcode2(u16)
- * A request has opcode2 == 0; the reply echoes start_code/seqnum/opcode1 and
- * sets opcode2 = 1 (OK), with the advertisement as the content.
- *
- * PROTOTYPE / UNTESTED against real hardware — verify against a capture.
- */
- #pragma once
- #include "dante_device.h"
- #include "esp_err.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Start the CMC responder task. Binds UDP on id->cmc_port and answers
- * device-advertisement requests using `id` (copied internally). */
- esp_err_t dante_cmc_start(const dante_identity_t *id);
- /* Stop the CMC responder task and close its socket. */
- void dante_cmc_stop(void);
- #ifdef __cplusplus
- }
- #endif
|