Willy Tarreau | e6b9894 | 2007-10-29 01:09:36 +0100 | [diff] [blame] | 1 | /* |
Willy Tarreau | b1d6774 | 2010-03-29 19:36:59 +0200 | [diff] [blame] | 2 | * include/proto/proto_tcp.h |
| 3 | * This file contains TCP socket protocol definitions. |
| 4 | * |
Willy Tarreau | d4c33c8 | 2013-01-07 21:59:07 +0100 | [diff] [blame] | 5 | * Copyright (C) 2000-2013 Willy Tarreau - w@1wt.eu |
Willy Tarreau | b1d6774 | 2010-03-29 19:36:59 +0200 | [diff] [blame] | 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 | */ |
Willy Tarreau | e6b9894 | 2007-10-29 01:09:36 +0100 | [diff] [blame] | 21 | |
| 22 | #ifndef _PROTO_PROTO_TCP_H |
| 23 | #define _PROTO_PROTO_TCP_H |
| 24 | |
| 25 | #include <common/config.h> |
Thierry FOURNIER | ec3c37d | 2015-09-10 18:28:10 +0200 | [diff] [blame] | 26 | #include <types/action.h> |
Willy Tarreau | e6b9894 | 2007-10-29 01:09:36 +0100 | [diff] [blame] | 27 | #include <types/task.h> |
Willy Tarreau | 9ba2dcc | 2010-06-14 21:04:55 +0200 | [diff] [blame] | 28 | #include <proto/stick_table.h> |
Willy Tarreau | e6b9894 | 2007-10-29 01:09:36 +0100 | [diff] [blame] | 29 | |
David du Colombier | 6f5ccb1 | 2011-03-10 22:26:24 +0100 | [diff] [blame] | 30 | int tcp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct sockaddr_storage *remote); |
Willy Tarreau | 092d865 | 2014-07-07 20:22:12 +0200 | [diff] [blame] | 31 | int tcp_pause_listener(struct listener *l); |
Olivier Houchard | fdcb007 | 2019-05-06 18:32:29 +0200 | [diff] [blame] | 32 | int tcp_connect_server(struct connection *conn, int flags); |
Willy Tarreau | 239d718 | 2012-07-23 18:53:03 +0200 | [diff] [blame] | 33 | int tcp_connect_probe(struct connection *conn); |
Willy Tarreau | 59b9479 | 2012-05-11 16:16:40 +0200 | [diff] [blame] | 34 | int tcp_get_src(int fd, struct sockaddr *sa, socklen_t salen, int dir); |
| 35 | int tcp_get_dst(int fd, struct sockaddr *sa, socklen_t salen, int dir); |
Thierry FOURNIER | cc87a11 | 2014-12-12 19:41:33 +0100 | [diff] [blame] | 36 | |
Thierry FOURNIER | a123ad8 | 2015-07-24 09:12:15 +0200 | [diff] [blame] | 37 | /* Export some samples. */ |
| 38 | int smp_fetch_src(const struct arg *args, struct sample *smp, const char *kw, void *private); |
| 39 | |
Willy Tarreau | e6b9894 | 2007-10-29 01:09:36 +0100 | [diff] [blame] | 40 | #endif /* _PROTO_PROTO_TCP_H */ |
| 41 | |
| 42 | /* |
| 43 | * Local variables: |
| 44 | * c-indent-level: 8 |
| 45 | * c-basic-offset: 8 |
| 46 | * End: |
| 47 | */ |