tport 1.12.10
|
00001 /* 00002 * This file is part of the Sofia-SIP package 00003 * 00004 * Copyright (C) 2005 Nokia Corporation. 00005 * 00006 * Contact: Pekka Pessi <pekka.pessi@nokia-email.address.hidden> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00021 * 02110-1301 USA 00022 * 00023 */ 00024 00025 #ifndef TPORT_TAG_H 00026 00027 #define TPORT_TAG_H 00028 00037 #ifndef SU_TAG_H 00038 #include <sofia-sip/su_tag.h> 00039 #endif 00040 00041 SOFIA_BEGIN_DECLS 00042 00044 TPORT_DLL extern tagi_t tport_tag_list[]; 00045 00047 TPORT_DLL extern tagi_t tport_tags[]; 00048 00050 #define TPTAG_ANY() tptag_any, ((tag_value_t)0) 00051 TPORT_DLL extern tag_typedef_t tptag_any; 00052 00053 TPORT_DLL extern tag_typedef_t tptag_ident; 00054 #define TPTAG_IDENT(x) tptag_ident, tag_str_v((x)) 00055 00056 TPORT_DLL extern tag_typedef_t tptag_ident_ref; 00057 #define TPTAG_IDENT_REF(x) tptag_ident_ref, tag_str_vr(&(x)) 00058 00059 TPORT_DLL extern tag_typedef_t tptag_reuse; 00060 #define TPTAG_REUSE(x) tptag_reuse, tag_bool_v((x)) 00061 00062 TPORT_DLL extern tag_typedef_t tptag_reuse_ref; 00063 #define TPTAG_REUSE_REF(x) tptag_reuse_ref, tag_bool_vr(&(x)) 00064 00065 TPORT_DLL extern tag_typedef_t tptag_fresh; 00066 #define TPTAG_FRESH(x) tptag_fresh, tag_bool_v((x)) 00067 00068 TPORT_DLL extern tag_typedef_t tptag_fresh_ref; 00069 #define TPTAG_FRESH_REF(x) tptag_fresh_ref, tag_bool_vr(&(x)) 00070 00071 TPORT_DLL extern tag_typedef_t tptag_server; 00072 #define TPTAG_SERVER(x) tptag_server, tag_bool_v((x)) 00073 00074 TPORT_DLL extern tag_typedef_t tptag_server_ref; 00075 #define TPTAG_SERVER_REF(x) tptag_server_ref, tag_bool_vr(&(x)) 00076 00081 typedef enum tport_via { 00082 tport_type_local = 0, 00083 tport_type_server = 0, 00084 tport_type_client = 1, 00085 tport_type_stun = 2, 00086 tport_type_upnp = 3, 00087 tport_type_connect = 4, 00088 tport_type_socks = 5, 00089 } tport_pri_type_t; 00090 00091 TPORT_DLL extern tag_typedef_t tptag_public; 00092 #define TPTAG_PUBLIC(x) tptag_public, tag_int_v((x)) 00093 00094 TPORT_DLL extern tag_typedef_t tptag_public_ref; 00095 #define TPTAG_PUBLIC_REF(x) tptag_public_ref, tag_int_vr(&(x)) 00096 00097 TPORT_DLL extern tag_typedef_t tptag_mtu; 00098 #define TPTAG_MTU(x) tptag_mtu, tag_usize_v((x)) 00099 00100 TPORT_DLL extern tag_typedef_t tptag_mtu_ref; 00101 #define TPTAG_MTU_REF(x) tptag_mtu_ref, tag_usize_vr(&(x)) 00102 00103 TPORT_DLL extern tag_typedef_t tptag_connect; 00104 #define TPTAG_CONNECT(x) tptag_connect, tag_bool_v((x)) 00105 00106 TPORT_DLL extern tag_typedef_t tptag_connect_ref; 00107 #define TPTAG_CONNECT_REF(x) tptag_connect_ref, tag_bool_vr(&(x)) 00108 00109 TPORT_DLL extern tag_typedef_t tptag_queuesize; 00110 #define TPTAG_QUEUESIZE(x) tptag_queuesize, tag_uint_v((x)) 00111 00112 TPORT_DLL extern tag_typedef_t tptag_queuesize_ref; 00113 #define TPTAG_QUEUESIZE_REF(x) tptag_queuesize_ref, tag_uint_vr(&(x)) 00114 00115 TPORT_DLL extern tag_typedef_t tptag_sdwn_error; 00116 #define TPTAG_SDWN_ERROR(x) tptag_sdwn_error, tag_bool_v((x)) 00117 00118 TPORT_DLL extern tag_typedef_t tptag_sdwn_error_ref; 00119 #define TPTAG_SDWN_ERROR_REF(x) tptag_sdwn_error_ref, tag_bool_vr(&(x)) 00120 00121 TPORT_DLL extern tag_typedef_t tptag_sdwn_after; 00122 #define TPTAG_SDWN_AFTER(x) tptag_sdwn_after, tag_bool_v((x)) 00123 00124 TPORT_DLL extern tag_typedef_t tptag_sdwn_after_ref; 00125 #define TPTAG_SDWN_AFTER_REF(x) tptag_sdwn_after_ref, tag_bool_vr(&(x)) 00126 00127 TPORT_DLL extern tag_typedef_t tptag_close_after; 00128 #define TPTAG_CLOSE_AFTER(x) tptag_close_after, tag_bool_v((x)) 00129 00130 TPORT_DLL extern tag_typedef_t tptag_close_after_ref; 00131 #define TPTAG_CLOSE_AFTER_REF(x) tptag_close_after_ref, tag_bool_vr(&(x)) 00132 00133 TPORT_DLL extern tag_typedef_t tptag_idle; 00134 #define TPTAG_IDLE(x) tptag_idle, tag_uint_v((x)) 00135 00136 TPORT_DLL extern tag_typedef_t tptag_idle_ref; 00137 #define TPTAG_IDLE_REF(x) tptag_idle_ref, tag_uint_vr(&(x)) 00138 00139 TPORT_DLL extern tag_typedef_t tptag_timeout; 00140 #define TPTAG_TIMEOUT(x) tptag_timeout, tag_uint_v((x)) 00141 00142 TPORT_DLL extern tag_typedef_t tptag_timeout_ref; 00143 #define TPTAG_TIMEOUT_REF(x) tptag_timeout_ref, tag_uint_vr(&(x)) 00144 00145 TPORT_DLL extern tag_typedef_t tptag_keepalive; 00146 #define TPTAG_KEEPALIVE(x) tptag_keepalive, tag_uint_v((x)) 00147 00148 TPORT_DLL extern tag_typedef_t tptag_keepalive_ref; 00149 #define TPTAG_KEEPALIVE_REF(x) tptag_keepalive_ref, tag_uint_vr(&(x)) 00150 00151 TPORT_DLL extern tag_typedef_t tptag_pingpong; 00152 #define TPTAG_PINGPONG(x) tptag_pingpong, tag_uint_v((x)) 00153 00154 TPORT_DLL extern tag_typedef_t tptag_pingpong_ref; 00155 #define TPTAG_PINGPONG_REF(x) tptag_pingpong_ref, tag_uint_vr(&(x)) 00156 00157 TPORT_DLL extern tag_typedef_t tptag_pong2ping; 00158 #define TPTAG_PONG2PING(x) tptag_pong2ping, tag_bool_v((x)) 00159 00160 TPORT_DLL extern tag_typedef_t tptag_pong2ping_ref; 00161 #define TPTAG_PONG2PING_REF(x) tptag_pong2ping_ref, tag_bool_vr(&(x)) 00162 00163 TPORT_DLL extern tag_typedef_t tptag_sigcomp_lifetime; 00164 #define TPTAG_SIGCOMP_LIFETIME(x) tptag_sigcomp_lifetime, tag_uint_v((x)) 00165 00166 TPORT_DLL extern tag_typedef_t tptag_sigcomp_lifetime_ref; 00167 #define TPTAG_SIGCOMP_LIFETIME_REF(x) \ 00168 tptag_sigcomp_lifetime_ref, tag_uint_vr(&(x)) 00169 00170 TPORT_DLL extern tag_typedef_t tptag_compartment; 00171 #define TPTAG_COMPARTMENT(x) tptag_compartment, tag_ptr_v((x)) 00172 00173 TPORT_DLL extern tag_typedef_t tptag_compartment_ref; 00174 #define TPTAG_COMPARTMENT_REF(x) \ 00175 tptag_compartment_ref, tag_ptr_vr(&(x), x) 00176 00177 TPORT_DLL extern tag_typedef_t tptag_certificate; 00178 #define TPTAG_CERTIFICATE(x) tptag_certificate, tag_str_v((x)) 00179 00180 TPORT_DLL extern tag_typedef_t tptag_certificate_ref; 00181 #define TPTAG_CERTIFICATE_REF(x) tptag_certificate_ref, tag_str_vr(&(x)) 00182 00183 TPORT_DLL extern tag_typedef_t tptag_tls_version; 00184 #define TPTAG_TLS_VERSION(x) tptag_tls_version, tag_uint_v((x)) 00185 00186 TPORT_DLL extern tag_typedef_t tptag_tls_version_ref; 00187 #define TPTAG_TLS_VERSION_REF(x) tptag_tls_version_ref, tag_uint_vr(&(x)) 00188 00189 TPORT_DLL extern tag_typedef_t tptag_tls_verify_peer; 00190 #define TPTAG_TLS_VERIFY_PEER(x) tptag_tls_verify_peer, tag_uint_v((x)) 00191 00192 TPORT_DLL extern tag_typedef_t tptag_tls_verify_peer_ref; 00193 #define TPTAG_TLS_VERIFY_PEER_REF(x) tptag_tls_verify_peer_ref, tag_uint_vr(&(x)) 00194 00195 #if 0 00196 TPORT_DLL extern tag_typedef_t tptag_trusted; 00197 #define TPTAG_TRUSTED(x) tptag_trusted, tag_bool_v((x)) 00198 00199 TPORT_DLL extern tag_typedef_t tptag_trusted_ref; 00200 #define TPTAG_TRUSTED_REF(x) tptag_trusted_ref, tag_bool_vr(&(x)) 00201 #endif 00202 00203 TPORT_DLL extern tag_typedef_t tptag_debug_drop; 00204 #define TPTAG_DEBUG_DROP(x) tptag_debug_drop, tag_uint_v((x)) 00205 00206 TPORT_DLL extern tag_typedef_t tptag_debug_drop_ref; 00207 #define TPTAG_DEBUG_DROP_REF(x) tptag_debug_drop_ref, tag_uint_vr(&(x)) 00208 00209 TPORT_DLL extern tag_typedef_t tptag_udp_rmem; 00210 #define TPTAG_UDP_RMEM(x) tptag_udp_rmem, tag_uint_v((x)) 00211 00212 TPORT_DLL extern tag_typedef_t tptag_udp_rmem_ref; 00213 #define TPTAG_UDP_RMEM_REF(x) tptag_udp_rmem_ref, tag_uint_vr(&(x)) 00214 00215 TPORT_DLL extern tag_typedef_t tptag_udp_wmem; 00216 #define TPTAG_UDP_WMEM(x) tptag_udp_wmem, tag_uint_v((x)) 00217 00218 TPORT_DLL extern tag_typedef_t tptag_udp_wmem_ref; 00219 #define TPTAG_UDP_WMEM_REF(x) tptag_udp_wmem_ref, tag_uint_vr(&(x)) 00220 00221 TPORT_DLL extern tag_typedef_t tptag_thrpsize; 00222 #define TPTAG_THRPSIZE(x) tptag_thrpsize, tag_uint_v((x)) 00223 00224 TPORT_DLL extern tag_typedef_t tptag_thrpsize_ref; 00225 #define TPTAG_THRPSIZE_REF(x) tptag_thrpsize_ref, tag_uint_vr(&(x)) 00226 00227 TPORT_DLL extern tag_typedef_t tptag_thrprqsize; 00228 #define TPTAG_THRPRQSIZE(x) tptag_thrprqsize, tag_uint_v((x)) 00229 00230 TPORT_DLL extern tag_typedef_t tptag_thrprqsize_ref; 00231 #define TPTAG_THRPRQSIZE_REF(x) tptag_thrprqsize_ref, tag_uint_vr(&(x)) 00232 00233 TPORT_DLL extern tag_typedef_t tptag_http_connect; 00234 #define TPTAG_HTTP_CONNECT(x) tptag_http_connect, tag_str_v((x)) 00235 00236 TPORT_DLL extern tag_typedef_t tptag_http_connect_ref; 00237 #define TPTAG_HTTP_CONNECT_REF(x) tptag_http_connect_ref, tag_str_vr(&(x)) 00238 00239 TPORT_DLL extern tag_typedef_t tptag_stun_server; 00240 #define TPTAG_STUN_SERVER(x) tptag_stun_server, tag_bool_v((x)) 00241 00242 TPORT_DLL extern tag_typedef_t tptag_stun_server_ref; 00243 #define TPTAG_STUN_SERVER_REF(x) tptag_stun_server_ref, tag_bool_vr(&(x)) 00244 00245 TPORT_DLL extern tag_typedef_t tptag_tos; 00246 #define TPTAG_TOS(x) tptag_tos, tag_int_v((x)) 00247 00248 TPORT_DLL extern tag_typedef_t tptag_tos_ref; 00249 #define TPTAG_TOS_REF(x) tptag_tos_ref, tag_int_vr(&(x)) 00250 00251 TPORT_DLL extern tag_typedef_t tptag_log; 00252 #define TPTAG_LOG(x) tptag_log, tag_bool_v((x)) 00253 00254 TPORT_DLL extern tag_typedef_t tptag_log_ref; 00255 #define TPTAG_LOG_REF(x) tptag_log_ref, tag_bool_vr(&(x)) 00256 00257 TPORT_DLL extern tag_typedef_t tptag_dump; 00258 #define TPTAG_DUMP(x) tptag_dump, tag_str_v((x)) 00259 00260 TPORT_DLL extern tag_typedef_t tptag_dump_ref; 00261 #define TPTAG_DUMP_REF(x) tptag_dump_ref, tag_str_vr(&(x)) 00262 00263 SOFIA_END_DECLS 00264 00265 #endif /* !defined TPORT_TAG_H */