~ubuntu-branches/ubuntu/gutsy/gnutls13/gutsy-proposed

« back to all changes in this revision

Viewing changes to gl/getaddrinfo.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2006-11-11 10:35:29 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061111103529-0apz2q4w35cgjynh
Tags: 1.4.4-3
Pulled /patches/18_negotiate_cypher.diff from 1.4.5:
When a GnuTLS server receive a SSLv2 Client Hello for an unknown TLS
version, try to negotiate the highest version support by the GnuTLS
server, instead of the lowest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
 
49
49
/* Possible values for `ai_flags' field in `addrinfo' structure.  */
50
50
# ifndef AI_PASSIVE
51
 
#  define AI_PASSIVE    0x0001  /* Socket address is intended for `bind'.  */
52
 
#  define AI_CANONNAME  0x0002  /* Request for canonical name.  */
 
51
#  define AI_PASSIVE     0x0001 /* Socket address is intended for `bind'.  */
 
52
# endif
 
53
# ifndef AI_CANONNAME
 
54
#  define AI_CANONNAME   0x0002 /* Request for canonical name.  */
 
55
# endif
 
56
# ifndef AI_NUMERICHOST
53
57
#  define AI_NUMERICHOST 0x0004 /* Don't use name resolution.  */
54
 
#  define AI_V4MAPPED   0x0008  /* IPv4 mapped addresses are acceptable.  */
55
 
#  define AI_ALL        0x0010  /* Return IPv4 mapped and IPv6 addresses.  */
56
 
#  define AI_ADDRCONFIG 0x0020  /* Use configuration of this host to choose
 
58
# endif
 
59
# ifndef AI_V4MAPPED
 
60
#  define AI_V4MAPPED    0x0008 /* IPv4 mapped addresses are acceptable.  */
 
61
# endif
 
62
# ifndef AI_ALL
 
63
#  define AI_ALL         0x0010 /* Return IPv4 mapped and IPv6 addresses.  */
 
64
# endif
 
65
# ifndef AI_ADDRCONFIG
 
66
#  define AI_ADDRCONFIG  0x0020 /* Use configuration of this host to choose
57
67
                                   returned address type..  */
 
68
#endif
 
69
#ifndef AI_NUMERICSERV
 
70
#  define AI_NUMERICSERV 0x0400 /* Don't use name resolution.  */
58
71
# endif
59
72
 
60
73
/* Error values for `getaddrinfo' function.  */
68
81
#  define EAI_SOCKTYPE    -7    /* `ai_socktype' not supported.  */
69
82
#  define EAI_SERVICE     -8    /* SERVICE not supported for `ai_socktype'.  */
70
83
#  define EAI_MEMORY      -10   /* Memory allocation failure.  */
 
84
#endif
 
85
#ifndef EAI_OVERFLOW
 
86
/* Not defined on mingw32. */
71
87
#  define EAI_OVERFLOW    -12   /* Argument buffer overflow.  */
72
88
#endif
73
89
# ifndef EAI_ADDRFAMILY
74
 
/* Not defined on mingw32.  XXX May be incorrect? Perhaps it is never
75
 
   returned? */
 
90
/* Not defined on mingw32. */
76
91
#  define EAI_ADDRFAMILY  -9    /* Address family for NAME not supported.  */
77
92
# endif
78
93
# ifndef EAI_SYSTEM
79
 
/* Not defined on mingw32.  XXX May be incorrect? Perhaps it is never
80
 
   returned? */
 
94
/* Not defined on mingw32. */
81
95
#  define EAI_SYSTEM      -11   /* System error returned in `errno'.  */
82
96
# endif
83
97
 
117
131
extern const char *gai_strerror (int ecode);
118
132
# endif
119
133
 
 
134
# if !HAVE_DECL_GETNAMEINFO
 
135
/* Convert socket address to printable node and service names.
 
136
   For more details, see the POSIX:2001 specification
 
137
   <http://www.opengroup.org/susv3xsh/getnameinfo.html>.  */
 
138
extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
 
139
                       char *restrict node, socklen_t nodelen,
 
140
                       char *restrict service, socklen_t servicelen,
 
141
                       int flags);
 
142
 
 
143
# endif
 
144
 
 
145
/* Possible flags for getnameinfo.  */
 
146
# ifndef NI_NUMERICHOST
 
147
#  define NI_NUMERICHOST 1
 
148
# endif
 
149
# ifndef NI_NUMERICSERV
 
150
#  define NI_NUMERICSERV 2
 
151
# endif
 
152
 
120
153
#endif /* GETADDRINFO_H */