blob: 29e6c1c2dcf8a8a413ac082cb6f28b61adc472bd [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
Willy Tarreau4c7e4b72020-05-27 12:58:42 +020025#include <haproxy/api.h>
Willy Tarreaue6b98942007-10-29 01:09:36 +010026#include <types/task.h>
Willy Tarreau9ba2dcc2010-06-14 21:04:55 +020027#include <proto/stick_table.h>
Willy Tarreaue6b98942007-10-29 01:09:36 +010028
David du Colombier6f5ccb12011-03-10 22:26:24 +010029int tcp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct sockaddr_storage *remote);
Willy Tarreau092d8652014-07-07 20:22:12 +020030int tcp_pause_listener(struct listener *l);
Olivier Houchardfdcb0072019-05-06 18:32:29 +020031int tcp_connect_server(struct connection *conn, int flags);
Willy Tarreau59b94792012-05-11 16:16:40 +020032int tcp_get_src(int fd, struct sockaddr *sa, socklen_t salen, int dir);
33int tcp_get_dst(int fd, struct sockaddr *sa, socklen_t salen, int dir);
Thierry FOURNIERcc87a112014-12-12 19:41:33 +010034
Thierry FOURNIERa123ad82015-07-24 09:12:15 +020035/* Export some samples. */
36int smp_fetch_src(const struct arg *args, struct sample *smp, const char *kw, void *private);
37
Willy Tarreaue6b98942007-10-29 01:09:36 +010038#endif /* _PROTO_PROTO_TCP_H */
39
40/*
41 * Local variables:
42 * c-indent-level: 8
43 * c-basic-offset: 8
44 * End:
45 */