1*bf1e0606Sclaudio /* $OpenBSD: control.h,v 1.8 2021/01/19 09:42:11 claudio Exp $ */ 2a1a4e97bSnorby 3a1a4e97bSnorby /* 4a1a4e97bSnorby * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> 5a1a4e97bSnorby * 6a1a4e97bSnorby * Permission to use, copy, modify, and distribute this software for any 7a1a4e97bSnorby * purpose with or without fee is hereby granted, provided that the above 8a1a4e97bSnorby * copyright notice and this permission notice appear in all copies. 9a1a4e97bSnorby * 10a1a4e97bSnorby * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11a1a4e97bSnorby * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12a1a4e97bSnorby * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13a1a4e97bSnorby * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14a1a4e97bSnorby * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15a1a4e97bSnorby * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16a1a4e97bSnorby * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17a1a4e97bSnorby */ 18a1a4e97bSnorby 19a1a4e97bSnorby #ifndef _CONTROL_H_ 20a1a4e97bSnorby #define _CONTROL_H_ 21a1a4e97bSnorby 22a1a4e97bSnorby #include <sys/queue.h> 23a1a4e97bSnorby #include <sys/time.h> 24a1a4e97bSnorby #include <event.h> 25a1a4e97bSnorby 26a1a4e97bSnorby struct ctl_conn { 27a1a4e97bSnorby TAILQ_ENTRY(ctl_conn) entry; 28f78850efSeric struct imsgev iev; 29a1a4e97bSnorby }; 30a1a4e97bSnorby 31cb75d791Sremi int control_check(char *); 32c2ca8945Ssthen int control_init(char *); 33*bf1e0606Sclaudio int control_listen(int); 34a1a4e97bSnorby void control_accept(int, short, void *); 35a1a4e97bSnorby void control_dispatch_imsg(int, short, void *); 36a1a4e97bSnorby int control_imsg_relay(struct imsg *); 37faef135eSremi void control_cleanup(void); 38a1a4e97bSnorby 39a1a4e97bSnorby #endif /* _CONTROL_H_ */ 40