Home | History | Annotate | Line # | Download | only in perfused
      1  1.11       pho /*  $NetBSD: perfused.h,v 1.11 2021/12/04 06:42:39 pho Exp $ */
      2   1.1      manu 
      3   1.1      manu /*-
      4   1.1      manu  *  Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
      5   1.1      manu  *
      6   1.1      manu  *  Redistribution and use in source and binary forms, with or without
      7   1.1      manu  *  modification, are permitted provided that the following conditions
      8   1.1      manu  *  are met:
      9   1.1      manu  *  1. Redistributions of source code must retain the above copyright
     10   1.1      manu  *     notice, this list of conditions and the following disclaimer.
     11   1.1      manu  *  2. Redistributions in binary form must reproduce the above copyright
     12   1.1      manu  *     notice, this list of conditions and the following disclaimer in the
     13   1.1      manu  *     documentation and/or other materials provided with the distribution.
     14   1.1      manu  *
     15   1.1      manu  *  THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     16   1.1      manu  *  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     17   1.1      manu  *  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     18   1.1      manu  *  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     19   1.1      manu  *  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     20   1.1      manu  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     21   1.1      manu  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     22   1.1      manu  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     23   1.1      manu  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     24   1.1      manu  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     25   1.1      manu  *  POSSIBILITY OF SUCH DAMAGE.
     26   1.1      manu  */
     27   1.1      manu 
     28   1.1      manu #ifndef _PERFUSED_H_
     29   1.1      manu #define _PERFUSED_H_
     30   1.1      manu 
     31   1.1      manu #include <puffs.h>
     32   1.1      manu #include "../../lib/libperfuse/perfuse_if.h"
     33   1.1      manu 
     34   1.1      manu #define PERFUSE_MSG_T struct puffs_framebuf
     35   1.1      manu 
     36   1.8  christos #define _PATH_VAR_RUN_PERFUSE_TRACE "/var/run/perfused%s.trace"
     37   1.6      manu 
     38   1.1      manu __BEGIN_DECLS
     39   1.1      manu 
     40   1.1      manu #ifdef PERFUSE_DEBUG
     41   1.8  christos void perfused_hexdump(const char *, size_t);
     42   1.8  christos const char *perfused_opname(int);
     43   1.8  christos extern int perfused_diagflags;
     44   1.1      manu #endif /* PERFUSE_DEBUG */
     45   1.1      manu 
     46   1.8  christos int perfused_open_sock(void);
     47   1.8  christos void *perfused_recv_early(int, struct sockcred *, size_t);
     48   1.8  christos int perfused_readframe(struct puffs_usermount *,
     49   1.1      manu      struct puffs_framebuf *, int, int *);
     50   1.8  christos int perfused_writeframe(struct puffs_usermount *,
     51   1.1      manu      struct puffs_framebuf *, int, int *);
     52   1.8  christos int perfused_cmpframe(struct puffs_usermount *,
     53   1.1      manu      struct puffs_framebuf *, struct puffs_framebuf *, int *);
     54   1.8  christos void perfused_gotframe(struct puffs_usermount *, struct puffs_framebuf *);
     55   1.8  christos void perfused_fdnotify(struct puffs_usermount *, int, int) __dead;
     56   1.1      manu 
     57   1.8  christos struct fuse_out_header *perfused_get_outhdr(perfuse_msg_t *);
     58   1.8  christos struct fuse_in_header *perfused_get_inhdr(perfuse_msg_t *);
     59   1.8  christos char *perfused_get_inpayload(perfuse_msg_t *);
     60   1.8  christos char *perfused_get_outpayload(perfuse_msg_t *);
     61   1.8  christos void perfused_umount(struct puffs_usermount *);
     62   1.1      manu 
     63   1.8  christos perfuse_msg_t *perfused_new_pb(struct puffs_usermount *,
     64   1.1      manu     puffs_cookie_t, int, size_t, const struct puffs_cred *);
     65   1.8  christos int perfused_xchg_pb(struct puffs_usermount *, perfuse_msg_t *, size_t,
     66   1.1      manu     enum perfuse_xchg_pb_reply);
     67   1.1      manu 
     68  1.10     joerg void perfused_panic(void) __dead;
     69   1.9      manu 
     70   1.1      manu __END_DECLS
     71   1.1      manu 
     72   1.1      manu #endif /* _PERFUSED_H_ */
     73