syslog-ng source
socket.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2002-2013 Balabit
3
*
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
*
18
* As an additional exemption you are allowed to compile & link against the
19
* OpenSSL libraries as published by the OpenSSL project. See the file
20
* COPYING for details.
21
*
22
*/
23
#ifndef COMPAT_SOCKET_H_INCLUDED
24
#define COMPAT_SOCKET_H_INCLUDED 1
25
26
#include "
compat/compat.h
"
27
28
#include <sys/types.h>
29
#include <sys/socket.h>
30
#include <arpa/inet.h>
31
#include <netdb.h>
32
#include <netinet/in.h>
33
34
#if ! SYSLOG_NG_HAVE_STRUCT_SOCKADDR_STORAGE
35
struct
sockaddr_storage
36
{
37
union
38
{
39
sa_family_t
ss_family
;
40
struct
sockaddr
__sa
;
41
struct
sockaddr_un
__sun
;
42
struct
sockaddr_in
__sin
;
43
#if SYSLOG_NG_ENABLE_IPV6
44
struct
sockaddr_in6 __sin6;
45
#endif
46
};
47
};
48
#endif
49
50
#if ! SYSLOG_NG_HAVE_INET_ATON
51
int
inet_aton
(
const
char
*cp,
struct
in_addr *dst);
52
#endif
53
54
#endif
compat.h
inet_aton
int inet_aton(const char *cp, struct in_addr *dst)
Definition:
inet_aton.c:27
sockaddr_storage
Definition:
socket.h:36
sockaddr_storage::ss_family
sa_family_t ss_family
Definition:
socket.h:39
sockaddr_storage::__sin
struct sockaddr_in __sin
Definition:
socket.h:42
sockaddr_storage::__sun
struct sockaddr_un __sun
Definition:
socket.h:41
sockaddr_storage::__sa
struct sockaddr __sa
Definition:
socket.h:40
lib
compat
socket.h
Generated by
1.9.1