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