blob: 1a1fcfdaeadf5895949bab6ffa8703d329668770 [file] [log] [blame]
Willy Tarreau551271d2020-06-04 08:32:23 +02001/*
2 * include/haproxy/pipe-t.h
3 * Pipe management - types definitions.
4 *
5 * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation, version 2.1
10 * exclusively.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#ifndef _HAPROXY_PIPE_T_H
23#define _HAPROXY_PIPE_T_H
24
25/* A pipe is described by its read and write FDs, and the data remaining in it.
26 * The FDs are valid if there are data pending. The user is not allowed to
27 * change the FDs.
28 */
29struct pipe {
30 int data; /* number of bytes present in the pipe */
31 int prod; /* FD the producer must write to ; -1 if none */
32 int cons; /* FD the consumer must read from ; -1 if none */
33 struct pipe *next;
34};
35
36#endif /* _HAPROXY_PIPE_T_H */
37
38/*
39 * Local variables:
40 * c-indent-level: 8
41 * c-basic-offset: 8
42 * End:
43 */