xref: /original-bsd/sys/miscfs/fifofs/fifo.h (revision 1b11f3a3)
1 /*
2  * Copyright (c) 1991 The Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)fifo.h	7.2 (Berkeley) 11/05/91
8  */
9 
10 #ifdef FIFO
11 /*
12  * Prototypes for fifo operations on vnodes.
13  */
14 int	fifo_badop(),
15 	fifo_ebadf();
16 
17 int	fifo_lookup __P((
18 		struct vnode *vp,
19 		struct nameidata *ndp,
20 		struct proc *p));
21 #define fifo_create ((int (*) __P(( \
22 		struct nameidata *ndp, \
23 		struct vattr *vap, \
24 		struct proc *p))) fifo_badop)
25 #define fifo_mknod ((int (*) __P(( \
26 		struct nameidata *ndp, \
27 		struct vattr *vap, \
28 		struct ucred *cred, \
29 		struct proc *p))) fifo_badop)
30 int	fifo_open __P((
31 		struct vnode *vp,
32 		int mode,
33 		struct ucred *cred,
34 		struct proc *p));
35 int	fifo_close __P((
36 		struct vnode *vp,
37 		int fflag,
38 		struct ucred *cred,
39 		struct proc *p));
40 #define fifo_access ((int (*) __P(( \
41 		struct vnode *vp, \
42 		int mode, \
43 		struct ucred *cred, \
44 		struct proc *p))) fifo_ebadf)
45 #define fifo_getattr ((int (*) __P(( \
46 		struct vnode *vp, \
47 		struct vattr *vap, \
48 		struct ucred *cred, \
49 		struct proc *p))) fifo_ebadf)
50 #define fifo_setattr ((int (*) __P(( \
51 		struct vnode *vp, \
52 		struct vattr *vap, \
53 		struct ucred *cred, \
54 		struct proc *p))) fifo_ebadf)
55 int	fifo_read __P((
56 		struct vnode *vp,
57 		struct uio *uio,
58 		int ioflag,
59 		struct ucred *cred));
60 int	fifo_write __P((
61 		struct vnode *vp,
62 		struct uio *uio,
63 		int ioflag,
64 		struct ucred *cred));
65 int	fifo_ioctl __P((
66 		struct vnode *vp,
67 		int command,
68 		caddr_t data,
69 		int fflag,
70 		struct ucred *cred,
71 		struct proc *p));
72 int	fifo_select __P((
73 		struct vnode *vp,
74 		int which,
75 		int fflags,
76 		struct ucred *cred,
77 		struct proc *p));
78 #define fifo_mmap ((int (*) __P(( \
79 		struct vnode *vp, \
80 		int fflags, \
81 		struct ucred *cred, \
82 		struct proc *p))) fifo_badop)
83 #define fifo_fsync ((int (*) __P(( \
84 		struct vnode *vp, \
85 		int fflags, \
86 		struct ucred *cred, \
87 		int waitfor, \
88 		struct proc *p))) nullop)
89 #define fifo_seek ((int (*) __P(( \
90 		struct vnode *vp, \
91 		off_t oldoff, \
92 		off_t newoff, \
93 		struct ucred *cred))) fifo_badop)
94 #define fifo_remove ((int (*) __P(( \
95 		struct nameidata *ndp, \
96 		struct proc *p))) fifo_badop)
97 #define fifo_link ((int (*) __P(( \
98 		struct vnode *vp, \
99 		struct nameidata *ndp, \
100 		struct proc *p))) fifo_badop)
101 #define fifo_rename ((int (*) __P(( \
102 		struct nameidata *fndp, \
103 		struct nameidata *tdnp, \
104 		struct proc *p))) fifo_badop)
105 #define fifo_mkdir ((int (*) __P(( \
106 		struct nameidata *ndp, \
107 		struct vattr *vap, \
108 		struct proc *p))) fifo_badop)
109 #define fifo_rmdir ((int (*) __P(( \
110 		struct nameidata *ndp, \
111 		struct proc *p))) fifo_badop)
112 #define fifo_symlink ((int (*) __P(( \
113 		struct nameidata *ndp, \
114 		struct vattr *vap, \
115 		char *target, \
116 		struct proc *p))) fifo_badop)
117 #define fifo_readdir ((int (*) __P(( \
118 		struct vnode *vp, \
119 		struct uio *uio, \
120 		struct ucred *cred, \
121 		int *eofflagp))) fifo_badop)
122 #define fifo_readlink ((int (*) __P(( \
123 		struct vnode *vp, \
124 		struct uio *uio, \
125 		struct ucred *cred))) fifo_badop)
126 #define fifo_abortop ((int (*) __P(( \
127 		struct nameidata *ndp))) fifo_badop)
128 #define fifo_inactive ((int (*) __P(( \
129 		struct vnode *vp, \
130 		struct proc *p))) nullop)
131 #define fifo_reclaim ((int (*) __P(( \
132 		struct vnode *vp))) nullop)
133 int	fifo_lock __P((
134 		struct vnode *vp));
135 int	fifo_unlock __P((
136 		struct vnode *vp));
137 int	fifo_bmap __P((
138 		struct vnode *vp,
139 		daddr_t bn,
140 		struct vnode **vpp,
141 		daddr_t *bnp));
142 #define fifo_strategy ((int (*) __P(( \
143 		struct buf *bp))) fifo_badop)
144 int	fifo_print __P((
145 		struct vnode *vp));
146 #define fifo_islocked ((int (*) __P(( \
147 		struct vnode *vp))) nullop)
148 int	fifo_advlock __P((
149 		struct vnode *vp,
150 		caddr_t id,
151 		int op,
152 		struct flock *fl,
153 		int flags));
154 #define fifo_blkatoff ((int (*) __P(( \
155 		struct vnode *vp, \
156 		off_t offset, \
157 		char **res, \
158 		struct buf **bpp))) fifo_badop)
159 #define fifo_vget ((int (*) __P(( \
160 		struct mount *mp, \
161 		ino_t ino, \
162 		struct vnode **vpp))) fifo_badop)
163 #define fifo_valloc ((int (*) __P(( \
164 		struct vnode *pvp, \
165 		int mode, \
166 		struct ucred *cred, \
167 		struct vnode **vpp))) fifo_badop)
168 #define fifo_vfree ((void (*) __P(( \
169 		struct vnode *pvp, \
170 		ino_t ino, \
171 		int mode))) fifo_badop)
172 #define fifo_truncate ((int (*) __P(( \
173 		struct vnode *vp, \
174 		u_long length, \
175 		int flags))) nullop)
176 #define fifo_update ((int (*) __P(( \
177 		struct vnode *vp, \
178 		struct timeval *ta, \
179 		struct timeval *tm, \
180 		int waitfor))) nullop)
181 #define fifo_bwrite ((int (*) __P(( \
182 		struct buf *bp))) nullop)
183 #endif /* FIFO */
184