blob: e77663b9286df8920c9ec927470cfca1c89b9cad [file] [log] [blame]
Christopher Faulet4f0f88a2019-08-10 11:17:44 +02001/*
2 * include/types/h1_htx.h
3 * This file defines function prototypes for H1 manipulation using the
4 * internal representation.
5 *
6 * Copyright (C) 2019 HAProxy Technologies, Christopher Faulet <cfaulet@haproxy.com>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation, version 2.1
11 * exclusively.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef _PROTO_H1_HTX_H
24#define _PROTO_H1_HTX_H
25
26#include <common/buf.h>
27#include <common/ist.h>
28#include <common/h1.h>
29
30int h1_parse_msg_hdrs(struct h1m *h1m, union h1_sl *h1sl, struct htx *dsthtx,
31 struct buffer *srcbuf, size_t ofs, size_t max);
Christopher Fauletaf542632019-10-01 21:52:49 +020032int h1_parse_msg_data(struct h1m *h1m, struct htx **dsthtx,
Christopher Faulet4f0f88a2019-08-10 11:17:44 +020033 struct buffer *srcbuf, size_t ofs, size_t max,
34 struct buffer *htxbuf);
35int h1_parse_msg_tlrs(struct h1m *h1m, struct htx *dsthtx,
36 struct buffer *srcbuf, size_t ofs, size_t max);
37
Christopher Faulet53a899b2019-10-08 16:38:42 +020038int h1_format_htx_reqline(const struct htx_sl *sl, struct buffer *chk);
39int h1_format_htx_stline(const struct htx_sl *sl, struct buffer *chk);
40int h1_format_htx_hdr(const struct ist n, const struct ist v, struct buffer *chk);
41int h1_format_htx_data(const struct ist data, struct buffer *chk, int chunked);
42
Christopher Faulet4f0f88a2019-08-10 11:17:44 +020043#endif /* _PROTO_H1_HTX_H */
44
45/*
46 * Local variables:
47 * c-indent-level: 8
48 * c-basic-offset: 8
49 * End:
50 */