setup-os400.h
Go to the documentation of this file.
00001 #ifndef HEADER_CURL_SETUP_OS400_H
00002 #define HEADER_CURL_SETUP_OS400_H
00003 /***************************************************************************
00004  *                                  _   _ ____  _
00005  *  Project                     ___| | | |  _ \| |
00006  *                             / __| | | | |_) | |
00007  *                            | (__| |_| |  _ <| |___
00008  *                             \___|\___/|_| \_\_____|
00009  *
00010  * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
00011  *
00012  * This software is licensed as described in the file COPYING, which
00013  * you should have received as part of this distribution. The terms
00014  * are also available at https://curl.haxx.se/docs/copyright.html.
00015  *
00016  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
00017  * copies of the Software, and permit persons to whom the Software is
00018  * furnished to do so, under the terms of the COPYING file.
00019  *
00020  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
00021  * KIND, either express or implied.
00022  *
00023  ***************************************************************************/
00024 
00025 
00026 /* OS/400 netdb.h does not define NI_MAXHOST. */
00027 #define NI_MAXHOST      1025
00028 
00029 /* OS/400 netdb.h does not define NI_MAXSERV. */
00030 #define NI_MAXSERV      32
00031 
00032 /* No OS/400 header file defines u_int32_t. */
00033 typedef unsigned long   u_int32_t;
00034 
00035 
00036 /* System API wrapper prototypes & definitions to support ASCII parameters. */
00037 
00038 #include <sys/socket.h>
00039 #include <netdb.h>
00040 #include <gskssl.h>
00041 #include <qsoasync.h>
00042 #include <gssapi.h>
00043 
00044 extern int Curl_getaddrinfo_a(const char *nodename,
00045                               const char *servname,
00046                               const struct addrinfo *hints,
00047                               struct addrinfo **res);
00048 #define getaddrinfo             Curl_getaddrinfo_a
00049 
00050 
00051 extern int Curl_getnameinfo_a(const struct sockaddr *sa,
00052                               curl_socklen_t salen,
00053                               char *nodename, curl_socklen_t nodenamelen,
00054                               char *servname, curl_socklen_t servnamelen,
00055                               int flags);
00056 #define getnameinfo             Curl_getnameinfo_a
00057 
00058 
00059 /* GSKit wrappers. */
00060 
00061 extern int      Curl_gsk_environment_open(gsk_handle * my_env_handle);
00062 #define gsk_environment_open    Curl_gsk_environment_open
00063 
00064 extern int      Curl_gsk_secure_soc_open(gsk_handle my_env_handle,
00065                                          gsk_handle * my_session_handle);
00066 #define gsk_secure_soc_open     Curl_gsk_secure_soc_open
00067 
00068 extern int      Curl_gsk_environment_close(gsk_handle * my_env_handle);
00069 #define gsk_environment_close   Curl_gsk_environment_close
00070 
00071 extern int      Curl_gsk_secure_soc_close(gsk_handle * my_session_handle);
00072 #define gsk_secure_soc_close    Curl_gsk_secure_soc_close
00073 
00074 extern int      Curl_gsk_environment_init(gsk_handle my_env_handle);
00075 #define gsk_environment_init    Curl_gsk_environment_init
00076 
00077 extern int      Curl_gsk_secure_soc_init(gsk_handle my_session_handle);
00078 #define gsk_secure_soc_init     Curl_gsk_secure_soc_init
00079 
00080 extern int      Curl_gsk_attribute_set_buffer_a(gsk_handle my_gsk_handle,
00081                                                 GSK_BUF_ID bufID,
00082                                                 const char *buffer,
00083                                                 int bufSize);
00084 #define gsk_attribute_set_buffer        Curl_gsk_attribute_set_buffer_a
00085 
00086 extern int      Curl_gsk_attribute_set_enum(gsk_handle my_gsk_handle,
00087                                             GSK_ENUM_ID enumID,
00088                                             GSK_ENUM_VALUE enumValue);
00089 #define gsk_attribute_set_enum  Curl_gsk_attribute_set_enum
00090 
00091 extern int      Curl_gsk_attribute_set_numeric_value(gsk_handle my_gsk_handle,
00092                                                      GSK_NUM_ID numID,
00093                                                      int numValue);
00094 #define gsk_attribute_set_numeric_value Curl_gsk_attribute_set_numeric_value
00095 
00096 extern int      Curl_gsk_attribute_set_callback(gsk_handle my_gsk_handle,
00097                                                 GSK_CALLBACK_ID callBackID,
00098                                                 void *callBackAreaPtr);
00099 #define gsk_attribute_set_callback      Curl_gsk_attribute_set_callback
00100 
00101 extern int      Curl_gsk_attribute_get_buffer_a(gsk_handle my_gsk_handle,
00102                                                 GSK_BUF_ID bufID,
00103                                                 const char **buffer,
00104                                                 int *bufSize);
00105 #define gsk_attribute_get_buffer        Curl_gsk_attribute_get_buffer_a
00106 
00107 extern int      Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle,
00108                                             GSK_ENUM_ID enumID,
00109                                             GSK_ENUM_VALUE *enumValue);
00110 #define gsk_attribute_get_enum  Curl_gsk_attribute_get_enum
00111 
00112 extern int      Curl_gsk_attribute_get_numeric_value(gsk_handle my_gsk_handle,
00113                                                      GSK_NUM_ID numID,
00114                                                      int *numValue);
00115 #define gsk_attribute_get_numeric_value Curl_gsk_attribute_get_numeric_value
00116 
00117 extern int      Curl_gsk_attribute_get_cert_info(gsk_handle my_gsk_handle,
00118                                  GSK_CERT_ID certID,
00119                                  const gsk_cert_data_elem **certDataElem,
00120                                  int *certDataElementCount);
00121 #define gsk_attribute_get_cert_info     Curl_gsk_attribute_get_cert_info
00122 
00123 extern int      Curl_gsk_secure_soc_misc(gsk_handle my_session_handle,
00124                                          GSK_MISC_ID miscID);
00125 #define gsk_secure_soc_misc     Curl_gsk_secure_soc_misc
00126 
00127 extern int      Curl_gsk_secure_soc_read(gsk_handle my_session_handle,
00128                                          char *readBuffer,
00129                                          int readBufSize, int *amtRead);
00130 #define gsk_secure_soc_read     Curl_gsk_secure_soc_read
00131 
00132 extern int      Curl_gsk_secure_soc_write(gsk_handle my_session_handle,
00133                                           char *writeBuffer,
00134                                           int writeBufSize, int *amtWritten);
00135 #define gsk_secure_soc_write    Curl_gsk_secure_soc_write
00136 
00137 extern const char *     Curl_gsk_strerror_a(int gsk_return_value);
00138 #define gsk_strerror    Curl_gsk_strerror_a
00139 
00140 extern int      Curl_gsk_secure_soc_startInit(gsk_handle my_session_handle,
00141                                       int IOCompletionPort,
00142                                       Qso_OverlappedIO_t * communicationsArea);
00143 #define gsk_secure_soc_startInit        Curl_gsk_secure_soc_startInit
00144 
00145 
00146 /* GSSAPI wrappers. */
00147 
00148 extern OM_uint32 Curl_gss_import_name_a(OM_uint32 * minor_status,
00149                                         gss_buffer_t in_name,
00150                                         gss_OID in_name_type,
00151                                         gss_name_t * out_name);
00152 #define gss_import_name         Curl_gss_import_name_a
00153 
00154 
00155 extern OM_uint32 Curl_gss_display_status_a(OM_uint32 * minor_status,
00156                                            OM_uint32 status_value,
00157                                            int status_type, gss_OID mech_type,
00158                                            gss_msg_ctx_t * message_context,
00159                                            gss_buffer_t status_string);
00160 #define gss_display_status      Curl_gss_display_status_a
00161 
00162 
00163 extern OM_uint32 Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
00164                                              gss_cred_id_t cred_handle,
00165                                              gss_ctx_id_t * context_handle,
00166                                              gss_name_t target_name,
00167                                              gss_OID mech_type,
00168                                              gss_flags_t req_flags,
00169                                              OM_uint32 time_req,
00170                                              gss_channel_bindings_t
00171                                              input_chan_bindings,
00172                                              gss_buffer_t input_token,
00173                                              gss_OID * actual_mech_type,
00174                                              gss_buffer_t output_token,
00175                                              gss_flags_t * ret_flags,
00176                                              OM_uint32 * time_rec);
00177 #define gss_init_sec_context    Curl_gss_init_sec_context_a
00178 
00179 
00180 extern OM_uint32 Curl_gss_delete_sec_context_a(OM_uint32 * minor_status,
00181                                                gss_ctx_id_t * context_handle,
00182                                                gss_buffer_t output_token);
00183 #define gss_delete_sec_context  Curl_gss_delete_sec_context_a
00184 
00185 
00186 /* LDAP wrappers. */
00187 
00188 #define BerValue                struct berval
00189 
00190 #define ldap_url_parse          ldap_url_parse_utf8
00191 #define ldap_init               Curl_ldap_init_a
00192 #define ldap_simple_bind_s      Curl_ldap_simple_bind_s_a
00193 #define ldap_search_s           Curl_ldap_search_s_a
00194 #define ldap_get_values_len     Curl_ldap_get_values_len_a
00195 #define ldap_err2string         Curl_ldap_err2string_a
00196 #define ldap_get_dn             Curl_ldap_get_dn_a
00197 #define ldap_first_attribute    Curl_ldap_first_attribute_a
00198 #define ldap_next_attribute     Curl_ldap_next_attribute_a
00199 
00200 /* Some socket functions must be wrapped to process textual addresses
00201    like AF_UNIX. */
00202 
00203 extern int Curl_os400_connect(int sd, struct sockaddr * destaddr, int addrlen);
00204 extern int Curl_os400_bind(int sd, struct sockaddr * localaddr, int addrlen);
00205 extern int Curl_os400_sendto(int sd, char *buffer, int buflen, int flags,
00206                              struct sockaddr * dstaddr, int addrlen);
00207 extern int Curl_os400_recvfrom(int sd, char *buffer, int buflen, int flags,
00208                                struct sockaddr *fromaddr, int *addrlen);
00209 
00210 #define connect                 Curl_os400_connect
00211 #define bind                    Curl_os400_bind
00212 #define sendto                  Curl_os400_sendto
00213 #define recvfrom                Curl_os400_recvfrom
00214 
00215 #ifdef HAVE_LIBZ
00216 #define zlibVersion             Curl_os400_zlibVersion
00217 #define inflateInit_            Curl_os400_inflateInit_
00218 #define inflateInit2_           Curl_os400_inflateInit2_
00219 #define inflate                 Curl_os400_inflate
00220 #define inflateEnd              Curl_os400_inflateEnd
00221 #endif
00222 
00223 #endif /* HEADER_CURL_SETUP_OS400_H */


rc_visard_driver
Author(s): Heiko Hirschmueller , Christian Emmerich , Felix Ruess
autogenerated on Thu Jun 6 2019 20:43:06