2007-10-29 00:09:36 +00:00
|
|
|
/*
|
2010-03-29 17:36:59 +00:00
|
|
|
* include/proto/proto_tcp.h
|
|
|
|
* This file contains TCP socket protocol definitions.
|
|
|
|
*
|
MEDIUM: samples: move payload-based fetches and ACLs to their own file
The file acl.c is a real mess, it both contains functions to parse and
process ACLs, and some sample extraction functions which act on buffers.
Some other payload analysers were arbitrarily dispatched to proto_tcp.c.
So now we're moving all payload-based fetches and ACLs to payload.c
which is capable of extracting data from buffers and rely on everything
that is protocol-independant. That way we can safely inflate this file
and only use the other ones when some fetches are really specific (eg:
HTTP, SSL, ...).
As a result of this cleanup, the following new sample fetches became
available even if they're not really useful :
always_false, always_true, rep_ssl_hello_type, rdp_cookie_cnt,
req_len, req_ssl_hello_type, req_ssl_sni, req_ssl_ver, wait_end
The function 'acl_fetch_nothing' was wrong and never used anywhere so it
was removed.
The "rdp_cookie" sample fetch used to have a mandatory argument while it
was optional in ACLs, which are supposed to iterate over RDP cookies. So
we're making it optional as a fetch too, and it will return the first one.
2013-01-07 20:59:07 +00:00
|
|
|
* Copyright (C) 2000-2013 Willy Tarreau - w@1wt.eu
|
2010-03-29 17:36:59 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation, version 2.1
|
|
|
|
* exclusively.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2007-10-29 00:09:36 +00:00
|
|
|
|
|
|
|
#ifndef _PROTO_PROTO_TCP_H
|
|
|
|
#define _PROTO_PROTO_TCP_H
|
|
|
|
|
|
|
|
#include <common/config.h>
|
2015-09-10 16:28:10 +00:00
|
|
|
#include <types/action.h>
|
2007-10-29 00:09:36 +00:00
|
|
|
#include <types/task.h>
|
2010-06-14 19:04:55 +00:00
|
|
|
#include <proto/stick_table.h>
|
2007-10-29 00:09:36 +00:00
|
|
|
|
2011-03-10 21:26:24 +00:00
|
|
|
int tcp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct sockaddr_storage *remote);
|
2014-07-07 18:22:12 +00:00
|
|
|
int tcp_pause_listener(struct listener *l);
|
2012-11-24 09:24:27 +00:00
|
|
|
int tcp_connect_server(struct connection *conn, int data, int delack);
|
2012-07-23 16:53:03 +00:00
|
|
|
int tcp_connect_probe(struct connection *conn);
|
2012-05-11 14:16:40 +00:00
|
|
|
int tcp_get_src(int fd, struct sockaddr *sa, socklen_t salen, int dir);
|
|
|
|
int tcp_get_dst(int fd, struct sockaddr *sa, socklen_t salen, int dir);
|
2014-12-12 18:41:33 +00:00
|
|
|
|
2015-07-24 07:12:15 +00:00
|
|
|
/* Export some samples. */
|
|
|
|
int smp_fetch_src(const struct arg *args, struct sample *smp, const char *kw, void *private);
|
|
|
|
|
2007-10-29 00:09:36 +00:00
|
|
|
#endif /* _PROTO_PROTO_TCP_H */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* c-indent-level: 8
|
|
|
|
* c-basic-offset: 8
|
|
|
|
* End:
|
|
|
|
*/
|