blob: 76f89b1f34d7837e7c89addf39c471e4558880f8 [file] [log] [blame]
Willy Tarreaue6b98942007-10-29 01:09:36 +01001/*
Willy Tarreaub1d67742010-03-29 19:36:59 +02002 * include/proto/proto_tcp.h
3 * This file contains TCP socket protocol definitions.
4 *
Willy Tarreaud4c33c82013-01-07 21:59:07 +01005 * Copyright (C) 2000-2013 Willy Tarreau - w@1wt.eu
Willy Tarreaub1d67742010-03-29 19:36:59 +02006 *
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 */
Willy Tarreaue6b98942007-10-29 01:09:36 +010021
22#ifndef _PROTO_PROTO_TCP_H
23#define _PROTO_PROTO_TCP_H
24
25#include <common/config.h>
Thierry FOURNIERec3c37d2015-09-10 18:28:10 +020026#include <types/action.h>
Willy Tarreaue6b98942007-10-29 01:09:36 +010027#include <types/task.h>
Willy Tarreau9ba2dcc2010-06-14 21:04:55 +020028#include <proto/stick_table.h>
Willy Tarreaue6b98942007-10-29 01:09:36 +010029
David du Colombier6f5ccb12011-03-10 22:26:24 +010030int tcp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct sockaddr_storage *remote);
Willy Tarreau092d8652014-07-07 20:22:12 +020031int tcp_pause_listener(struct listener *l);
Olivier Houchardfdcb0072019-05-06 18:32:29 +020032int tcp_connect_server(struct connection *conn, int flags);
Willy Tarreau239d7182012-07-23 18:53:03 +020033int tcp_connect_probe(struct connection *conn);
Willy Tarreau59b94792012-05-11 16:16:40 +020034int tcp_get_src(int fd, struct sockaddr *sa, socklen_t salen, int dir);
35int tcp_get_dst(int fd, struct sockaddr *sa, socklen_t salen, int dir);
Thierry FOURNIERcc87a112014-12-12 19:41:33 +010036
Thierry FOURNIERa123ad82015-07-24 09:12:15 +020037/* Export some samples. */
38int smp_fetch_src(const struct arg *args, struct sample *smp, const char *kw, void *private);
39
Willy Tarreaue6b98942007-10-29 01:09:36 +010040#endif /* _PROTO_PROTO_TCP_H */
41
42/*
43 * Local variables:
44 * c-indent-level: 8
45 * c-basic-offset: 8
46 * End:
47 */