Self-registering IP-protocol and UDP-port dispatch; move picomap-specific constants out of generic net/dispatch layers
This commit is contained in:
@@ -39,10 +39,7 @@ void prepend(Buf& buf, const eth::mac_addr& dst_mac, const eth::mac_addr& src_ma
|
||||
|
||||
void handle(std::span<const uint8_t> frame, span_writer& tx);
|
||||
|
||||
namespace client {
|
||||
// Defined by the higher layer (dispatch) to receive decoded UDP payloads
|
||||
// addressed to PICOMAP_PORT_BE. Resolved at link time.
|
||||
void handler(std::span<const uint8_t> payload, const address& from);
|
||||
} // namespace client
|
||||
using port_handler = void (*)(std::span<const uint8_t> payload, const address& from);
|
||||
void register_port(uint16_t port_be, port_handler fn);
|
||||
|
||||
} // namespace udp
|
||||
|
||||
Reference in New Issue
Block a user