147c08596SBrooks Davis /* $OpenBSD: privsep.h,v 1.2 2004/05/04 18:51:18 henning Exp $ */ 247c08596SBrooks Davis 347c08596SBrooks Davis /* 447c08596SBrooks Davis * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> 547c08596SBrooks Davis * 647c08596SBrooks Davis * Permission to use, copy, modify, and distribute this software for any 747c08596SBrooks Davis * purpose with or without fee is hereby granted, provided that the above 847c08596SBrooks Davis * copyright notice and this permission notice appear in all copies. 947c08596SBrooks Davis * 1047c08596SBrooks Davis * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 1147c08596SBrooks Davis * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 1247c08596SBrooks Davis * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 1347c08596SBrooks Davis * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 1447c08596SBrooks Davis * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN 1547c08596SBrooks Davis * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 1647c08596SBrooks Davis * OF OR IN CONNECTION WITH THE USE, ABUSE OR PERFORMANCE OF THIS SOFTWARE. 1747c08596SBrooks Davis */ 1847c08596SBrooks Davis 1947c08596SBrooks Davis #include <sys/types.h> 2047c08596SBrooks Davis 2147c08596SBrooks Davis #include <poll.h> 2247c08596SBrooks Davis #include <pwd.h> 2347c08596SBrooks Davis 2447c08596SBrooks Davis struct buf { 2547c08596SBrooks Davis u_char *buf; 2647c08596SBrooks Davis size_t size; 2747c08596SBrooks Davis size_t wpos; 2847c08596SBrooks Davis size_t rpos; 2947c08596SBrooks Davis }; 3047c08596SBrooks Davis 3147c08596SBrooks Davis enum imsg_code { 3247c08596SBrooks Davis IMSG_NONE, 3347c08596SBrooks Davis IMSG_SCRIPT_INIT, 3447c08596SBrooks Davis IMSG_SCRIPT_WRITE_PARAMS, 3547c08596SBrooks Davis IMSG_SCRIPT_GO, 367fdc27bcSPawel Jakub Dawidek IMSG_SCRIPT_GO_RET, 37*387016a5SConrad Meyer IMSG_SEND_PACKET, 38*387016a5SConrad Meyer IMSG_SET_INTERFACE_MTU, 3947c08596SBrooks Davis }; 4047c08596SBrooks Davis 4147c08596SBrooks Davis struct imsg_hdr { 4247c08596SBrooks Davis enum imsg_code code; 4347c08596SBrooks Davis size_t len; 4447c08596SBrooks Davis }; 45