xref: /original-bsd/sys/miscfs/fifofs/fifo.h (revision 89e46f9f)
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.5 (Berkeley) 04/21/92
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 *dvp,
19 		struct vnode **vpp,
20 		struct componentname *cnp));
21 #define fifo_create ((int (*) __P(( \
22 		struct vnode *dvp, \
23  		struct vnode **vpp, \
24 		struct componentname *cnp, \
25 		struct vattr *vap))) fifo_badop)
26 #define fifo_mknod ((int (*) __P(( \
27 		struct vnode *dvp, \
28 		struct vnode **vpp, \
29 		struct componentname *cnp, \
30 		struct vattr *vap))) fifo_badop)
31 int	fifo_open __P((
32 		struct vnode *vp,
33 		int mode,
34 		struct ucred *cred,
35 		struct proc *p));
36 int	fifo_close __P((
37 		struct vnode *vp,
38 		int fflag,
39 		struct ucred *cred,
40 		struct proc *p));
41 #define fifo_access ((int (*) __P(( \
42 		struct vnode *vp, \
43 		int mode, \
44 		struct ucred *cred, \
45 		struct proc *p))) fifo_ebadf)
46 #define fifo_getattr ((int (*) __P(( \
47 		struct vnode *vp, \
48 		struct vattr *vap, \
49 		struct ucred *cred, \
50 		struct proc *p))) fifo_ebadf)
51 #define fifo_setattr ((int (*) __P(( \
52 		struct vnode *vp, \
53 		struct vattr *vap, \
54 		struct ucred *cred, \
55 		struct proc *p))) fifo_ebadf)
56 int	fifo_read __P((
57 		struct vnode *vp,
58 		struct uio *uio,
59 		int ioflag,
60 		struct ucred *cred));
61 int	fifo_write __P((
62 		struct vnode *vp,
63 		struct uio *uio,
64 		int ioflag,
65 		struct ucred *cred));
66 int	fifo_ioctl __P((
67 		struct vnode *vp,
68 		int command,
69 		caddr_t data,
70 		int fflag,
71 		struct ucred *cred,
72 		struct proc *p));
73 int	fifo_select __P((
74 		struct vnode *vp,
75 		int which,
76 		int fflags,
77 		struct ucred *cred,
78 		struct proc *p));
79 #define fifo_mmap ((int (*) __P(( \
80 		struct vnode *vp, \
81 		int fflags, \
82 		struct ucred *cred, \
83 		struct proc *p))) fifo_badop)
84 #define fifo_fsync ((int (*) __P(( \
85 		struct vnode *vp, \
86 		int fflags, \
87 		struct ucred *cred, \
88 		int waitfor, \
89 		struct proc *p))) nullop)
90 #define fifo_seek ((int (*) __P(( \
91 		struct vnode *vp, \
92 		off_t oldoff, \
93 		off_t newoff, \
94 		struct ucred *cred))) fifo_badop)
95 #define fifo_remove ((int (*) __P(( \
96 		struct vnode *dvp, \
97 	        struct vnode *vp, \
98 		struct componentname *cnp))) fifo_badop)
99 #define fifo_link ((int (*) __P(( \
100 		register struct vnode *vp, \
101 		struct vnode *tdvp, \
102 		struct componentname *cnp))) fifo_badop)
103 #define fifo_rename ((int (*) __P(( \
104 		struct vnode *fdvp, \
105 	        struct vnode *fvp, \
106 		struct componentname *fcnp, \
107 		struct vnode *tdvp, \
108 		struct vnode *tvp, \
109 		struct componentname *tcnp))) fifo_badop)
110 #define fifo_mkdir ((int (*) __P(( \
111 		struct vnode *dvp, \
112 		struct vnode **vpp, \
113 		struct componentname *cnp, \
114 		struct vattr *vap))) fifo_badop)
115 #define fifo_rmdir ((int (*) __P(( \
116 		struct vnode *dvp, \
117 		struct vnode *vp, \
118 		struct componentname *cnp))) fifo_badop)
119 #define fifo_symlink ((int (*) __P(( \
120 		struct vnode *dvp, \
121 		struct vnode **vpp, \
122 		struct componentname *cnp, \
123 		struct vattr *vap, \
124 		char *target))) fifo_badop)
125 #define fifo_readdir ((int (*) __P(( \
126 		struct vnode *vp, \
127 		struct uio *uio, \
128 		struct ucred *cred, \
129 		int *eofflagp))) fifo_badop)
130 #define fifo_readlink ((int (*) __P(( \
131 		struct vnode *vp, \
132 		struct uio *uio, \
133 		struct ucred *cred))) fifo_badop)
134 #define fifo_abortop ((int (*) __P(( \
135 		struct vnode *dvp, \
136 		struct componentname *cnp))) fifo_badop)
137 #define fifo_inactive ((int (*) __P(( \
138 		struct vnode *vp, \
139 		struct proc *p))) nullop)
140 #define fifo_reclaim ((int (*) __P(( \
141 		struct vnode *vp))) nullop)
142 int	fifo_lock __P((
143 		struct vnode *vp));
144 int	fifo_unlock __P((
145 		struct vnode *vp));
146 int	fifo_bmap __P((
147 		struct vnode *vp,
148 		daddr_t bn,
149 		struct vnode **vpp,
150 		daddr_t *bnp));
151 #define fifo_strategy ((int (*) __P(( \
152 		struct buf *bp))) fifo_badop)
153 int	fifo_print __P((
154 		struct vnode *vp));
155 #define fifo_islocked ((int (*) __P(( \
156 		struct vnode *vp))) nullop)
157 int	fifo_advlock __P((
158 		struct vnode *vp,
159 		caddr_t id,
160 		int op,
161 		struct flock *fl,
162 		int flags));
163 #define fifo_blkatoff ((int (*) __P(( \
164 		struct vnode *vp, \
165 		off_t offset, \
166 		char **res, \
167 		struct buf **bpp))) fifo_badop)
168 #define fifo_vget ((int (*) __P(( \
169 		struct mount *mp, \
170 		ino_t ino, \
171 		struct vnode **vpp))) fifo_badop)
172 #define fifo_valloc ((int (*) __P(( \
173 		struct vnode *pvp, \
174 		int mode, \
175 		struct ucred *cred, \
176 		struct vnode **vpp))) fifo_badop)
177 #define fifo_vfree ((void (*) __P(( \
178 		struct vnode *pvp, \
179 		ino_t ino, \
180 		int mode))) fifo_badop)
181 #define fifo_truncate ((int (*) __P(( \
182 		struct vnode *vp, \
183 		off_t length, \
184 		int flags, \
185 		struct ucred *cred))) nullop)
186 #define fifo_update ((int (*) __P(( \
187 		struct vnode *vp, \
188 		struct timeval *ta, \
189 		struct timeval *tm, \
190 		int waitfor))) nullop)
191 #define fifo_bwrite ((int (*) __P(( \
192 		struct buf *bp))) nullop)
193 #endif /* FIFO */
194