blob: 02b9bdca7beeb48ea064a5db330641ac645e5fbd [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
Willy Tarreau8dabda72020-05-27 17:22:10 +020026#include <haproxy/buf.h>
Willy Tarreaueb6f7012020-05-27 16:21:26 +020027#include <import/ist.h>
Christopher Faulet4f0f88a2019-08-10 11:17:44 +020028#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);
Christopher Faulet76014fd2019-12-10 11:47:22 +010037int h1_parse_msg_eom(struct h1m *h1m, struct htx *dsthtx, size_t max);
Christopher Faulet4f0f88a2019-08-10 11:17:44 +020038
Christopher Faulet53a899b2019-10-08 16:38:42 +020039int h1_format_htx_reqline(const struct htx_sl *sl, struct buffer *chk);
40int h1_format_htx_stline(const struct htx_sl *sl, struct buffer *chk);
41int h1_format_htx_hdr(const struct ist n, const struct ist v, struct buffer *chk);
42int h1_format_htx_data(const struct ist data, struct buffer *chk, int chunked);
43
Christopher Faulet4f0f88a2019-08-10 11:17:44 +020044#endif /* _PROTO_H1_HTX_H */
45
46/*
47 * Local variables:
48 * c-indent-level: 8
49 * c-basic-offset: 8
50 * End:
51 */