mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-16 16:34:42 +00:00
REORG: include: move port_range.h to haproxy/port_range{,-t}.h
The port ranges didn't depend on anything. However they were missing some includes such as stdlib and api-t.h which were added.
This commit is contained in:
parent
334099c324
commit
fc8f6a8517
40
include/haproxy/port_range-t.h
Normal file
40
include/haproxy/port_range-t.h
Normal file
@ -0,0 +1,40 @@
|
||||
/*
|
||||
* include/haproxy/port_range-t.h
|
||||
* This file defines the prt_range type
|
||||
*
|
||||
* Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef _HAPROXY_PORT_RANGE_T_H
|
||||
#define _HAPROXY_PORT_RANGE_T_H
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <haproxy/api-t.h>
|
||||
|
||||
struct port_range {
|
||||
int size, get, put_h, put_t; /* range size, and get/put positions */
|
||||
uint16_t ports[0]; /* array of <size> ports, in host byte order */
|
||||
};
|
||||
|
||||
#endif /* _HAPROXY_PORT_RANGE_T_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-indent-level: 8
|
||||
* c-basic-offset: 8
|
||||
* End:
|
||||
*/
|
@ -1,28 +1,31 @@
|
||||
/*
|
||||
include/proto/port_range.h
|
||||
This file defines everything needed to manage port ranges
|
||||
* include/haproxy/port_range.h
|
||||
* This file defines everything needed to manage port ranges
|
||||
*
|
||||
* Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
|
||||
|
||||
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.
|
||||
#ifndef _HAPROXY_PORT_RANGE_H
|
||||
#define _HAPROXY_PORT_RANGE_H
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
#ifndef _PROTO_PORT_RANGE_H
|
||||
#define _PROTO_PORT_RANGE_H
|
||||
|
||||
#include <types/port_range.h>
|
||||
#include <stdlib.h>
|
||||
#include <haproxy/atomic.h>
|
||||
#include <haproxy/api.h>
|
||||
#include <haproxy/port_range-t.h>
|
||||
|
||||
#define GET_NEXT_OFF(range, off) ((off) == (range)->size - 1 ? 0 : (off) + 1)
|
||||
|
||||
@ -91,7 +94,7 @@ static inline struct port_range *port_range_alloc_range(int n)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* _PROTO_PORT_RANGE_H */
|
||||
#endif /* _HAPROXY_PORT_RANGE_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include <types/listener.h>
|
||||
#include <types/obj_type.h>
|
||||
#include <types/port_range.h>
|
||||
#include <haproxy/port_range-t.h>
|
||||
#include <haproxy/protocol-t.h>
|
||||
|
||||
#include <netinet/in_systm.h>
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include <haproxy/api-t.h>
|
||||
#include <import/ist.h>
|
||||
#include <types/port_range.h>
|
||||
#include <haproxy/port_range-t.h>
|
||||
|
||||
/* Direction for each FD event update */
|
||||
enum {
|
||||
|
@ -1,39 +0,0 @@
|
||||
/*
|
||||
include/types/port_range.h
|
||||
This file defines everything needed to manage port ranges
|
||||
|
||||
Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
|
||||
|
||||
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
|
||||
*/
|
||||
|
||||
#ifndef _TYPES_PORT_RANGE_H
|
||||
#define _TYPES_PORT_RANGE_H
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
struct port_range {
|
||||
int size, get, put_h, put_t; /* range size, and get/put positions */
|
||||
uint16_t ports[0]; /* array of <size> ports, in host byte order */
|
||||
};
|
||||
|
||||
#endif /* _TYPES_PORT_RANGE_H */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-indent-level: 8
|
||||
* c-basic-offset: 8
|
||||
* End:
|
||||
*/
|
@ -57,7 +57,7 @@
|
||||
#include <proto/log.h>
|
||||
#include <proto/mux_pt.h>
|
||||
#include <proto/queue.h>
|
||||
#include <proto/port_range.h>
|
||||
#include <haproxy/port_range.h>
|
||||
#include <proto/proto_tcp.h>
|
||||
#include <haproxy/protocol.h>
|
||||
#include <proto/proxy.h>
|
||||
|
2
src/fd.c
2
src/fd.c
@ -93,7 +93,7 @@
|
||||
|
||||
#include <proto/fd.h>
|
||||
#include <proto/log.h>
|
||||
#include <proto/port_range.h>
|
||||
#include <haproxy/port_range.h>
|
||||
|
||||
struct fdtab *fdtab = NULL; /* array of all the file descriptors */
|
||||
struct polled_mask *polled_mask = NULL; /* Array for the polled_mask of each fd */
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include <proto/http_rules.h>
|
||||
#include <proto/listener.h>
|
||||
#include <proto/log.h>
|
||||
#include <proto/port_range.h>
|
||||
#include <haproxy/port_range.h>
|
||||
#include <haproxy/protocol.h>
|
||||
#include <proto/http_ana.h>
|
||||
#include <proto/proto_tcp.h>
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <proto/cli.h>
|
||||
#include <proto/checks.h>
|
||||
#include <proto/connection.h>
|
||||
#include <proto/port_range.h>
|
||||
#include <haproxy/port_range.h>
|
||||
#include <haproxy/protocol.h>
|
||||
#include <proto/queue.h>
|
||||
#include <proto/sample.h>
|
||||
|
Loading…
Reference in New Issue
Block a user