1*9f45a3c8SSimon J. Gerraty /* $NetBSD: filemon.h,v 1.6 2021/12/15 12:08:25 rillig Exp $ */ 249caa483SSimon J. Gerraty 3dba7b0efSSimon J. Gerraty /* 449caa483SSimon J. Gerraty * Copyright (c) 2019 The NetBSD Foundation, Inc. 549caa483SSimon J. Gerraty * All rights reserved. 649caa483SSimon J. Gerraty * 749caa483SSimon J. Gerraty * This code is derived from software contributed to The NetBSD Foundation 849caa483SSimon J. Gerraty * by Taylor R. Campbell. 949caa483SSimon J. Gerraty * 1049caa483SSimon J. Gerraty * Redistribution and use in source and binary forms, with or without 1149caa483SSimon J. Gerraty * modification, are permitted provided that the following conditions 1249caa483SSimon J. Gerraty * are met: 1349caa483SSimon J. Gerraty * 1. Redistributions of source code must retain the above copyright 1449caa483SSimon J. Gerraty * notice, this list of conditions and the following disclaimer. 1549caa483SSimon J. Gerraty * 2. Redistributions in binary form must reproduce the above copyright 1649caa483SSimon J. Gerraty * notice, this list of conditions and the following disclaimer in the 1749caa483SSimon J. Gerraty * documentation and/or other materials provided with the distribution. 1849caa483SSimon J. Gerraty * 1949caa483SSimon J. Gerraty * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2049caa483SSimon J. Gerraty * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2149caa483SSimon J. Gerraty * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2249caa483SSimon J. Gerraty * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2349caa483SSimon J. Gerraty * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2449caa483SSimon J. Gerraty * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2549caa483SSimon J. Gerraty * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2649caa483SSimon J. Gerraty * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2749caa483SSimon J. Gerraty * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2849caa483SSimon J. Gerraty * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2949caa483SSimon J. Gerraty * POSSIBILITY OF SUCH DAMAGE. 3049caa483SSimon J. Gerraty */ 3149caa483SSimon J. Gerraty 32956e45f6SSimon J. Gerraty #ifndef MAKE_FILEMON_H 33956e45f6SSimon J. Gerraty #define MAKE_FILEMON_H 3449caa483SSimon J. Gerraty 3549caa483SSimon J. Gerraty #include <sys/types.h> 3649caa483SSimon J. Gerraty 3749caa483SSimon J. Gerraty struct filemon; 3849caa483SSimon J. Gerraty 3949caa483SSimon J. Gerraty const char * 4049caa483SSimon J. Gerraty filemon_path(void); 4149caa483SSimon J. Gerraty 4249caa483SSimon J. Gerraty struct filemon * 4349caa483SSimon J. Gerraty filemon_open(void); 4449caa483SSimon J. Gerraty int filemon_close(struct filemon *); 4549caa483SSimon J. Gerraty 4649caa483SSimon J. Gerraty int filemon_setfd(struct filemon *, int); 4749caa483SSimon J. Gerraty void filemon_setpid_parent(struct filemon *, pid_t); 4849caa483SSimon J. Gerraty int filemon_setpid_child(const struct filemon *, pid_t); 4949caa483SSimon J. Gerraty 5049caa483SSimon J. Gerraty int filemon_readfd(const struct filemon *); 5149caa483SSimon J. Gerraty int filemon_process(struct filemon *); 5249caa483SSimon J. Gerraty 53*9f45a3c8SSimon J. Gerraty #endif 54