Mercurial > dropbear
comparison fake-rfc2553.h @ 589:9fd27bc37807
- Update fake-rfc2553.{c,h} from OpenSSH 5.5p1
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 21 Jul 2010 13:53:23 +0000 |
parents | 86725004a0ea |
children | deed0571cacc |
comparison
equal
deleted
inserted
replaced
587:1151059c5eff | 589:9fd27bc37807 |
---|---|
1 /* Taken from OpenSSH 3.8.1p1 */ | 1 /* Taken for Dropbear from OpenSSH 5.5p1 */ |
2 | 2 |
3 /* $.Id: fake-rfc2553.h,v 1.9 2004/03/10 10:06:33 dtucker Exp $ */ | 3 /* $Id: fake-rfc2553.h,v 1.16 2008/07/14 11:37:37 djm Exp $ */ |
4 | 4 |
5 /* | 5 /* |
6 * Copyright (C) 2000-2003 Damien Miller. All rights reserved. | 6 * Copyright (C) 2000-2003 Damien Miller. All rights reserved. |
7 * Copyright (C) 1999 WIDE Project. All rights reserved. | 7 * Copyright (C) 1999 WIDE Project. All rights reserved. |
8 * | 8 * |
41 | 41 |
42 #ifndef _FAKE_RFC2553_H | 42 #ifndef _FAKE_RFC2553_H |
43 #define _FAKE_RFC2553_H | 43 #define _FAKE_RFC2553_H |
44 | 44 |
45 #include "includes.h" | 45 #include "includes.h" |
46 #include <sys/types.h> | |
47 #if defined(HAVE_NETDB_H) | |
48 # include <netdb.h> | |
49 #endif | |
46 | 50 |
47 /* | 51 /* |
48 * First, socket and INET6 related definitions | 52 * First, socket and INET6 related definitions |
49 */ | 53 */ |
50 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE | 54 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE |
73 struct sockaddr_in6 { | 77 struct sockaddr_in6 { |
74 unsigned short sin6_family; | 78 unsigned short sin6_family; |
75 u_int16_t sin6_port; | 79 u_int16_t sin6_port; |
76 u_int32_t sin6_flowinfo; | 80 u_int32_t sin6_flowinfo; |
77 struct in6_addr sin6_addr; | 81 struct in6_addr sin6_addr; |
82 u_int32_t sin6_scope_id; | |
78 }; | 83 }; |
79 #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */ | 84 #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */ |
80 | 85 |
81 #ifndef AF_INET6 | 86 #ifndef AF_INET6 |
82 /* Define it to something that should never appear */ | 87 /* Define it to something that should never appear */ |
113 #ifndef NI_MAXHOST | 118 #ifndef NI_MAXHOST |
114 # define NI_MAXHOST 1025 | 119 # define NI_MAXHOST 1025 |
115 #endif /* !NI_MAXHOST */ | 120 #endif /* !NI_MAXHOST */ |
116 | 121 |
117 #ifndef EAI_NODATA | 122 #ifndef EAI_NODATA |
118 # define EAI_NODATA 1 | 123 # define EAI_NODATA (INT_MAX - 1) |
119 # define EAI_MEMORY 2 | 124 #endif |
120 # define EAI_NONAME 3 | 125 #ifndef EAI_MEMORY |
126 # define EAI_MEMORY (INT_MAX - 2) | |
127 #endif | |
128 #ifndef EAI_NONAME | |
129 # define EAI_NONAME (INT_MAX - 3) | |
130 #endif | |
131 #ifndef EAI_SYSTEM | |
132 # define EAI_SYSTEM (INT_MAX - 4) | |
133 #endif | |
134 #ifndef EAI_FAMILY | |
135 # define EAI_FAMILY (INT_MAX - 5) | |
121 #endif | 136 #endif |
122 | 137 |
123 #ifndef HAVE_STRUCT_ADDRINFO | 138 #ifndef HAVE_STRUCT_ADDRINFO |
124 struct addrinfo { | 139 struct addrinfo { |
125 int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ | 140 int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ |
141 int getaddrinfo(const char *, const char *, | 156 int getaddrinfo(const char *, const char *, |
142 const struct addrinfo *, struct addrinfo **); | 157 const struct addrinfo *, struct addrinfo **); |
143 #endif /* !HAVE_GETADDRINFO */ | 158 #endif /* !HAVE_GETADDRINFO */ |
144 | 159 |
145 #if !defined(HAVE_GAI_STRERROR) && !defined(HAVE_CONST_GAI_STRERROR_PROTO) | 160 #if !defined(HAVE_GAI_STRERROR) && !defined(HAVE_CONST_GAI_STRERROR_PROTO) |
146 #define gai_strerror(a) (ssh_gai_strerror(a)) | 161 #define gai_strerror(a) (_ssh_compat_gai_strerror(a)) |
147 char *gai_strerror(int); | 162 char *gai_strerror(int); |
148 #endif /* !HAVE_GAI_STRERROR */ | 163 #endif /* !HAVE_GAI_STRERROR */ |
149 | 164 |
150 #ifndef HAVE_FREEADDRINFO | 165 #ifndef HAVE_FREEADDRINFO |
151 #define freeaddrinfo(a) (ssh_freeaddrinfo(a)) | 166 #define freeaddrinfo(a) (ssh_freeaddrinfo(a)) |