Changeset 1585 for pjproject/trunk
- Timestamp:
- Nov 18, 2007 2:53:47 PM (17 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/aconfigure
r1584 r1585 8495 8495 8496 8496 8497 echo "$as_me:$LINENO: checking if inet_aton is available" >&58498 echo $ECHO_N "checking if inet_aton is available... $ECHO_C" >&68497 echo "$as_me:$LINENO: checking if inet_aton() is available" >&5 8498 echo $ECHO_N "checking if inet_aton() is available... $ECHO_C" >&6 8499 8499 cat >conftest.$ac_ext <<_ACEOF 8500 8500 /* confdefs.h. */ … … 8503 8503 cat >>conftest.$ac_ext <<_ACEOF 8504 8504 /* end confdefs.h. */ 8505 #include <arpa/inet.h> 8505 #include <sys/types.h> 8506 #include <sys/socket.h> 8507 #include <arpa/inet.h> 8506 8508 int 8507 8509 main () … … 8536 8538 cat >>confdefs.h <<\_ACEOF 8537 8539 #define PJ_SOCK_HAS_INET_ATON 1 8540 _ACEOF 8541 8542 echo "$as_me:$LINENO: result: yes" >&5 8543 echo "${ECHO_T}yes" >&6 8544 else 8545 echo "$as_me: failed program was:" >&5 8546 sed 's/^/| /' conftest.$ac_ext >&5 8547 8548 echo "$as_me:$LINENO: result: no" >&5 8549 echo "${ECHO_T}no" >&6 8550 fi 8551 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 8552 8553 echo "$as_me:$LINENO: checking if inet_pton() is available" >&5 8554 echo $ECHO_N "checking if inet_pton() is available... $ECHO_C" >&6 8555 cat >conftest.$ac_ext <<_ACEOF 8556 /* confdefs.h. */ 8557 _ACEOF 8558 cat confdefs.h >>conftest.$ac_ext 8559 cat >>conftest.$ac_ext <<_ACEOF 8560 /* end confdefs.h. */ 8561 #include <sys/types.h> 8562 #include <sys/socket.h> 8563 #include <arpa/inet.h> 8564 int 8565 main () 8566 { 8567 inet_pton(0, 0, 0); 8568 ; 8569 return 0; 8570 } 8571 _ACEOF 8572 rm -f conftest.$ac_objext 8573 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 8574 (eval $ac_compile) 2>conftest.er1 8575 ac_status=$? 8576 grep -v '^ *+' conftest.er1 >conftest.err 8577 rm -f conftest.er1 8578 cat conftest.err >&5 8579 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8580 (exit $ac_status); } && 8581 { ac_try='test -z "$ac_c_werror_flag" 8582 || test ! -s conftest.err' 8583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8584 (eval $ac_try) 2>&5 8585 ac_status=$? 8586 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8587 (exit $ac_status); }; } && 8588 { ac_try='test -s conftest.$ac_objext' 8589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8590 (eval $ac_try) 2>&5 8591 ac_status=$? 8592 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8593 (exit $ac_status); }; }; then 8594 cat >>confdefs.h <<\_ACEOF 8595 #define PJ_SOCK_HAS_INET_PTON 1 8596 _ACEOF 8597 8598 echo "$as_me:$LINENO: result: yes" >&5 8599 echo "${ECHO_T}yes" >&6 8600 else 8601 echo "$as_me: failed program was:" >&5 8602 sed 's/^/| /' conftest.$ac_ext >&5 8603 8604 echo "$as_me:$LINENO: result: no" >&5 8605 echo "${ECHO_T}no" >&6 8606 fi 8607 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 8608 8609 echo "$as_me:$LINENO: checking if inet_ntop() is available" >&5 8610 echo $ECHO_N "checking if inet_ntop() is available... $ECHO_C" >&6 8611 cat >conftest.$ac_ext <<_ACEOF 8612 /* confdefs.h. */ 8613 _ACEOF 8614 cat confdefs.h >>conftest.$ac_ext 8615 cat >>conftest.$ac_ext <<_ACEOF 8616 /* end confdefs.h. */ 8617 #include <sys/types.h> 8618 #include <sys/socket.h> 8619 #include <arpa/inet.h> 8620 int 8621 main () 8622 { 8623 inet_ntop(0, 0, 0, 0); 8624 ; 8625 return 0; 8626 } 8627 _ACEOF 8628 rm -f conftest.$ac_objext 8629 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 8630 (eval $ac_compile) 2>conftest.er1 8631 ac_status=$? 8632 grep -v '^ *+' conftest.er1 >conftest.err 8633 rm -f conftest.er1 8634 cat conftest.err >&5 8635 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8636 (exit $ac_status); } && 8637 { ac_try='test -z "$ac_c_werror_flag" 8638 || test ! -s conftest.err' 8639 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8640 (eval $ac_try) 2>&5 8641 ac_status=$? 8642 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8643 (exit $ac_status); }; } && 8644 { ac_try='test -s conftest.$ac_objext' 8645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8646 (eval $ac_try) 2>&5 8647 ac_status=$? 8648 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8649 (exit $ac_status); }; }; then 8650 cat >>confdefs.h <<\_ACEOF 8651 #define PJ_SOCK_HAS_INET_NTOP 1 8652 _ACEOF 8653 8654 echo "$as_me:$LINENO: result: yes" >&5 8655 echo "${ECHO_T}yes" >&6 8656 else 8657 echo "$as_me: failed program was:" >&5 8658 sed 's/^/| /' conftest.$ac_ext >&5 8659 8660 echo "$as_me:$LINENO: result: no" >&5 8661 echo "${ECHO_T}no" >&6 8662 fi 8663 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 8664 8665 echo "$as_me:$LINENO: checking if getaddrinfo() is available" >&5 8666 echo $ECHO_N "checking if getaddrinfo() is available... $ECHO_C" >&6 8667 cat >conftest.$ac_ext <<_ACEOF 8668 /* confdefs.h. */ 8669 _ACEOF 8670 cat confdefs.h >>conftest.$ac_ext 8671 cat >>conftest.$ac_ext <<_ACEOF 8672 /* end confdefs.h. */ 8673 #include <sys/types.h> 8674 #include <sys/socket.h> 8675 #include <netdb.h> 8676 int 8677 main () 8678 { 8679 getaddrinfo(0, 0, 0, 0); 8680 ; 8681 return 0; 8682 } 8683 _ACEOF 8684 rm -f conftest.$ac_objext 8685 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 8686 (eval $ac_compile) 2>conftest.er1 8687 ac_status=$? 8688 grep -v '^ *+' conftest.er1 >conftest.err 8689 rm -f conftest.er1 8690 cat conftest.err >&5 8691 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8692 (exit $ac_status); } && 8693 { ac_try='test -z "$ac_c_werror_flag" 8694 || test ! -s conftest.err' 8695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8696 (eval $ac_try) 2>&5 8697 ac_status=$? 8698 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8699 (exit $ac_status); }; } && 8700 { ac_try='test -s conftest.$ac_objext' 8701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 8702 (eval $ac_try) 2>&5 8703 ac_status=$? 8704 echo "$as_me:$LINENO: \$? = $ac_status" >&5 8705 (exit $ac_status); }; }; then 8706 cat >>confdefs.h <<\_ACEOF 8707 #define PJ_SOCK_HAS_GETADDRINFO 1 8538 8708 _ACEOF 8539 8709 … … 11234 11404 echo "$as_me:$LINENO: result: 11235 11405 11236 The configuration for current target has been written to 'build.mak', and 'os-auto.mak' in various build directories.11237 11238 Customizations can be put in:11406 Configurations for current target have been written to 'build.mak', and 'os-auto.mak' in various build directories, and pjlib/include/pj/compat/os_auto.h. 11407 11408 Further customizations can be put in: 11239 11409 - 'user.mak' 11240 11410 - 'pjlib/include/pj/config_site.h' … … 11244 11414 echo "${ECHO_T} 11245 11415 11246 The configuration for current target has been written to 'build.mak', and 'os-auto.mak' in various build directories.11247 11248 Customizations can be put in:11416 Configurations for current target have been written to 'build.mak', and 'os-auto.mak' in various build directories, and pjlib/include/pj/compat/os_auto.h. 11417 11418 Further customizations can be put in: 11249 11419 - 'user.mak' 11250 11420 - 'pjlib/include/pj/config_site.h' -
pjproject/trunk/aconfigure.ac
r1584 r1585 183 183 184 184 dnl # Determine if inet_aton() is available 185 AC_MSG_CHECKING([if inet_aton is available]) 186 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arpa/inet.h>]], 185 AC_MSG_CHECKING([if inet_aton() is available]) 186 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> 187 #include <sys/socket.h> 188 #include <arpa/inet.h>]], 187 189 [inet_aton(0, 0);])], 188 190 [AC_DEFINE(PJ_SOCK_HAS_INET_ATON,1) 191 AC_MSG_RESULT(yes)], 192 [AC_MSG_RESULT(no)]) 193 194 dnl # Determine if inet_pton() is available 195 AC_MSG_CHECKING([if inet_pton() is available]) 196 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> 197 #include <sys/socket.h> 198 #include <arpa/inet.h>]], 199 [inet_pton(0, 0, 0);])], 200 [AC_DEFINE(PJ_SOCK_HAS_INET_PTON,1) 201 AC_MSG_RESULT(yes)], 202 [AC_MSG_RESULT(no)]) 203 204 dnl # Determine if inet_ntop() is available 205 AC_MSG_CHECKING([if inet_ntop() is available]) 206 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> 207 #include <sys/socket.h> 208 #include <arpa/inet.h>]], 209 [inet_ntop(0, 0, 0, 0);])], 210 [AC_DEFINE(PJ_SOCK_HAS_INET_NTOP,1) 211 AC_MSG_RESULT(yes)], 212 [AC_MSG_RESULT(no)]) 213 214 dnl # Determine if getaddrinfo() is available 215 AC_MSG_CHECKING([if getaddrinfo() is available]) 216 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> 217 #include <sys/socket.h> 218 #include <netdb.h>]], 219 [getaddrinfo(0, 0, 0, 0);])], 220 [AC_DEFINE(PJ_SOCK_HAS_GETADDRINFO,1) 189 221 AC_MSG_RESULT(yes)], 190 222 [AC_MSG_RESULT(no)]) … … 546 578 AC_MSG_RESULT([ 547 579 548 The configuration for current target has been written to 'build.mak', and 'os-auto.mak' in various build directories.549 550 Customizations can be put in:580 Configurations for current target have been written to 'build.mak', and 'os-auto.mak' in various build directories, and pjlib/include/pj/compat/os_auto.h. 581 582 Further customizations can be put in: 551 583 - 'user.mak' 552 584 - 'pjlib/include/pj/config_site.h' -
pjproject/trunk/build.symbian/pjlibU.def
r1525 r1585 13 13 pj_AF_PACKET @ 12 NONAME 14 14 pj_AF_UNIX @ 13 NONAME 15 pj_GUID_STRING_LENGTH @ 14 NONAME 16 pj_IPTOS_LOWDELAY @ 15 NONAME 17 pj_IPTOS_MINCOST @ 16 NONAME 18 pj_IPTOS_RELIABILITY @ 17 NONAME 19 pj_IPTOS_THROUGHPUT @ 18 NONAME 20 pj_IP_TOS @ 19 NONAME 21 pj_MSG_DONTROUTE @ 20 NONAME 22 pj_MSG_OOB @ 21 NONAME 23 pj_MSG_PEEK @ 22 NONAME 24 pj_NO_MEMORY_EXCEPTION @ 23 NONAME 25 pj_SOCK_DGRAM @ 24 NONAME 26 pj_SOCK_RAW @ 25 NONAME 27 pj_SOCK_RDM @ 26 NONAME 28 pj_SOCK_STREAM @ 27 NONAME 29 pj_SOL_IP @ 28 NONAME 30 pj_SOL_IPV6 @ 29 NONAME 31 pj_SOL_SOCKET @ 30 NONAME 32 pj_SOL_TCP @ 31 NONAME 33 pj_SOL_UDP @ 32 NONAME 34 pj_SO_RCVBUF @ 33 NONAME 35 pj_SO_SNDBUF @ 34 NONAME 36 pj_SO_TYPE @ 35 NONAME 37 pj_ansi_to_unicode @ 36 NONAME 38 pj_array_erase @ 37 NONAME 39 pj_array_find @ 38 NONAME 40 pj_array_insert @ 39 NONAME 41 pj_atexit @ 40 NONAME 42 pj_atomic_add @ 41 NONAME 43 pj_atomic_add_and_get @ 42 NONAME 44 pj_atomic_create @ 43 NONAME 45 pj_atomic_dec @ 44 NONAME 46 pj_atomic_dec_and_get @ 45 NONAME 47 pj_atomic_destroy @ 46 NONAME 48 pj_atomic_get @ 47 NONAME 49 pj_atomic_inc @ 48 NONAME 50 pj_atomic_inc_and_get @ 49 NONAME 51 pj_atomic_set @ 50 NONAME 52 pj_caching_pool_destroy @ 51 NONAME 53 pj_caching_pool_init @ 52 NONAME 54 pj_create_random_string @ 53 NONAME 55 pj_create_unique_string @ 54 NONAME 56 pj_dump_config @ 55 NONAME 57 pj_elapsed_cycle @ 56 NONAME 58 pj_elapsed_msec @ 57 NONAME 59 pj_elapsed_nanosec @ 58 NONAME 60 pj_elapsed_time @ 59 NONAME 61 pj_elapsed_usec @ 60 NONAME 62 pj_enter_critical_section @ 61 NONAME 63 pj_enum_ip_interface @ 62 NONAME 64 pj_enum_ip_route @ 63 NONAME 65 pj_exception_id_alloc @ 64 NONAME 66 pj_exception_id_free @ 65 NONAME 67 pj_exception_id_name @ 66 NONAME 68 pj_fifobuf_alloc @ 67 NONAME 69 pj_fifobuf_free @ 68 NONAME 70 pj_fifobuf_init @ 69 NONAME 71 pj_fifobuf_max_size @ 70 NONAME 72 pj_fifobuf_unalloc @ 71 NONAME 73 pj_file_close @ 72 NONAME 74 pj_file_delete @ 73 NONAME 75 pj_file_exists @ 74 NONAME 76 pj_file_flush @ 75 NONAME 77 pj_file_getpos @ 76 NONAME 78 pj_file_getstat @ 77 NONAME 79 pj_file_move @ 78 NONAME 80 pj_file_open @ 79 NONAME 81 pj_file_read @ 80 NONAME 82 pj_file_setpos @ 81 NONAME 83 pj_file_size @ 82 NONAME 84 pj_file_write @ 83 NONAME 85 pj_generate_unique_string @ 84 NONAME 86 pj_get_netos_error @ 85 NONAME 87 pj_get_os_error @ 86 NONAME 88 pj_get_timestamp @ 87 NONAME 89 pj_get_timestamp_freq @ 88 NONAME 90 pj_get_version @ 89 NONAME 91 pj_gethostaddr @ 90 NONAME 92 pj_gethostbyname @ 91 NONAME 93 pj_gethostip @ 92 NONAME 94 pj_gethostname @ 93 NONAME 95 pj_getpid @ 94 NONAME 96 pj_gettimeofday @ 95 NONAME 97 pj_hash_calc @ 96 NONAME 98 pj_hash_calc_tolower @ 97 NONAME 99 pj_hash_count @ 98 NONAME 100 pj_hash_create @ 99 NONAME 101 pj_hash_first @ 100 NONAME 102 pj_hash_get @ 101 NONAME 103 pj_hash_next @ 102 NONAME 104 pj_hash_set @ 103 NONAME 105 pj_hash_set_np @ 104 NONAME 106 pj_hash_this @ 105 NONAME 107 pj_htonl @ 106 NONAME 108 pj_htons @ 107 NONAME 109 pj_inet_addr @ 108 NONAME 110 pj_inet_addr2 @ 109 NONAME 111 pj_inet_aton @ 110 NONAME 112 pj_inet_ntoa @ 111 NONAME 113 pj_init @ 112 NONAME 114 pj_ioqueue_accept @ 113 NONAME 115 pj_ioqueue_connect @ 114 NONAME 116 pj_ioqueue_create @ 115 NONAME 117 pj_ioqueue_destroy @ 116 NONAME 118 pj_ioqueue_get_user_data @ 117 NONAME 119 pj_ioqueue_is_pending @ 118 NONAME 120 pj_ioqueue_name @ 119 NONAME 121 pj_ioqueue_op_key_init @ 120 NONAME 122 pj_ioqueue_poll @ 121 NONAME 123 pj_ioqueue_post_completion @ 122 NONAME 124 pj_ioqueue_recv @ 123 NONAME 125 pj_ioqueue_recvfrom @ 124 NONAME 126 pj_ioqueue_register_sock @ 125 NONAME 127 pj_ioqueue_send @ 126 NONAME 128 pj_ioqueue_sendto @ 127 NONAME 129 pj_ioqueue_set_lock @ 128 NONAME 130 pj_ioqueue_set_user_data @ 129 NONAME 131 pj_ioqueue_unregister @ 130 NONAME 132 pj_leave_critical_section @ 131 NONAME 133 pj_list_erase @ 132 NONAME 134 pj_list_find_node @ 133 NONAME 135 pj_list_insert_after @ 134 NONAME 136 pj_list_insert_before @ 135 NONAME 137 pj_list_insert_nodes_after @ 136 NONAME 138 pj_list_insert_nodes_before @ 137 NONAME 139 pj_list_merge_first @ 138 NONAME 140 pj_list_merge_last @ 139 NONAME 141 pj_list_search @ 140 NONAME 142 pj_list_size @ 141 NONAME 143 pj_lock_acquire @ 142 NONAME 144 pj_lock_create_null_mutex @ 143 NONAME 145 pj_lock_create_recursive_mutex @ 144 NONAME 146 pj_lock_create_semaphore @ 145 NONAME 147 pj_lock_create_simple_mutex @ 146 NONAME 148 pj_lock_destroy @ 147 NONAME 149 pj_lock_release @ 148 NONAME 150 pj_lock_tryacquire @ 149 NONAME 151 pj_log @ 150 NONAME 152 pj_log_1 @ 151 NONAME 153 pj_log_2 @ 152 NONAME 154 pj_log_3 @ 153 NONAME 155 pj_log_4 @ 154 NONAME 156 pj_log_5 @ 155 NONAME 157 pj_log_get_decor @ 156 NONAME 158 pj_log_get_level @ 157 NONAME 159 pj_log_get_log_func @ 158 NONAME 160 pj_log_set_decor @ 159 NONAME 161 pj_log_set_level @ 160 NONAME 162 pj_log_set_log_func @ 161 NONAME 163 pj_log_write @ 162 NONAME 164 pj_mutex_create @ 163 NONAME 165 pj_mutex_create_recursive @ 164 NONAME 166 pj_mutex_create_simple @ 165 NONAME 167 pj_mutex_destroy @ 166 NONAME 168 pj_mutex_lock @ 167 NONAME 169 pj_mutex_trylock @ 168 NONAME 170 pj_mutex_unlock @ 169 NONAME 171 pj_ntohl @ 170 NONAME 172 pj_ntohs @ 171 NONAME 173 pj_pool_alloc @ 172 NONAME 174 pj_pool_alloc_from_block @ 173 NONAME 175 pj_pool_allocate_find @ 174 NONAME 176 pj_pool_calloc @ 175 NONAME 177 pj_pool_create @ 176 NONAME 178 pj_pool_create_int @ 177 NONAME 179 pj_pool_create_on_buf @ 178 NONAME 180 pj_pool_destroy_int @ 179 NONAME 181 pj_pool_factory_default_policy @ 180 NONAME 182 pj_pool_factory_get_default_policy @ 181 NONAME 183 pj_pool_get_capacity @ 182 NONAME 184 pj_pool_get_used_size @ 183 NONAME 185 pj_pool_getobjname @ 184 NONAME 186 pj_pool_init_int @ 185 NONAME 187 pj_pool_release @ 186 NONAME 188 pj_pool_reset @ 187 NONAME 189 pj_rand @ 188 NONAME 190 pj_rbtree_erase @ 189 NONAME 191 pj_rbtree_find @ 190 NONAME 192 pj_rbtree_first @ 191 NONAME 193 pj_rbtree_init @ 192 NONAME 194 pj_rbtree_insert @ 193 NONAME 195 pj_rbtree_last @ 194 NONAME 196 pj_rbtree_max_height @ 195 NONAME 197 pj_rbtree_min_height @ 196 NONAME 198 pj_rbtree_next @ 197 NONAME 199 pj_rbtree_prev @ 198 NONAME 200 pj_register_strerror @ 199 NONAME 201 pj_rwmutex_create @ 200 NONAME 202 pj_rwmutex_destroy @ 201 NONAME 203 pj_rwmutex_lock_read @ 202 NONAME 204 pj_rwmutex_lock_write @ 203 NONAME 205 pj_rwmutex_unlock_read @ 204 NONAME 206 pj_rwmutex_unlock_write @ 205 NONAME 207 pj_sem_create @ 206 NONAME 208 pj_sem_destroy @ 207 NONAME 209 pj_sem_post @ 208 NONAME 210 pj_sem_trywait @ 209 NONAME 211 pj_sem_wait @ 210 NONAME 212 pj_set_netos_error @ 211 NONAME 213 pj_set_os_error @ 212 NONAME 214 pj_shutdown @ 213 NONAME 215 pj_sock_accept @ 214 NONAME 216 pj_sock_bind @ 215 NONAME 217 pj_sock_bind_in @ 216 NONAME 218 pj_sock_close @ 217 NONAME 219 pj_sock_connect @ 218 NONAME 220 pj_sock_getpeername @ 219 NONAME 221 pj_sock_getsockname @ 220 NONAME 222 pj_sock_getsockopt @ 221 NONAME 223 pj_sock_listen @ 222 NONAME 224 pj_sock_recv @ 223 NONAME 225 pj_sock_recvfrom @ 224 NONAME 226 pj_sock_select @ 225 NONAME 227 pj_sock_send @ 226 NONAME 228 pj_sock_sendto @ 227 NONAME 229 pj_sock_setsockopt @ 228 NONAME 230 pj_sock_shutdown @ 229 NONAME 231 pj_sock_socket @ 230 NONAME 232 pj_sockaddr_in_init @ 231 NONAME 233 pj_sockaddr_in_set_str_addr @ 232 NONAME 234 pj_srand @ 233 NONAME 235 pj_str @ 234 NONAME 236 pj_strassign @ 235 NONAME 237 pj_strcat @ 236 NONAME 238 pj_strcat2 @ 237 NONAME 239 pj_strcmp @ 238 NONAME 240 pj_strcmp2 @ 239 NONAME 241 pj_strcpy @ 240 NONAME 242 pj_strcpy2 @ 241 NONAME 243 pj_strdup @ 242 NONAME 244 pj_strdup2 @ 243 NONAME 245 pj_strdup2_with_null @ 244 NONAME 246 pj_strdup3 @ 245 NONAME 247 pj_strdup_with_null @ 246 NONAME 248 pj_strerror @ 247 NONAME 249 pj_stricmp @ 248 NONAME 250 pj_stricmp2 @ 249 NONAME 251 pj_strltrim @ 250 NONAME 252 pj_strncmp @ 251 NONAME 253 pj_strncmp2 @ 252 NONAME 254 pj_strncpy @ 253 NONAME 255 pj_strncpy_with_null @ 254 NONAME 256 pj_strnicmp @ 255 NONAME 257 pj_strnicmp2 @ 256 NONAME 258 pj_strrtrim @ 257 NONAME 259 pj_strtoul @ 258 NONAME 260 pj_strtoul2 @ 259 NONAME 261 pj_strtrim @ 260 NONAME 262 pj_symbianos_poll @ 261 NONAME 263 pj_symbianos_set_params @ 262 NONAME 264 pj_thread_create @ 263 NONAME 265 pj_thread_destroy @ 264 NONAME 266 pj_thread_get_name @ 265 NONAME 267 pj_thread_join @ 266 NONAME 268 pj_thread_local_alloc @ 267 NONAME 269 pj_thread_local_free @ 268 NONAME 270 pj_thread_local_get @ 269 NONAME 271 pj_thread_local_set @ 270 NONAME 272 pj_thread_register @ 271 NONAME 273 pj_thread_resume @ 272 NONAME 274 pj_thread_sleep @ 273 NONAME 275 pj_thread_this @ 274 NONAME 276 pj_time_decode @ 275 NONAME 277 pj_time_encode @ 276 NONAME 278 pj_time_gmt_to_local @ 277 NONAME 279 pj_time_local_to_gmt @ 278 NONAME 280 pj_time_val_normalize @ 279 NONAME 281 pj_timer_entry_init @ 280 NONAME 282 pj_timer_heap_cancel @ 281 NONAME 283 pj_timer_heap_count @ 282 NONAME 284 pj_timer_heap_create @ 283 NONAME 285 pj_timer_heap_destroy @ 284 NONAME 286 pj_timer_heap_earliest_time @ 285 NONAME 287 pj_timer_heap_mem_size @ 286 NONAME 288 pj_timer_heap_poll @ 287 NONAME 289 pj_timer_heap_schedule @ 288 NONAME 290 pj_timer_heap_set_lock @ 289 NONAME 291 pj_timer_heap_set_max_timed_out_per_poll @ 290 NONAME 292 pj_unicode_to_ansi @ 291 NONAME 293 pj_utoa @ 292 NONAME 294 pj_utoa_pad @ 293 NONAME 295 platform_strerror @ 294 NONAME 296 snprintf @ 295 NONAME 297 vsnprintf @ 296 NONAME 15 pj_AF_UNSPEC @ 14 NONAME 16 pj_GUID_STRING_LENGTH @ 15 NONAME 17 pj_IPTOS_LOWDELAY @ 16 NONAME 18 pj_IPTOS_MINCOST @ 17 NONAME 19 pj_IPTOS_RELIABILITY @ 18 NONAME 20 pj_IPTOS_THROUGHPUT @ 19 NONAME 21 pj_IP_TOS @ 20 NONAME 22 pj_MSG_DONTROUTE @ 21 NONAME 23 pj_MSG_OOB @ 22 NONAME 24 pj_MSG_PEEK @ 23 NONAME 25 pj_NO_MEMORY_EXCEPTION @ 24 NONAME 26 pj_SOCK_DGRAM @ 25 NONAME 27 pj_SOCK_RAW @ 26 NONAME 28 pj_SOCK_RDM @ 27 NONAME 29 pj_SOCK_STREAM @ 28 NONAME 30 pj_SOL_IP @ 29 NONAME 31 pj_SOL_IPV6 @ 30 NONAME 32 pj_SOL_SOCKET @ 31 NONAME 33 pj_SOL_TCP @ 32 NONAME 34 pj_SOL_UDP @ 33 NONAME 35 pj_SO_RCVBUF @ 34 NONAME 36 pj_SO_SNDBUF @ 35 NONAME 37 pj_SO_TYPE @ 36 NONAME 38 pj_ansi_to_unicode @ 37 NONAME 39 pj_array_erase @ 38 NONAME 40 pj_array_find @ 39 NONAME 41 pj_array_insert @ 40 NONAME 42 pj_atexit @ 41 NONAME 43 pj_atomic_add @ 42 NONAME 44 pj_atomic_add_and_get @ 43 NONAME 45 pj_atomic_create @ 44 NONAME 46 pj_atomic_dec @ 45 NONAME 47 pj_atomic_dec_and_get @ 46 NONAME 48 pj_atomic_destroy @ 47 NONAME 49 pj_atomic_get @ 48 NONAME 50 pj_atomic_inc @ 49 NONAME 51 pj_atomic_inc_and_get @ 50 NONAME 52 pj_atomic_set @ 51 NONAME 53 pj_caching_pool_destroy @ 52 NONAME 54 pj_caching_pool_init @ 53 NONAME 55 pj_create_random_string @ 54 NONAME 56 pj_create_unique_string @ 55 NONAME 57 pj_dump_config @ 56 NONAME 58 pj_elapsed_cycle @ 57 NONAME 59 pj_elapsed_msec @ 58 NONAME 60 pj_elapsed_nanosec @ 59 NONAME 61 pj_elapsed_time @ 60 NONAME 62 pj_elapsed_usec @ 61 NONAME 63 pj_enter_critical_section @ 62 NONAME 64 pj_enum_ip_interface @ 63 NONAME 65 pj_enum_ip_route @ 64 NONAME 66 pj_exception_id_alloc @ 65 NONAME 67 pj_exception_id_free @ 66 NONAME 68 pj_exception_id_name @ 67 NONAME 69 pj_fifobuf_alloc @ 68 NONAME 70 pj_fifobuf_free @ 69 NONAME 71 pj_fifobuf_init @ 70 NONAME 72 pj_fifobuf_max_size @ 71 NONAME 73 pj_fifobuf_unalloc @ 72 NONAME 74 pj_file_close @ 73 NONAME 75 pj_file_delete @ 74 NONAME 76 pj_file_exists @ 75 NONAME 77 pj_file_flush @ 76 NONAME 78 pj_file_getpos @ 77 NONAME 79 pj_file_getstat @ 78 NONAME 80 pj_file_move @ 79 NONAME 81 pj_file_open @ 80 NONAME 82 pj_file_read @ 81 NONAME 83 pj_file_setpos @ 82 NONAME 84 pj_file_size @ 83 NONAME 85 pj_file_write @ 84 NONAME 86 pj_generate_unique_string @ 85 NONAME 87 pj_get_netos_error @ 86 NONAME 88 pj_get_os_error @ 87 NONAME 89 pj_get_timestamp @ 88 NONAME 90 pj_get_timestamp_freq @ 89 NONAME 91 pj_get_version @ 90 NONAME 92 pj_gethostaddr @ 91 NONAME 93 pj_gethostbyname @ 92 NONAME 94 pj_gethostip @ 93 NONAME 95 pj_gethostname @ 94 NONAME 96 pj_getpid @ 95 NONAME 97 pj_gettimeofday @ 96 NONAME 98 pj_hash_calc @ 97 NONAME 99 pj_hash_calc_tolower @ 98 NONAME 100 pj_hash_count @ 99 NONAME 101 pj_hash_create @ 100 NONAME 102 pj_hash_first @ 101 NONAME 103 pj_hash_get @ 102 NONAME 104 pj_hash_next @ 103 NONAME 105 pj_hash_set @ 104 NONAME 106 pj_hash_set_np @ 105 NONAME 107 pj_hash_this @ 106 NONAME 108 pj_htonl @ 107 NONAME 109 pj_htons @ 108 NONAME 110 pj_inet_addr @ 109 NONAME 111 pj_inet_addr2 @ 110 NONAME 112 pj_inet_aton @ 111 NONAME 113 pj_inet_ntoa @ 112 NONAME 114 pj_init @ 113 NONAME 115 pj_ioqueue_accept @ 114 NONAME 116 pj_ioqueue_connect @ 115 NONAME 117 pj_ioqueue_create @ 116 NONAME 118 pj_ioqueue_destroy @ 117 NONAME 119 pj_ioqueue_get_user_data @ 118 NONAME 120 pj_ioqueue_is_pending @ 119 NONAME 121 pj_ioqueue_name @ 120 NONAME 122 pj_ioqueue_op_key_init @ 121 NONAME 123 pj_ioqueue_poll @ 122 NONAME 124 pj_ioqueue_post_completion @ 123 NONAME 125 pj_ioqueue_recv @ 124 NONAME 126 pj_ioqueue_recvfrom @ 125 NONAME 127 pj_ioqueue_register_sock @ 126 NONAME 128 pj_ioqueue_send @ 127 NONAME 129 pj_ioqueue_sendto @ 128 NONAME 130 pj_ioqueue_set_lock @ 129 NONAME 131 pj_ioqueue_set_user_data @ 130 NONAME 132 pj_ioqueue_unregister @ 131 NONAME 133 pj_leave_critical_section @ 132 NONAME 134 pj_list_erase @ 133 NONAME 135 pj_list_find_node @ 134 NONAME 136 pj_list_insert_after @ 135 NONAME 137 pj_list_insert_before @ 136 NONAME 138 pj_list_insert_nodes_after @ 137 NONAME 139 pj_list_insert_nodes_before @ 138 NONAME 140 pj_list_merge_first @ 139 NONAME 141 pj_list_merge_last @ 140 NONAME 142 pj_list_search @ 141 NONAME 143 pj_list_size @ 142 NONAME 144 pj_lock_acquire @ 143 NONAME 145 pj_lock_create_null_mutex @ 144 NONAME 146 pj_lock_create_recursive_mutex @ 145 NONAME 147 pj_lock_create_semaphore @ 146 NONAME 148 pj_lock_create_simple_mutex @ 147 NONAME 149 pj_lock_destroy @ 148 NONAME 150 pj_lock_release @ 149 NONAME 151 pj_lock_tryacquire @ 150 NONAME 152 pj_log @ 151 NONAME 153 pj_log_1 @ 152 NONAME 154 pj_log_2 @ 153 NONAME 155 pj_log_3 @ 154 NONAME 156 pj_log_4 @ 155 NONAME 157 pj_log_5 @ 156 NONAME 158 pj_log_get_decor @ 157 NONAME 159 pj_log_get_level @ 158 NONAME 160 pj_log_get_log_func @ 159 NONAME 161 pj_log_set_decor @ 160 NONAME 162 pj_log_set_level @ 161 NONAME 163 pj_log_set_log_func @ 162 NONAME 164 pj_log_write @ 163 NONAME 165 pj_mutex_create @ 164 NONAME 166 pj_mutex_create_recursive @ 165 NONAME 167 pj_mutex_create_simple @ 166 NONAME 168 pj_mutex_destroy @ 167 NONAME 169 pj_mutex_lock @ 168 NONAME 170 pj_mutex_trylock @ 169 NONAME 171 pj_mutex_unlock @ 170 NONAME 172 pj_ntohl @ 171 NONAME 173 pj_ntohs @ 172 NONAME 174 pj_pool_alloc @ 173 NONAME 175 pj_pool_alloc_from_block @ 174 NONAME 176 pj_pool_allocate_find @ 175 NONAME 177 pj_pool_calloc @ 176 NONAME 178 pj_pool_create @ 177 NONAME 179 pj_pool_create_int @ 178 NONAME 180 pj_pool_create_on_buf @ 179 NONAME 181 pj_pool_destroy_int @ 180 NONAME 182 pj_pool_factory_default_policy @ 181 NONAME 183 pj_pool_factory_get_default_policy @ 182 NONAME 184 pj_pool_get_capacity @ 183 NONAME 185 pj_pool_get_used_size @ 184 NONAME 186 pj_pool_getobjname @ 185 NONAME 187 pj_pool_init_int @ 186 NONAME 188 pj_pool_release @ 187 NONAME 189 pj_pool_reset @ 188 NONAME 190 pj_rand @ 189 NONAME 191 pj_rbtree_erase @ 190 NONAME 192 pj_rbtree_find @ 191 NONAME 193 pj_rbtree_first @ 192 NONAME 194 pj_rbtree_init @ 193 NONAME 195 pj_rbtree_insert @ 194 NONAME 196 pj_rbtree_last @ 195 NONAME 197 pj_rbtree_max_height @ 196 NONAME 198 pj_rbtree_min_height @ 197 NONAME 199 pj_rbtree_next @ 198 NONAME 200 pj_rbtree_prev @ 199 NONAME 201 pj_register_strerror @ 200 NONAME 202 pj_rwmutex_create @ 201 NONAME 203 pj_rwmutex_destroy @ 202 NONAME 204 pj_rwmutex_lock_read @ 203 NONAME 205 pj_rwmutex_lock_write @ 204 NONAME 206 pj_rwmutex_unlock_read @ 205 NONAME 207 pj_rwmutex_unlock_write @ 206 NONAME 208 pj_sem_create @ 207 NONAME 209 pj_sem_destroy @ 208 NONAME 210 pj_sem_post @ 209 NONAME 211 pj_sem_trywait @ 210 NONAME 212 pj_sem_wait @ 211 NONAME 213 pj_set_netos_error @ 212 NONAME 214 pj_set_os_error @ 213 NONAME 215 pj_shutdown @ 214 NONAME 216 pj_sock_accept @ 215 NONAME 217 pj_sock_bind @ 216 NONAME 218 pj_sock_bind_in @ 217 NONAME 219 pj_sock_close @ 218 NONAME 220 pj_sock_connect @ 219 NONAME 221 pj_sock_getpeername @ 220 NONAME 222 pj_sock_getsockname @ 221 NONAME 223 pj_sock_getsockopt @ 222 NONAME 224 pj_sock_listen @ 223 NONAME 225 pj_sock_recv @ 224 NONAME 226 pj_sock_recvfrom @ 225 NONAME 227 pj_sock_select @ 226 NONAME 228 pj_sock_send @ 227 NONAME 229 pj_sock_sendto @ 228 NONAME 230 pj_sock_setsockopt @ 229 NONAME 231 pj_sock_shutdown @ 230 NONAME 232 pj_sock_socket @ 231 NONAME 233 pj_sockaddr_in_init @ 232 NONAME 234 pj_sockaddr_in_set_str_addr @ 233 NONAME 235 pj_srand @ 234 NONAME 236 pj_str @ 235 NONAME 237 pj_strassign @ 236 NONAME 238 pj_strcat @ 237 NONAME 239 pj_strcat2 @ 238 NONAME 240 pj_strcmp @ 239 NONAME 241 pj_strcmp2 @ 240 NONAME 242 pj_strcpy @ 241 NONAME 243 pj_strcpy2 @ 242 NONAME 244 pj_strdup @ 243 NONAME 245 pj_strdup2 @ 244 NONAME 246 pj_strdup2_with_null @ 245 NONAME 247 pj_strdup3 @ 246 NONAME 248 pj_strdup_with_null @ 247 NONAME 249 pj_strerror @ 248 NONAME 250 pj_stricmp @ 249 NONAME 251 pj_stricmp2 @ 250 NONAME 252 pj_strltrim @ 251 NONAME 253 pj_strncmp @ 252 NONAME 254 pj_strncmp2 @ 253 NONAME 255 pj_strncpy @ 254 NONAME 256 pj_strncpy_with_null @ 255 NONAME 257 pj_strnicmp @ 256 NONAME 258 pj_strnicmp2 @ 257 NONAME 259 pj_strrtrim @ 258 NONAME 260 pj_strtoul @ 259 NONAME 261 pj_strtoul2 @ 260 NONAME 262 pj_strtrim @ 261 NONAME 263 pj_symbianos_poll @ 262 NONAME 264 pj_symbianos_set_params @ 263 NONAME 265 pj_thread_create @ 264 NONAME 266 pj_thread_destroy @ 265 NONAME 267 pj_thread_get_name @ 266 NONAME 268 pj_thread_join @ 267 NONAME 269 pj_thread_local_alloc @ 268 NONAME 270 pj_thread_local_free @ 269 NONAME 271 pj_thread_local_get @ 270 NONAME 272 pj_thread_local_set @ 271 NONAME 273 pj_thread_register @ 272 NONAME 274 pj_thread_resume @ 273 NONAME 275 pj_thread_sleep @ 274 NONAME 276 pj_thread_this @ 275 NONAME 277 pj_time_decode @ 276 NONAME 278 pj_time_encode @ 277 NONAME 279 pj_time_gmt_to_local @ 278 NONAME 280 pj_time_local_to_gmt @ 279 NONAME 281 pj_time_val_normalize @ 280 NONAME 282 pj_timer_entry_init @ 281 NONAME 283 pj_timer_heap_cancel @ 282 NONAME 284 pj_timer_heap_count @ 283 NONAME 285 pj_timer_heap_create @ 284 NONAME 286 pj_timer_heap_destroy @ 285 NONAME 287 pj_timer_heap_earliest_time @ 286 NONAME 288 pj_timer_heap_mem_size @ 287 NONAME 289 pj_timer_heap_poll @ 288 NONAME 290 pj_timer_heap_schedule @ 289 NONAME 291 pj_timer_heap_set_lock @ 290 NONAME 292 pj_timer_heap_set_max_timed_out_per_poll @ 291 NONAME 293 pj_unicode_to_ansi @ 292 NONAME 294 pj_utoa @ 293 NONAME 295 pj_utoa_pad @ 294 NONAME 296 platform_strerror @ 295 NONAME 297 snprintf @ 296 NONAME 298 vsnprintf @ 297 NONAME -
pjproject/trunk/pjlib/include/pj/addr_resolv.h
r974 r1585 74 74 #define h_addr h_addr_list[0] 75 75 76 /** 77 * This structure describes address information pj_getaddrinfo(). 78 */ 79 typedef struct pj_addrinfo 80 { 81 char ai_canonname[PJ_MAX_HOSTNAME]; /**< Canonical name for host*/ 82 pj_sockaddr ai_addr; /**< Binary address. */ 83 } pj_addrinfo; 84 85 76 86 /** 77 87 * This function fills the structure of type pj_hostent for a given host name. … … 96 106 97 107 108 /** 109 * This function translates the name of a service location (for example, 110 * a host name) and returns a set of addresses and associated information 111 * to be used in creating a socket with which to address the specified 112 * service. 113 * 114 * @param name Descriptive name or an address string, such as host 115 * name. 116 * @param af The desired address family to query. 117 * @param count On input, it specifies the number of elements in 118 * \a ai array. On output, this will be set with the 119 * number of address informations found for the 120 * specified name. 121 * 122 * @return PJ_SUCCESS on success, or the appropriate error code. 123 */ 124 PJ_DECL(pj_status_t) pj_getaddrinfo(const pj_str_t *nodename, int af, 125 unsigned *count, pj_addrinfo ai[]); 126 127 128 98 129 /** @} */ 99 130 -
pjproject/trunk/pjlib/include/pj/compat/os_auto.h.in
r1584 r1585 73 73 74 74 #undef PJ_SOCK_HAS_INET_ATON 75 #undef PJ_SOCK_HAS_INET_PTON 76 #undef PJ_SOCK_HAS_INET_NTOP 77 #undef PJ_SOCK_HAS_GETADDRINFO 75 78 76 79 /* Set 1 if native sockaddr_in has sin_len member. -
pjproject/trunk/pjlib/include/pj/compat/socket.h
r1584 r1585 32 32 # include <winsock.h> 33 33 #endif 34 35 /* 36 * IPv6 for Visual Studio's 37 * 38 * = Visual Studio 6 = 39 * 40 * Visual Studio 6 does not ship with IPv6 support, so you MUST 41 * download and install IPv6 Tehnology Preview (IPv6Kit) from: 42 * http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/ReadMe.asp 43 * Then put IPv6Kit\inc in your Visual Studio include path. 44 * 45 * In addition, by default IPv6Kit does not want to install on 46 * Windows 2000 SP4. Please see: 47 * http://msdn.microsoft.com/downloads/sdks/platform/tpipv6/faq.asp 48 * on how to install IPv6Kit on Win2K SP4. 49 * 50 * 51 * = Visual Studio 2003, 2005 (including Express) = 52 * 53 * These VS uses Microsoft Platform SDK for Windows Server 2003 SP1, and 54 * it has built-in IPv6 support. 55 */ 56 #if defined(_MSC_VER) && defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0 57 # ifndef s_addr 58 # define s_addr S_un.S_addr 59 # endif 60 61 # include <ws2tcpip.h> 62 63 # ifndef IPPROTO_IPV6 64 /* Need to download and install IPv6Kit for this platform. 65 * Please see the comments above about Visual Studio 6. 66 */ 67 # include <tpipv6.h> 68 # endif 69 70 # undef s_addr 71 #endif /* _MSC_VER */ 72 34 73 35 74 #if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H != 0 -
pjproject/trunk/pjlib/include/pj/config.h
r1581 r1585 450 450 451 451 /** 452 * \def PJ_HAS_IPV6 453 * Support IPv6 in the library. If this support is disabled, some IPv6 454 * related functions will return PJ_EIPV6NOTSUP. 455 * 456 * Default: 0 (disabled, for now) 457 */ 458 #ifndef PJ_HAS_IPV6 459 # define PJ_HAS_IPV6 0 460 #endif 461 462 /** 452 463 * Maximum hostname length. 453 464 * Libraries sometimes needs to make copy of an address to stack buffer; -
pjproject/trunk/pjlib/include/pj/errno.h
r1469 r1585 310 310 */ 311 311 #define PJ_EIGNORED (PJ_ERRNO_START_STATUS + 20)/* 70020 */ 312 /** 313 * @hideinitializer 314 * IPv6 is not supported 315 */ 316 #define PJ_EIPV6NOTSUP (PJ_ERRNO_START_STATUS + 21)/* 70021 */ 312 317 313 318 /** @} */ /* pj_errnum */ -
pjproject/trunk/pjlib/include/pj/sock.h
r1410 r1585 61 61 */ 62 62 63 /** Address family is unspecified. @see pj_AF_UNSPEC() */ 64 extern const pj_uint16_t PJ_AF_UNSPEC; 65 63 66 /** Unix domain socket. @see pj_AF_UNIX() */ 64 67 extern const pj_uint16_t PJ_AF_UNIX; … … 85 88 */ 86 89 90 /** Get #PJ_AF_UNSPEC value */ 91 PJ_DECL(pj_uint16_t) pj_AF_UNSPEC(void); 87 92 /** Get #PJ_AF_UNIX value. */ 88 93 PJ_DECL(pj_uint16_t) pj_AF_UNIX(void); … … 314 319 315 320 /** 321 * Maximum length of text representation of an IPv4 address. 322 */ 323 #define PJ_INET_ADDRSTRLEN 16 324 325 /** 326 * Maximum length of text representation of an IPv6 address. 327 */ 328 #define PJ_INET6_ADDRSTRLEN 46 329 330 331 /** 316 332 * This structure describes Internet socket address. 317 333 * If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added … … 334 350 }; 335 351 352 336 353 #undef s6_addr 337 354 … … 339 356 * This structure describes IPv6 address. 340 357 */ 341 typedef struct pj_in6_addr 342 { 343 /** Union of address formats. */ 344 union { 345 pj_uint8_t u6_addr8[16]; /**< u6_addr8 */ 346 pj_uint16_t u6_addr16[8]; /**< u6_addr16 */ 347 pj_uint32_t u6_addr32[4]; /**< u6_addr32 */ 348 } in6_u; 349 /** Shortcut to access in6_u.u6_addr8. */ 350 #define s6_addr in6_u.u6_addr8 351 /** Shortcut to access in6_u.u6_addr16. */ 352 #define s6_addr16 in6_u.u6_addr16 353 /** Shortcut to access in6_u.u6_addr32. */ 354 #define s6_addr32 in6_u.u6_addr32 358 typedef union pj_in6_addr 359 { 360 /* This is the main entry */ 361 pj_uint8_t s6_addr[16]; /**< 8-bit array */ 362 363 /* While these are used for proper alignment */ 364 pj_uint32_t u6_addr32[4]; 365 #if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0 366 pj_int64_t u6_addr64[2]; 367 #endif 368 355 369 } pj_in6_addr; 370 356 371 357 372 /** Initializer value for pj_in6_addr. */ … … 372 387 { 373 388 #if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0 374 pj_uint8_t sin _zero_len; /**< Just ignore this. */375 pj_uint8_t sin _family; /**< Address family. */389 pj_uint8_t sin6_zero_len; /**< Just ignore this. */ 390 pj_uint8_t sin6_family; /**< Address family. */ 376 391 #else 377 392 pj_uint16_t sin6_family; /**< Address family */ … … 380 395 pj_uint32_t sin6_flowinfo; /**< IPv6 flow information */ 381 396 pj_in6_addr sin6_addr; /**< IPv6 address. */ 382 pj_uint32_t sin6_scope_id; /**< IPv6 scope-id*/397 pj_uint32_t sin6_scope_id; /**< Set of interfaces for a scope */ 383 398 } pj_sockaddr_in6; 384 399 … … 473 488 */ 474 489 PJ_DECL(int) pj_inet_aton(const pj_str_t *cp, struct pj_in_addr *inp); 490 491 /** 492 * This function converts an address in its standard text presentation form 493 * into its numeric binary form. It supports both IPv4 and IPv6 address 494 * conversion. 495 * 496 * @param af Specify the family of the address. The PJ_AF_INET and 497 * PJ_AF_INET6 address families shall be supported. 498 * @param src Points to the string being passed in. 499 * @param dst Points to a buffer into which the function stores the 500 * numeric address; this shall be large enough to hold the 501 * numeric address (32 bits for PJ_AF_INET, 128 bits for 502 * PJ_AF_INET6). 503 * 504 * @return PJ_SUCCESS if conversion was successful. 505 */ 506 PJ_DECL(pj_status_t) pj_inet_pton(int af, const pj_str_t *src, void *dst); 507 508 /** 509 * This function converts a numeric address into a text string suitable 510 * for presentation. It supports both IPv4 and IPv6 address 511 * conversion. 512 * 513 * @param af Specify the family of the address. This can be PJ_AF_INET 514 * or PJ_AF_INET6. 515 * @param src Points to a buffer holding an IPv4 address if the af argument 516 * is PJ_AF_INET, or an IPv6 address if the af argument is 517 * PJ_AF_INET6; the address must be in network byte order. 518 * @param dst Points to a buffer where the function stores the resulting 519 * text string; it shall not be NULL. 520 * @param size Specifies the size of this buffer, which shall be large 521 * enough to hold the text string (PJ_INET_ADDRSTRLEN characters 522 * for IPv4, PJ_INET6_ADDRSTRLEN characters for IPv6). 523 * 524 * @return PJ_SUCCESS if conversion was successful.. 525 */ 526 PJ_DECL(pj_status_t) pj_inet_ntop(int af, const void *src, 527 char *dst, int size); 475 528 476 529 /** -
pjproject/trunk/pjlib/src/pj/addr_resolv_sock.c
r1405 r1585 116 116 117 117 118 /* Resolve IPv4/IPv6 address */ 119 PJ_DEF(pj_status_t) pj_getaddrinfo(const pj_str_t *nodename, int af, 120 unsigned *count, pj_addrinfo ai[]) 121 { 122 #if defined(PJ_SOCK_HAS_GETADDRINFO) && PJ_SOCK_HAS_GETADDRINFO!=0 123 char nodecopy[PJ_MAX_HOSTNAME]; 124 struct addrinfo hint, *res; 125 unsigned i; 126 int rc; 127 128 PJ_ASSERT_RETURN(nodename && count && *count && ai, PJ_EINVAL); 129 PJ_ASSERT_RETURN(nodename->ptr && nodename->slen, PJ_EINVAL); 130 PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL); 131 132 /* Copy node name to null terminated string. */ 133 if (nodename->slen >= PJ_MAX_HOSTNAME) 134 return PJ_ENAMETOOLONG; 135 pj_memcpy(nodecopy, nodename->ptr, nodename->slen); 136 nodecopy[nodename->slen] = '\0'; 137 138 /* Call getaddrinfo() */ 139 pj_bzero(&hint, sizeof(hint)); 140 hint.ai_family = af; 141 142 rc = getaddrinfo(nodecopy, NULL, &hint, &res); 143 if (rc != 0) 144 return PJ_ERESOLVE; 145 146 /* Enumerate each item in the result */ 147 for (i=0; i<*count && res; res=res->ai_next) { 148 int len; 149 150 /* Ignore unwanted address families */ 151 if (af!=PJ_AF_UNSPEC && res->ai_family != af) 152 continue; 153 154 /* Ignore name that's too long */ 155 len = pj_ansi_strlen(res->ai_canonname); 156 if (len >= PJ_MAX_HOSTNAME) 157 continue; 158 159 /* Store canonical name */ 160 pj_ansi_strcpy(ai[i].ai_canonname, res->ai_canonname); 161 162 /* Store address */ 163 PJ_ASSERT_ON_FAIL(res->ai_addrlen <= sizeof(pj_sockaddr), continue); 164 pj_memcpy(&ai[i].ai_addr, res->ai_addr, res->ai_addrlen); 165 166 /* Next slot */ 167 ++i; 168 } 169 170 *count = i; 171 172 /* Done */ 173 return PJ_SUCCESS; 174 175 #else /* PJ_SOCK_HAS_GETADDRINFO */ 176 /* IPv6 is not supported */ 177 PJ_UNUSED_ARG(nodename); 178 PJ_UNUSED_ARG(af); 179 PJ_UNUSED_ARG(ai); 180 181 PJ_ASSERT_RETURN(count, PJ_EINVAL); 182 *count = 0; 183 184 return PJ_EIPV6NOTSUP; 185 #endif /* PJ_SOCK_HAS_GETADDRINFO */ 186 } 187 -
pjproject/trunk/pjlib/src/pj/errno.c
r1469 r1585 72 72 PJ_BUILD_ERR(PJ_ETOOSMALL, "Size is too short"), 73 73 PJ_BUILD_ERR(PJ_EIGNORED, "Ignored"), 74 PJ_BUILD_ERR(PJ_EIPV6NOTSUP, "IPv6 is not supported") 74 75 }; 75 76 #endif /* PJ_HAS_ERROR_STRING */ -
pjproject/trunk/pjlib/src/pj/sock_bsd.c
r1515 r1585 24 24 #include <pj/addr_resolv.h> 25 25 #include <pj/errno.h> 26 #include <pj/unicode.h> 26 27 27 28 /* … … 29 30 * The values here are indexed based on pj_addr_family. 30 31 */ 32 const pj_uint16_t PJ_AF_UNSPEC = AF_UNSPEC; 31 33 const pj_uint16_t PJ_AF_UNIX = AF_UNIX; 32 34 const pj_uint16_t PJ_AF_INET = AF_INET; … … 185 187 PJ_DEF(int) pj_inet_aton(const pj_str_t *cp, struct pj_in_addr *inp) 186 188 { 187 char tempaddr[ 16];189 char tempaddr[PJ_INET_ADDRSTRLEN]; 188 190 189 191 /* Initialize output with PJ_INADDR_NONE. … … 198 200 */ 199 201 PJ_ASSERT_RETURN(cp && cp->slen && inp, 0); 200 if (cp->slen >= 16) {202 if (cp->slen >= PJ_INET_ADDRSTRLEN) { 201 203 return 0; 202 204 } … … 210 212 inp->s_addr = inet_addr(tempaddr); 211 213 return inp->s_addr == PJ_INADDR_NONE ? 0 : 1; 214 #endif 215 } 216 217 /* 218 * Convert text to IPv4/IPv6 address. 219 */ 220 PJ_DEF(pj_status_t) pj_inet_pton(int af, const pj_str_t *src, void *dst) 221 { 222 char tempaddr[PJ_INET6_ADDRSTRLEN]; 223 224 PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL); 225 PJ_ASSERT_RETURN(src && src->slen && dst, PJ_EINVAL); 226 227 /* Initialize output with PJ_IN_ADDR_NONE for IPv4 (to be 228 * compatible with pj_inet_aton() 229 */ 230 if (af==PJ_AF_INET) { 231 ((pj_in_addr*)dst)->s_addr = PJ_INADDR_NONE; 232 } 233 234 /* Caution: 235 * this function might be called with cp->slen >= 46 236 * (i.e. when called with hostname to check if it's an IP addr). 237 */ 238 if (src->slen >= PJ_INET6_ADDRSTRLEN) { 239 return PJ_ENAMETOOLONG; 240 } 241 242 pj_memcpy(tempaddr, src->ptr, src->slen); 243 tempaddr[src->slen] = '\0'; 244 245 #if defined(PJ_SOCK_HAS_INET_PTON) && PJ_SOCK_HAS_INET_PTON != 0 246 /* 247 * Implementation using inet_pton() 248 */ 249 if (inet_pton(af, tempaddr, dst) != 1) { 250 pj_status_t status = pj_get_netos_error(); 251 if (status == PJ_SUCCESS) 252 status = PJ_EUNKNOWN; 253 254 return status; 255 } 256 257 return PJ_SUCCESS; 258 259 #elif defined(PJ_WIN32) || defined(PJ_WIN32_WINCE) 260 /* 261 * Implementation on Windows, using WSAStringToAddress(). 262 * Should also work on Unicode systems. 263 */ 264 { 265 PJ_DECL_UNICODE_TEMP_BUF(wtempaddr,PJ_INET6_ADDRSTRLEN) 266 pj_sockaddr sock_addr; 267 int addr_len = sizeof(sock_addr); 268 int rc; 269 270 sock_addr.addr.sa_family = (pj_uint16_t)af; 271 rc = WSAStringToAddress( 272 PJ_STRING_TO_NATIVE(tempaddr,wtempaddr,sizeof(wtempaddr)), 273 af, NULL, (LPSOCKADDR)&sock_addr, &addr_len); 274 if (rc != 0) { 275 pj_status_t status = pj_get_netos_error(); 276 if (status == PJ_SUCCESS) 277 status = PJ_EUNKNOWN; 278 279 return status; 280 } 281 282 if (sock_addr.addr.sa_family == PJ_AF_INET) { 283 pj_memcpy(dst, &sock_addr.ipv4.sin_addr, 4); 284 return PJ_SUCCESS; 285 } else if (sock_addr.addr.sa_family == PJ_AF_INET6) { 286 pj_memcpy(dst, &sock_addr.ipv6.sin6_addr, 16); 287 return PJ_SUCCESS; 288 } else { 289 pj_assert(!"Shouldn't happen"); 290 return PJ_EBUG; 291 } 292 } 293 #elif !defined(PJ_HAS_IPV6) || PJ_HAS_IPV6==0 294 /* IPv6 support is disabled, just return error without raising assertion */ 295 return PJ_EIPV6NOTSUP; 296 #else 297 pj_assert(!"Not supported"); 298 return PJ_EIPV6NOTSUP; 299 #endif 300 } 301 302 /* 303 * Convert IPv4/IPv6 address to text. 304 */ 305 PJ_DEF(pj_status_t) pj_inet_ntop(int af, const void *src, 306 char *dst, int size) 307 308 { 309 PJ_ASSERT_RETURN(src && dst && size, PJ_EINVAL); 310 PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL); 311 312 #if defined(PJ_SOCK_HAS_INET_NTOP) && PJ_SOCK_HAS_INET_NTOP != 0 313 /* 314 * Implementation using inet_ntop() 315 */ 316 if (inet_ntop(af, src, dst, size) == NULL) { 317 pj_status_t status = pj_get_netos_error(); 318 if (status == PJ_SUCCESS) 319 status = PJ_EUNKNOWN; 320 321 return status; 322 } 323 324 return PJ_SUCCESS; 325 326 #elif defined(PJ_WIN32) || defined(PJ_WIN32_WINCE) 327 /* 328 * Implementation on Windows, using WSAAddressToString(). 329 * Should also work on Unicode systems. 330 */ 331 { 332 PJ_DECL_UNICODE_TEMP_BUF(wtempaddr,PJ_INET6_ADDRSTRLEN) 333 pj_sockaddr sock_addr; 334 DWORD addr_len, addr_str_len; 335 int rc; 336 337 pj_bzero(&sock_addr, sizeof(sock_addr)); 338 sock_addr.addr.sa_family = (pj_uint16_t)af; 339 if (af == PJ_AF_INET) { 340 if (size < PJ_INET_ADDRSTRLEN) 341 return PJ_ETOOSMALL; 342 pj_memcpy(&sock_addr.ipv4.sin_addr, src, 4); 343 addr_len = sizeof(pj_sockaddr_in); 344 addr_str_len = PJ_INET_ADDRSTRLEN; 345 } else if (af == PJ_AF_INET6) { 346 if (size < PJ_INET6_ADDRSTRLEN) 347 return PJ_ETOOSMALL; 348 pj_memcpy(&sock_addr.ipv6.sin6_addr, src, 16); 349 addr_len = sizeof(pj_sockaddr_in6); 350 addr_str_len = PJ_INET6_ADDRSTRLEN; 351 } else { 352 pj_assert(!"Unsupported address family"); 353 return PJ_EINVAL; 354 } 355 356 #if PJ_NATIVE_STRING_IS_UNICODE 357 rc = WSAAddressToString((LPSOCKADDR)&sock_addr, addr_len, 358 NULL, wtempaddr, addr_str_len); 359 if (rc == 0) { 360 pj_unicode_to_ansi(wtempaddr, wcslen(wtempaddr), dst, size); 361 } 362 #else 363 rc = WSAAddressToString((LPSOCKADDR)&sock_addr, addr_len, 364 NULL, dst, &addr_str_len); 365 #endif 366 367 if (rc != 0) { 368 pj_status_t status = pj_get_netos_error(); 369 if (status == PJ_SUCCESS) 370 status = PJ_EUNKNOWN; 371 372 return status; 373 } 374 375 return PJ_SUCCESS; 376 } 377 378 #elif !defined(PJ_HAS_IPV6) || PJ_HAS_IPV6==0 379 /* IPv6 support is disabled, just return error without raising assertion */ 380 return PJ_EIPV6NOTSUP; 381 #else 382 pj_assert(!"Not supported"); 383 return PJ_EIPV6NOTSUP; 212 384 #endif 213 385 } -
pjproject/trunk/pjlib/src/pj/sock_common.c
r1405 r1585 18 18 */ 19 19 #include <pj/sock.h> 20 21 PJ_DEF(pj_uint16_t) pj_AF_UNSPEC(void) 22 { 23 return PJ_AF_UNSPEC; 24 } 20 25 21 26 PJ_DEF(pj_uint16_t) pj_AF_UNIX(void) -
pjproject/trunk/pjlib/src/pjlib-test/sock.c
r1405 r1585 41 41 * - pj_inet_aton() 42 42 * - pj_inet_ntoa() 43 * - pj_inet_pton() (only if IPv6 is enabled) 44 * - pj_inet_ntop() (only if IPv6 is enabled) 43 45 * - pj_gethostname() 44 46 * - pj_sock_socket() … … 101 103 102 104 if (pj_strcmp2(&s, (char*)p) != 0) 103 return -30; 105 return -22; 106 107 #if defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0 108 /* pj_inet_pton() */ 109 /* pj_inet_ntop() */ 110 { 111 const pj_str_t s_ipv4 = pj_str("127.0.0.1"); 112 const pj_str_t s_ipv6 = pj_str("fe80::2ff:83ff:fe7c:8b42"); 113 char buf_ipv4[PJ_INET_ADDRSTRLEN]; 114 char buf_ipv6[PJ_INET6_ADDRSTRLEN]; 115 pj_in_addr ipv4; 116 pj_in6_addr ipv6; 117 118 if (pj_inet_pton(pj_AF_INET(), &s_ipv4, &ipv4) != PJ_SUCCESS) 119 return -24; 120 121 p = (unsigned char*)&ipv4; 122 if (p[0]!=A[0] || p[1]!=A[1] || p[2]!=A[2] || p[3]!=A[3]) { 123 return -25; 124 } 125 126 if (pj_inet_pton(pj_AF_INET6(), &s_ipv6, &ipv6) != PJ_SUCCESS) 127 return -26; 128 129 p = (unsigned char*)&ipv6; 130 if (p[0] != 0xfe || p[1] != 0x80 || p[2] != 0 || p[3] != 0 || 131 p[4] != 0 || p[5] != 0 || p[6] != 0 || p[7] != 0 || 132 p[8] != 0x02 || p[9] != 0xff || p[10] != 0x83 || p[11] != 0xff || 133 p[12]!=0xfe || p[13]!=0x7c || p[14] != 0x8b || p[15]!=0x42) 134 { 135 return -27; 136 } 137 138 if (pj_inet_ntop(pj_AF_INET(), &ipv4, buf_ipv4, sizeof(buf_ipv4)) != PJ_SUCCESS) 139 return -28; 140 if (pj_stricmp2(&s_ipv4, buf_ipv4) != 0) 141 return -29; 142 143 if (pj_inet_ntop(pj_AF_INET6(), &ipv6, buf_ipv6, sizeof(buf_ipv6)) != PJ_SUCCESS) 144 return -30; 145 if (pj_stricmp2(&s_ipv6, buf_ipv6) != 0) 146 return -31; 147 } 148 149 #endif /* PJ_HAS_IPV6 */ 104 150 105 151 /* Test that pj_sockaddr_in_init() initialize the whole structure,
Note: See TracChangeset
for help on using the changeset viewer.