ret = FOSA_ENOMEM;
goto err;
}
+
+ if (port->desc.proto->register_cb) {
+ port->desc.proto->register_cb(port);
+ }
+
ret = fosa_thread_create(&port->receiver_thread, NULL,
forb_iop_receiver_thread, port);
if (ret != 0)
/** Converts protocol specific address to string */
size_t (*addr2str)(char *dest, size_t maxlen, const void *addr);
+
+ /**
+ * Callback caled when the port is registered to FORB just
+ * before reception and discovery threads are started.
+ */
+ void (*register_cb)(forb_port_t *port);
};
size_t forb_proto_send(forb_peer_t *peer, FORB_CDR_Codec *codec);