d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen#ifndef SERVICE_LISTEN_H
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen#define SERVICE_LISTEN_H
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen/* Start listening in all services. Returns -1 for fatal failures,
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen 0 if some of the addresses are already being used or path for
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen unix socket was lost, 1 if all is ok. It's safe to call this function
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen multiple times. */
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainenint services_listen(struct service_list *service_list);
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen/* Move common listener fds from old_services to new_services, close those
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen that aren't needed anymore and finally call services_listen() to add
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen missing listeners. */
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainenint services_listen_using(struct service_list *new_service_list,
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen struct service_list *old_service_list);
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen
5d4c793b4e3dbc07f08daa4465594b1857f80725Timo Sirainenint service_listener_listen(struct service_listener *l);
5d4c793b4e3dbc07f08daa4465594b1857f80725Timo Sirainen
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen#endif