mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
Some include files, mostly types definitions, are missing a few includes to define the types they're using, causing include ordering dependencies between files, which are most often not seen due to the alphabetical order of includes. Let's just fix them. These were spotted by building pre-compiled headers for all these files to .h.gch.
56 lines
1.9 KiB
C
56 lines
1.9 KiB
C
/*
|
|
* include/haproxy/dgram-t.h
|
|
* This file provides structures and types for datagram processing
|
|
*
|
|
* Copyright (C) 2014 Baptiste Assmann <bedis9@gmail.com>
|
|
*
|
|
* 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_HAPROXY_DGRAM_T_H
|
|
#define _HAPROXY_HAPROXY_DGRAM_T_H
|
|
|
|
#include <haproxy/api-t.h>
|
|
#include <haproxy/thread-t.h>
|
|
#include <arpa/inet.h>
|
|
|
|
/*
|
|
* datagram related structure
|
|
*/
|
|
struct dgram_conn {
|
|
__decl_thread(HA_SPINLOCK_T lock);
|
|
const struct dgram_data_cb *data; /* data layer callbacks. Must be set before */
|
|
void *owner; /* pointer to upper layer's entity */
|
|
union { /* definitions which depend on connection type */
|
|
struct { /*** information used by socket-based dgram ***/
|
|
int fd; /* file descriptor */
|
|
} sock;
|
|
} t;
|
|
struct {
|
|
struct sockaddr_storage from; /* client address, or address to spoof when connecting to the server */
|
|
struct sockaddr_storage to; /* address reached by the client, or address to connect to */
|
|
} addr; /* addresses of the remote side, client for producer and server for consumer */
|
|
};
|
|
|
|
/*
|
|
* datagram callback structure
|
|
*/
|
|
struct dgram_data_cb {
|
|
void (*recv)(struct dgram_conn *dgram); /* recv callback */
|
|
void (*send)(struct dgram_conn *dgram); /* send callback */
|
|
};
|
|
|
|
#endif /* _HAPROXY_HAPROXY_DGRAM_T_H */
|