controller-legacy/include/discovery.h

28 lines
649 B
C
Raw Normal View History

2020-02-09 23:58:17 +00:00
#ifndef CONTROLLER_DISCOVERY_H
#define CONTROLLER_DISCOVERY_H
2020-02-23 00:13:27 +00:00
#include <models/controller.h>
/**
* @brief Open socket for discovery
*
* Will exit program when unable to open socket.
*
* @param discovery_port Port number to listen on for discovery broadcasts
*
* @return Open socket to accept discovery broadcasts on
*/
int
discovery_socket_open(uint16_t discovery_port);
/**
* @brief Handle the discovery processing
*
* @param fd File descriptor to receive initial data from
* @param cntrlr Controller to use for answering discovery
*/
void
discovery_handle_discover(int fd, controller *cntrlr);
2020-02-09 23:58:17 +00:00
#endif /* CONTROLLER_DISCOVERY_H */