summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-06-05 09:56:35 +1000
committerDamien Miller <djm@mindrot.org>2003-06-05 09:56:35 +1000
commitceb3136f5f121e0d6d3a78dcc52c6bf186a7f872 (patch)
tree45a47b0110f7064ff27d554e6b417820bc879b84 /openbsd-compat
parent5fe46a45c834bf2e336d979e2ae755b94e01d707 (diff)
KNF
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/fake-socket.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/openbsd-compat/fake-socket.h b/openbsd-compat/fake-socket.h
index f364797fa..1e0d245e0 100644
--- a/openbsd-compat/fake-socket.h
+++ b/openbsd-compat/fake-socket.h
@@ -1,4 +1,4 @@
1/* $Id: fake-socket.h,v 1.3 2002/04/12 03:35:40 tim Exp $ */ 1/* $Id: fake-socket.h,v 1.4 2003/06/04 23:56:35 djm Exp $ */
2 2
3#ifndef _FAKE_SOCKET_H 3#ifndef _FAKE_SOCKET_H
4#define _FAKE_SOCKET_H 4#define _FAKE_SOCKET_H
@@ -7,11 +7,12 @@
7#include "sys/types.h" 7#include "sys/types.h"
8 8
9#ifndef HAVE_STRUCT_SOCKADDR_STORAGE 9#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
10
10# define _SS_MAXSIZE 128 /* Implementation specific max size */ 11# define _SS_MAXSIZE 128 /* Implementation specific max size */
11# define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr)) 12# define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
12 13
13struct sockaddr_storage { 14struct sockaddr_storage {
14 struct sockaddr ss_sa; 15 struct sockaddr ss_sa;
15 char __ss_pad2[_SS_PADSIZE]; 16 char __ss_pad2[_SS_PADSIZE];
16}; 17};
17# define ss_family ss_sa.sa_family 18# define ss_family ss_sa.sa_family
@@ -19,22 +20,22 @@ struct sockaddr_storage {
19 20
20#ifndef IN6_IS_ADDR_LOOPBACK 21#ifndef IN6_IS_ADDR_LOOPBACK
21# define IN6_IS_ADDR_LOOPBACK(a) \ 22# define IN6_IS_ADDR_LOOPBACK(a) \
22 (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \ 23 (((u_int32_t *)(a))[0] == 0 && ((u_int32_t *)(a))[1] == 0 && \
23 ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1)) 24 ((u_int32_t *)(a))[2] == 0 && ((u_int32_t *)(a))[3] == htonl(1))
24#endif /* !IN6_IS_ADDR_LOOPBACK */ 25#endif /* !IN6_IS_ADDR_LOOPBACK */
25 26
26#ifndef HAVE_STRUCT_IN6_ADDR 27#ifndef HAVE_STRUCT_IN6_ADDR
27struct in6_addr { 28struct in6_addr {
28 u_int8_t s6_addr[16]; 29 u_int8_t s6_addr[16];
29}; 30};
30#endif /* !HAVE_STRUCT_IN6_ADDR */ 31#endif /* !HAVE_STRUCT_IN6_ADDR */
31 32
32#ifndef HAVE_STRUCT_SOCKADDR_IN6 33#ifndef HAVE_STRUCT_SOCKADDR_IN6
33struct sockaddr_in6 { 34struct sockaddr_in6 {
34 unsigned short sin6_family; 35 unsigned short sin6_family;
35 u_int16_t sin6_port; 36 u_int16_t sin6_port;
36 u_int32_t sin6_flowinfo; 37 u_int32_t sin6_flowinfo;
37 struct in6_addr sin6_addr; 38 struct in6_addr sin6_addr;
38}; 39};
39#endif /* !HAVE_STRUCT_SOCKADDR_IN6 */ 40#endif /* !HAVE_STRUCT_SOCKADDR_IN6 */
40 41