Ticket #399: Initial implementation of tool to perform NAT type detection/classification

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1495 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/build.symbian/pjnath.mmp b/build.symbian/pjnath.mmp
index 344aa44..4ab7c87 100644
--- a/build.symbian/pjnath.mmp
+++ b/build.symbian/pjnath.mmp
@@ -33,6 +33,7 @@
 SOURCE	errno.c
 SOURCE	ice_session.c
 SOURCE	ice_strans.c
+SOURCE	nat_detect.c
 SOURCE	stun_auth.c
 SOURCE	stun_msg.c
 SOURCE	stun_msg_dump.c
diff --git a/build.symbian/pjnathU.def b/build.symbian/pjnathU.def
index 6e9d8aa..1749f15 100644
--- a/build.symbian/pjnathU.def
+++ b/build.symbian/pjnathU.def
@@ -38,49 +38,50 @@
 	pj_stun_client_tsx_send_msg              @ 37 NONAME
 	pj_stun_client_tsx_set_data              @ 38 NONAME
 	pj_stun_create_key                       @ 39 NONAME
-	pj_stun_empty_attr_create                @ 40 NONAME
-	pj_stun_errcode_attr_create              @ 41 NONAME
-	pj_stun_get_attr_name                    @ 42 NONAME
-	pj_stun_get_class_name                   @ 43 NONAME
-	pj_stun_get_err_reason                   @ 44 NONAME
-	pj_stun_get_method_name                  @ 45 NONAME
-	pj_stun_msg_add_attr                     @ 46 NONAME
-	pj_stun_msg_add_binary_attr              @ 47 NONAME
-	pj_stun_msg_add_empty_attr               @ 48 NONAME
-	pj_stun_msg_add_errcode_attr             @ 49 NONAME
-	pj_stun_msg_add_msgint_attr              @ 50 NONAME
-	pj_stun_msg_add_sockaddr_attr            @ 51 NONAME
-	pj_stun_msg_add_string_attr              @ 52 NONAME
-	pj_stun_msg_add_uint64_attr              @ 53 NONAME
-	pj_stun_msg_add_uint_attr                @ 54 NONAME
-	pj_stun_msg_add_unknown_attr             @ 55 NONAME
-	pj_stun_msg_check                        @ 56 NONAME
-	pj_stun_msg_create                       @ 57 NONAME
-	pj_stun_msg_create_response              @ 58 NONAME
-	pj_stun_msg_decode                       @ 59 NONAME
-	pj_stun_msg_destroy_tdata                @ 60 NONAME
-	pj_stun_msg_dump                         @ 61 NONAME
-	pj_stun_msg_encode                       @ 62 NONAME
-	pj_stun_msg_find_attr                    @ 63 NONAME
-	pj_stun_msgint_attr_create               @ 64 NONAME
-	pj_stun_session_cancel_req               @ 65 NONAME
-	pj_stun_session_create                   @ 66 NONAME
-	pj_stun_session_create_ind               @ 67 NONAME
-	pj_stun_session_create_req               @ 68 NONAME
-	pj_stun_session_create_res               @ 69 NONAME
-	pj_stun_session_destroy                  @ 70 NONAME
-	pj_stun_session_get_user_data            @ 71 NONAME
-	pj_stun_session_on_rx_pkt                @ 72 NONAME
-	pj_stun_session_retransmit_req           @ 73 NONAME
-	pj_stun_session_send_msg                 @ 74 NONAME
-	pj_stun_session_set_credential           @ 75 NONAME
-	pj_stun_session_set_server_name          @ 76 NONAME
-	pj_stun_session_set_user_data            @ 77 NONAME
-	pj_stun_set_padding_char                 @ 78 NONAME
-	pj_stun_sockaddr_attr_create             @ 79 NONAME
-	pj_stun_string_attr_create               @ 80 NONAME
-	pj_stun_uint64_attr_create               @ 81 NONAME
-	pj_stun_uint_attr_create                 @ 82 NONAME
-	pj_stun_unknown_attr_create              @ 83 NONAME
-	pjnath_init                              @ 84 NONAME
-	pjnath_perror                            @ 85 NONAME
+	pj_stun_detect_nat_type                  @ 40 NONAME
+	pj_stun_empty_attr_create                @ 41 NONAME
+	pj_stun_errcode_attr_create              @ 42 NONAME
+	pj_stun_get_attr_name                    @ 43 NONAME
+	pj_stun_get_class_name                   @ 44 NONAME
+	pj_stun_get_err_reason                   @ 45 NONAME
+	pj_stun_get_method_name                  @ 46 NONAME
+	pj_stun_msg_add_attr                     @ 47 NONAME
+	pj_stun_msg_add_binary_attr              @ 48 NONAME
+	pj_stun_msg_add_empty_attr               @ 49 NONAME
+	pj_stun_msg_add_errcode_attr             @ 50 NONAME
+	pj_stun_msg_add_msgint_attr              @ 51 NONAME
+	pj_stun_msg_add_sockaddr_attr            @ 52 NONAME
+	pj_stun_msg_add_string_attr              @ 53 NONAME
+	pj_stun_msg_add_uint64_attr              @ 54 NONAME
+	pj_stun_msg_add_uint_attr                @ 55 NONAME
+	pj_stun_msg_add_unknown_attr             @ 56 NONAME
+	pj_stun_msg_check                        @ 57 NONAME
+	pj_stun_msg_create                       @ 58 NONAME
+	pj_stun_msg_create_response              @ 59 NONAME
+	pj_stun_msg_decode                       @ 60 NONAME
+	pj_stun_msg_destroy_tdata                @ 61 NONAME
+	pj_stun_msg_dump                         @ 62 NONAME
+	pj_stun_msg_encode                       @ 63 NONAME
+	pj_stun_msg_find_attr                    @ 64 NONAME
+	pj_stun_msgint_attr_create               @ 65 NONAME
+	pj_stun_session_cancel_req               @ 66 NONAME
+	pj_stun_session_create                   @ 67 NONAME
+	pj_stun_session_create_ind               @ 68 NONAME
+	pj_stun_session_create_req               @ 69 NONAME
+	pj_stun_session_create_res               @ 70 NONAME
+	pj_stun_session_destroy                  @ 71 NONAME
+	pj_stun_session_get_user_data            @ 72 NONAME
+	pj_stun_session_on_rx_pkt                @ 73 NONAME
+	pj_stun_session_retransmit_req           @ 74 NONAME
+	pj_stun_session_send_msg                 @ 75 NONAME
+	pj_stun_session_set_credential           @ 76 NONAME
+	pj_stun_session_set_server_name          @ 77 NONAME
+	pj_stun_session_set_user_data            @ 78 NONAME
+	pj_stun_set_padding_char                 @ 79 NONAME
+	pj_stun_sockaddr_attr_create             @ 80 NONAME
+	pj_stun_string_attr_create               @ 81 NONAME
+	pj_stun_uint64_attr_create               @ 82 NONAME
+	pj_stun_uint_attr_create                 @ 83 NONAME
+	pj_stun_unknown_attr_create              @ 84 NONAME
+	pjnath_init                              @ 85 NONAME
+	pjnath_perror                            @ 86 NONAME
diff --git a/build.symbian/pjsua_libU.def b/build.symbian/pjsua_libU.def
index 10df6be..39465fd 100644
--- a/build.symbian/pjsua_libU.def
+++ b/build.symbian/pjsua_libU.def
@@ -1,70 +1,70 @@
 EXPORTS
-	pjsip_cred_dup                           @ 1 NONAME
-	pjsua_acc_add                            @ 2 NONAME
-	pjsua_acc_add_local                      @ 3 NONAME
-	pjsua_acc_config_default                 @ 4 NONAME
-	pjsua_acc_create_request                 @ 5 NONAME
-	pjsua_acc_create_uac_contact             @ 6 NONAME
-	pjsua_acc_create_uas_contact             @ 7 NONAME
-	pjsua_acc_del                            @ 8 NONAME
-	pjsua_acc_enum_info                      @ 9 NONAME
-	pjsua_acc_find_for_incoming              @ 10 NONAME
-	pjsua_acc_find_for_outgoing              @ 11 NONAME
-	pjsua_acc_get_count                      @ 12 NONAME
-	pjsua_acc_get_default                    @ 13 NONAME
-	pjsua_acc_get_info                       @ 14 NONAME
-	pjsua_acc_is_valid                       @ 15 NONAME
-	pjsua_acc_modify                         @ 16 NONAME
-	pjsua_acc_set_default                    @ 17 NONAME
-	pjsua_acc_set_online_status              @ 18 NONAME
-	pjsua_acc_set_online_status2             @ 19 NONAME
-	pjsua_acc_set_registration               @ 20 NONAME
-	pjsua_acc_set_transport                  @ 21 NONAME
-	pjsua_buddy_add                          @ 22 NONAME
-	pjsua_buddy_config_default               @ 23 NONAME
-	pjsua_buddy_del                          @ 24 NONAME
-	pjsua_buddy_get_info                     @ 25 NONAME
-	pjsua_buddy_is_valid                     @ 26 NONAME
-	pjsua_buddy_subscribe_pres               @ 27 NONAME
-	pjsua_call_answer                        @ 28 NONAME
-	pjsua_call_dial_dtmf                     @ 29 NONAME
-	pjsua_call_dump                          @ 30 NONAME
-	pjsua_call_get_conf_port                 @ 31 NONAME
-	pjsua_call_get_count                     @ 32 NONAME
-	pjsua_call_get_info                      @ 33 NONAME
-	pjsua_call_get_max_count                 @ 34 NONAME
-	pjsua_call_get_user_data                 @ 35 NONAME
-	pjsua_call_hangup                        @ 36 NONAME
-	pjsua_call_hangup_all                    @ 37 NONAME
-	pjsua_call_has_media                     @ 38 NONAME
-	pjsua_call_is_active                     @ 39 NONAME
-	pjsua_call_make_call                     @ 40 NONAME
-	pjsua_call_reinvite                      @ 41 NONAME
-	pjsua_call_send_im                       @ 42 NONAME
-	pjsua_call_send_request                  @ 43 NONAME
-	pjsua_call_send_typing_ind               @ 44 NONAME
-	pjsua_call_set_hold                      @ 45 NONAME
-	pjsua_call_set_user_data                 @ 46 NONAME
-	pjsua_call_update                        @ 47 NONAME
-	pjsua_call_xfer                          @ 48 NONAME
-	pjsua_call_xfer_replaces                 @ 49 NONAME
-	pjsua_codec_get_param                    @ 50 NONAME
-	pjsua_codec_set_param                    @ 51 NONAME
-	pjsua_codec_set_priority                 @ 52 NONAME
-	pjsua_conf_add_port                      @ 53 NONAME
-	pjsua_conf_adjust_rx_level               @ 54 NONAME
-	pjsua_conf_adjust_tx_level               @ 55 NONAME
-	pjsua_conf_connect                       @ 56 NONAME
-	pjsua_conf_disconnect                    @ 57 NONAME
-	pjsua_conf_get_active_ports              @ 58 NONAME
-	pjsua_conf_get_max_ports                 @ 59 NONAME
-	pjsua_conf_get_port_info                 @ 60 NONAME
-	pjsua_conf_get_signal_level              @ 61 NONAME
-	pjsua_conf_remove_port                   @ 62 NONAME
-	pjsua_config_default                     @ 63 NONAME
-	pjsua_config_dup                         @ 64 NONAME
-	pjsua_create                             @ 65 NONAME
-	pjsua_destroy                            @ 66 NONAME
+	pjsua_acc_add                            @ 1 NONAME
+	pjsua_acc_add_local                      @ 2 NONAME
+	pjsua_acc_config_default                 @ 3 NONAME
+	pjsua_acc_create_request                 @ 4 NONAME
+	pjsua_acc_create_uac_contact             @ 5 NONAME
+	pjsua_acc_create_uas_contact             @ 6 NONAME
+	pjsua_acc_del                            @ 7 NONAME
+	pjsua_acc_enum_info                      @ 8 NONAME
+	pjsua_acc_find_for_incoming              @ 9 NONAME
+	pjsua_acc_find_for_outgoing              @ 10 NONAME
+	pjsua_acc_get_count                      @ 11 NONAME
+	pjsua_acc_get_default                    @ 12 NONAME
+	pjsua_acc_get_info                       @ 13 NONAME
+	pjsua_acc_is_valid                       @ 14 NONAME
+	pjsua_acc_modify                         @ 15 NONAME
+	pjsua_acc_set_default                    @ 16 NONAME
+	pjsua_acc_set_online_status              @ 17 NONAME
+	pjsua_acc_set_online_status2             @ 18 NONAME
+	pjsua_acc_set_registration               @ 19 NONAME
+	pjsua_acc_set_transport                  @ 20 NONAME
+	pjsua_buddy_add                          @ 21 NONAME
+	pjsua_buddy_config_default               @ 22 NONAME
+	pjsua_buddy_del                          @ 23 NONAME
+	pjsua_buddy_get_info                     @ 24 NONAME
+	pjsua_buddy_is_valid                     @ 25 NONAME
+	pjsua_buddy_subscribe_pres               @ 26 NONAME
+	pjsua_call_answer                        @ 27 NONAME
+	pjsua_call_dial_dtmf                     @ 28 NONAME
+	pjsua_call_dump                          @ 29 NONAME
+	pjsua_call_get_conf_port                 @ 30 NONAME
+	pjsua_call_get_count                     @ 31 NONAME
+	pjsua_call_get_info                      @ 32 NONAME
+	pjsua_call_get_max_count                 @ 33 NONAME
+	pjsua_call_get_user_data                 @ 34 NONAME
+	pjsua_call_hangup                        @ 35 NONAME
+	pjsua_call_hangup_all                    @ 36 NONAME
+	pjsua_call_has_media                     @ 37 NONAME
+	pjsua_call_is_active                     @ 38 NONAME
+	pjsua_call_make_call                     @ 39 NONAME
+	pjsua_call_reinvite                      @ 40 NONAME
+	pjsua_call_send_im                       @ 41 NONAME
+	pjsua_call_send_request                  @ 42 NONAME
+	pjsua_call_send_typing_ind               @ 43 NONAME
+	pjsua_call_set_hold                      @ 44 NONAME
+	pjsua_call_set_user_data                 @ 45 NONAME
+	pjsua_call_update                        @ 46 NONAME
+	pjsua_call_xfer                          @ 47 NONAME
+	pjsua_call_xfer_replaces                 @ 48 NONAME
+	pjsua_codec_get_param                    @ 49 NONAME
+	pjsua_codec_set_param                    @ 50 NONAME
+	pjsua_codec_set_priority                 @ 51 NONAME
+	pjsua_conf_add_port                      @ 52 NONAME
+	pjsua_conf_adjust_rx_level               @ 53 NONAME
+	pjsua_conf_adjust_tx_level               @ 54 NONAME
+	pjsua_conf_connect                       @ 55 NONAME
+	pjsua_conf_disconnect                    @ 56 NONAME
+	pjsua_conf_get_active_ports              @ 57 NONAME
+	pjsua_conf_get_max_ports                 @ 58 NONAME
+	pjsua_conf_get_port_info                 @ 59 NONAME
+	pjsua_conf_get_signal_level              @ 60 NONAME
+	pjsua_conf_remove_port                   @ 61 NONAME
+	pjsua_config_default                     @ 62 NONAME
+	pjsua_config_dup                         @ 63 NONAME
+	pjsua_create                             @ 64 NONAME
+	pjsua_destroy                            @ 65 NONAME
+	pjsua_detect_nat_type                    @ 66 NONAME
 	pjsua_dump                               @ 67 NONAME
 	pjsua_enum_accs                          @ 68 NONAME
 	pjsua_enum_buddies                       @ 69 NONAME
diff --git a/pjlib/include/pj/config_site_sample.h b/pjlib/include/pj/config_site_sample.h
index 6b02cd6..3aa0fac 100644
--- a/pjlib/include/pj/config_site_sample.h
+++ b/pjlib/include/pj/config_site_sample.h
@@ -24,6 +24,8 @@
 /*#   define PJMEDIA_HAS_ILBC_CODEC	0*/
 /*#   define PJMEDIA_HAS_SPEEX_CODEC	0*/
 #   define PJMEDIA_HAS_SPEEX_AEC	0
+#   undef PJMEDIA_RESAMPLE_IMP
+#   define PJMEDIA_RESAMPLE_IMP		PJMEDIA_RESAMPLE_LIBRESAMPLE
 #endif
 
 
diff --git a/pjnath/build/Makefile b/pjnath/build/Makefile
index a5369a9..42c8e12 100644
--- a/pjnath/build/Makefile
+++ b/pjnath/build/Makefile
@@ -30,7 +30,7 @@
 #
 export PJNATH_SRCDIR = ../src/pjnath
 export PJNATH_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
-		errno.o ice_session.o ice_strans.o stun_auth.o \
+		errno.o ice_session.o ice_strans.o nat_detect.o stun_auth.o \
 		stun_msg.o stun_msg_dump.o stun_session.o stun_transaction.o
 export PJNATH_CFLAGS += $(_CFLAGS)
 
diff --git a/pjnath/build/pjnath.dsp b/pjnath/build/pjnath.dsp
index cdffc4f..3f67130 100644
--- a/pjnath/build/pjnath.dsp
+++ b/pjnath/build/pjnath.dsp
@@ -40,6 +40,7 @@
 # PROP Output_Dir "./output/pjnath-i386-win32-vc6-release"

 # PROP Intermediate_Dir "./output/pjnath-i386-win32-vc6-release"

 # PROP Target_Dir ""

+F90=df.exe

 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c

 # ADD CPP /nologo /MD /W4 /GX /O1 /Ob2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /c

 # SUBTRACT CPP /YX

@@ -64,6 +65,7 @@
 # PROP Output_Dir "./output/pjnath-i386-win32-vc6-debug"

 # PROP Intermediate_Dir "./output/pjnath-i386-win32-vc6-debug"

 # PROP Target_Dir ""

+F90=df.exe

 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c

 # ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /GZ /c

 # SUBTRACT CPP /YX

@@ -99,6 +101,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\src\pjnath\nat_detect.c

+# End Source File

+# Begin Source File

+

 SOURCE=..\src\pjnath\stun_auth.c

 # End Source File

 # Begin Source File

@@ -139,6 +145,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\include\pjnath\nat_detect.h

+# End Source File

+# Begin Source File

+

 SOURCE=..\include\pjnath.h

 # End Source File

 # Begin Source File

diff --git a/pjnath/build/pjnath.vcproj b/pjnath/build/pjnath.vcproj
index 34f1778..47720b0 100644
--- a/pjnath/build/pjnath.vcproj
+++ b/pjnath/build/pjnath.vcproj
@@ -206,6 +206,10 @@
 				>

 			</File>

 			<File

+				RelativePath="..\src\pjnath\nat_detect.c"

+				>

+			</File>

+			<File

 				RelativePath="..\src\pjnath\stun_auth.c"

 				>

 				<FileConfiguration

@@ -337,6 +341,10 @@
 				>

 			</File>

 			<File

+				RelativePath="..\include\pjnath\nat_detect.h"

+				>

+			</File>

+			<File

 				RelativePath="..\include\pjnath.h"

 				>

 			</File>

diff --git a/pjnath/build/wince-evc4/pjnath_wince.vcp b/pjnath/build/wince-evc4/pjnath_wince.vcp
index d58e7aa..3c54468 100644
--- a/pjnath/build/wince-evc4/pjnath_wince.vcp
+++ b/pjnath/build/wince-evc4/pjnath_wince.vcp
@@ -390,8 +390,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -403,10 +407,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -642,8 +648,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -655,10 +665,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -1032,8 +1044,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -1045,10 +1061,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -1304,8 +1322,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -1317,10 +1339,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -1728,8 +1752,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -1741,10 +1769,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -2020,8 +2050,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -2033,10 +2067,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -2379,6 +2415,763 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\src\pjnath\nat_detect.c

+

+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"

+

+DEP_CPP_NAT_D=\

+	"..\..\..\pjlib\include\pj\addr_resolv.h"\

+	"..\..\..\pjlib\include\pj\array.h"\

+	"..\..\..\pjlib\include\pj\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

+	"..\..\..\pjlib\include\pj\compat\ctype.h"\

+	"..\..\..\pjlib\include\pj\compat\errno.h"\

+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\

+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\

+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\

+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

+	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\socket.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

+	"..\..\..\pjlib\include\pj\compat\string.h"\

+	"..\..\..\pjlib\include\pj\config.h"\

+	"..\..\..\pjlib\include\pj\config_site.h"\

+	"..\..\..\pjlib\include\pj\config_site_sample.h"\

+	"..\..\..\pjlib\include\pj\ctype.h"\

+	"..\..\..\pjlib\include\pj\errno.h"\

+	"..\..\..\pjlib\include\pj\except.h"\

+	"..\..\..\pjlib\include\pj\fifobuf.h"\

+	"..\..\..\pjlib\include\pj\file_access.h"\

+	"..\..\..\pjlib\include\pj\file_io.h"\

+	"..\..\..\pjlib\include\pj\guid.h"\

+	"..\..\..\pjlib\include\pj\hash.h"\

+	"..\..\..\pjlib\include\pj\ioqueue.h"\

+	"..\..\..\pjlib\include\pj\ip_helper.h"\

+	"..\..\..\pjlib\include\pj\list.h"\

+	"..\..\..\pjlib\include\pj\list_i.h"\

+	"..\..\..\pjlib\include\pj\lock.h"\

+	"..\..\..\pjlib\include\pj\log.h"\

+	"..\..\..\pjlib\include\pj\os.h"\

+	"..\..\..\pjlib\include\pj\pool.h"\

+	"..\..\..\pjlib\include\pj\pool_alt.h"\

+	"..\..\..\pjlib\include\pj\pool_buf.h"\

+	"..\..\..\pjlib\include\pj\pool_i.h"\

+	"..\..\..\pjlib\include\pj\rand.h"\

+	"..\..\..\pjlib\include\pj\rbtree.h"\

+	"..\..\..\pjlib\include\pj\sock.h"\

+	"..\..\..\pjlib\include\pj\sock_select.h"\

+	"..\..\..\pjlib\include\pj\string.h"\

+	"..\..\..\pjlib\include\pj\string_i.h"\

+	"..\..\..\pjlib\include\pj\timer.h"\

+	"..\..\..\pjlib\include\pj\types.h"\

+	"..\..\..\pjlib\include\pj\unicode.h"\

+	"..\..\..\pjlib\include\pjlib.h"\

+	"..\..\include\pjnath\config.h"\

+	"..\..\include\pjnath\errno.h"\

+	"..\..\include\pjnath\nat_detect.h"\

+	"..\..\include\pjnath\stun_auth.h"\

+	"..\..\include\pjnath\stun_config.h"\

+	"..\..\include\pjnath\stun_msg.h"\

+	"..\..\include\pjnath\stun_session.h"\

+	"..\..\include\pjnath\stun_transaction.h"\

+	"..\..\include\pjnath\types.h"\

+	

+

+!ENDIF 

+

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\src\pjnath\stun_auth.c

 

 !IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"

@@ -2456,8 +3249,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -2469,10 +3266,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -2720,8 +3519,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -2733,10 +3536,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -3123,13 +3928,18 @@
 	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\

 	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\

 	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\

+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\

 	"..\..\..\pjlib-util\include\pjlib-util\types.h"\

 	"..\..\..\pjlib\include\pj\addr_resolv.h"\

 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -3141,10 +3951,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -3395,13 +4207,18 @@
 	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\

 	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\

 	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\

+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\

 	"..\..\..\pjlib-util\include\pjlib-util\types.h"\

 	"..\..\..\pjlib\include\pj\addr_resolv.h"\

 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -3413,10 +4230,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -3805,8 +4624,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -3818,10 +4641,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -4057,8 +4882,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -4070,10 +4899,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -4445,8 +5276,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -4458,10 +5293,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -4709,8 +5546,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -4722,10 +5563,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -5111,8 +5954,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -5124,10 +5971,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -5371,8 +6220,12 @@
 	"..\..\..\pjlib\include\pj\array.h"\

 	"..\..\..\pjlib\include\pj\assert.h"\

 	"..\..\..\pjlib\include\pj\compat\assert.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_armcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_codew.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_gcce.h"\

 	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\

+	"..\..\..\pjlib\include\pj\compat\cc_mwcc.h"\

 	"..\..\..\pjlib\include\pj\compat\ctype.h"\

 	"..\..\..\pjlib\include\pj\compat\errno.h"\

 	"..\..\..\pjlib\include\pj\compat\high_precision.h"\

@@ -5384,10 +6237,12 @@
 	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\

 	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\

 	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\

+	"..\..\..\pjlib\include\pj\compat\os_symbian.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32.h"\

 	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\

 	"..\..\..\pjlib\include\pj\compat\setjmp.h"\

 	"..\..\..\pjlib\include\pj\compat\size_t.h"\

+	"..\..\..\pjlib\include\pj\compat\stdarg.h"\

 	"..\..\..\pjlib\include\pj\compat\string.h"\

 	"..\..\..\pjlib\include\pj\config.h"\

 	"..\..\..\pjlib\include\pj\config_site.h"\

@@ -5714,6 +6569,10 @@
 # End Source File

 # Begin Source File

 

+SOURCE=..\..\include\pjnath\nat_detect.h

+# End Source File

+# Begin Source File

+

 SOURCE=..\..\include\pjnath.h

 # End Source File

 # Begin Source File

diff --git a/pjnath/include/pjnath.h b/pjnath/include/pjnath.h
index 20fb28b..6c92505 100644
--- a/pjnath/include/pjnath.h
+++ b/pjnath/include/pjnath.h
@@ -21,6 +21,7 @@
 #include <pjnath/errno.h>
 #include <pjnath/ice_session.h>
 #include <pjnath/ice_strans.h>
+#include <pjnath/nat_detect.h>
 #include <pjnath/stun_auth.h>
 #include <pjnath/stun_config.h>
 #include <pjnath/stun_msg.h>
diff --git a/pjnath/include/pjnath/nat_detect.h b/pjnath/include/pjnath/nat_detect.h
new file mode 100644
index 0000000..014a891
--- /dev/null
+++ b/pjnath/include/pjnath/nat_detect.h
@@ -0,0 +1,95 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#ifndef __PJNATH_NAT_DETECT_H__
+#define __PJNATH_NAT_DETECT_H__
+
+/**
+ * @file ice_session.h
+ * @brief ICE session management
+ */
+#include <pjnath/stun_session.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJNATH_NAT_DETECT NAT Classification/Detection Tool
+ * @brief NAT Classification/Detection Tool
+ * @ingroup PJNATH_ICE
+ * @{
+ * This module provides one function to perform NAT classification and
+ * detection.
+ */
+
+/**
+ * This enumeration describes the NAT types.
+ */
+typedef enum pj_stun_nat_type
+{
+    PJ_STUN_NAT_TYPE_UNKNOWN,
+    PJ_STUN_NAT_TYPE_OPEN,
+    PJ_STUN_NAT_TYPE_BLOCKED,
+    PJ_STUN_NAT_TYPE_SYMMETRIC_UDP,
+    PJ_STUN_NAT_TYPE_FULL_CONE,
+    PJ_STUN_NAT_TYPE_SYMMETRIC,
+    PJ_STUN_NAT_TYPE_RESTRICTED,
+    PJ_STUN_NAT_TYPE_PORT_RESTRICTED
+} pj_stun_nat_type;
+
+
+/**
+ * This structure contains the result of NAT classification function.
+ */
+typedef struct pj_stun_nat_detect_result
+{
+    pj_status_t		 status;
+    const char		*status_text;
+    pj_stun_nat_type	 nat_type;
+    const char		*nat_type_name;
+} pj_stun_nat_detect_result;
+
+
+/**
+ * Type of callback to be called when the NAT detection function has
+ * completed.
+ */
+typedef void pj_stun_nat_detect_cb(void *user_data,
+				   const pj_stun_nat_detect_result *res);
+
+
+/**
+ * Perform NAT classification function.
+ */
+PJ_DECL(pj_status_t) pj_stun_detect_nat_type(const pj_sockaddr_in *server,
+					     pj_stun_config *stun_cfg,
+					     void *user_data,
+					     pj_stun_nat_detect_cb *cb);
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJNATH_NAT_DETECT_H__ */
+
diff --git a/pjnath/src/pjnath/nat_detect.c b/pjnath/src/pjnath/nat_detect.c
new file mode 100644
index 0000000..6d2c75f
--- /dev/null
+++ b/pjnath/src/pjnath/nat_detect.c
@@ -0,0 +1,663 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include <pjnath/nat_detect.h>
+#include <pjnath/errno.h>
+#include <pj/assert.h>
+#include <pj/ioqueue.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/timer.h>
+#include <pj/compat/socket.h>
+
+
+static const char *nat_type_names[] =
+{
+    "Unknown",
+    "Open Internet",
+    "Blocked",
+    "Symmetric UDP",
+    "Full Cone",
+    "Symmetric",
+    "Restricted",
+    "Port Restricted"
+};
+
+
+#define CHANGE_PORT	    (0x01 << 30)
+#define CHANGE_ADDR_PORT    (0x03 << 29)
+
+
+enum state
+{
+    ST_TEST_1,
+    ST_TEST_2,
+    ST_TEST_1B,
+    ST_TEST_3
+};
+
+typedef struct nat_detect_session
+{
+    pj_pool_t		    *pool;
+    pj_mutex_t		    *mutex;
+
+    pj_timer_heap_t	    *timer_heap;
+    pj_timer_entry	     destroy_timer;
+
+    void		    *user_data;
+    pj_stun_nat_detect_cb   *cb;
+    pj_sock_t		     sock;
+    pj_sockaddr_in	     local_addr;
+    pj_ioqueue_key_t	    *key;
+    pj_sockaddr_in	     server;
+    pj_sockaddr_in	    *cur_server;
+    pj_stun_session	    *stun_sess;
+    enum state		     state;
+
+    pj_ioqueue_op_key_t	     read_op, write_op;
+    pj_uint8_t		     rx_pkt[PJ_STUN_MAX_PKT_LEN];
+    pj_ssize_t		     rx_pkt_len;
+    pj_sockaddr_in	     src_addr;
+    int			     src_addr_len;
+
+    pj_bool_t		     test1_same_ip;
+    pj_sockaddr_in	     test1_ma;	    /* MAPPED-ADDRESS */
+    pj_sockaddr_in	     test1_ca;	    /* CHANGED-ADDRESS */
+
+} nat_detect_session;
+
+
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read);
+static void on_request_complete(pj_stun_session *sess,
+			        pj_status_t status,
+			        pj_stun_tx_data *tdata,
+			        const pj_stun_msg *response,
+				const pj_sockaddr_t *src_addr,
+				unsigned src_addr_len);
+static pj_status_t on_send_msg(pj_stun_session *sess,
+			       const void *pkt,
+			       pj_size_t pkt_size,
+			       const pj_sockaddr_t *dst_addr,
+			       unsigned addr_len);
+
+static pj_status_t start_test(nat_detect_session *sess,
+			      enum state state,
+			      const pj_sockaddr_in *alt_addr,
+			      pj_uint32_t change_flag);
+static void on_timer_destroy(pj_timer_heap_t *th,
+			     pj_timer_entry *te);
+static void sess_destroy(nat_detect_session *sess);
+
+static pj_status_t get_local_interface(const pj_sockaddr_in *server,
+				       pj_in_addr *local_addr)
+{
+    pj_sock_t sock;
+    pj_sockaddr_in tmp;
+    int addr_len;
+    pj_status_t status;
+
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pj_sock_bind_in(sock, 0, 0);
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(sock);
+	return status;
+    }
+
+    status = pj_sock_connect(sock, server, sizeof(pj_sockaddr_in));
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(sock);
+	return status;
+    }
+
+    addr_len = sizeof(pj_sockaddr_in);
+    status = pj_sock_getsockname(sock, &tmp, &addr_len);
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(sock);
+	return status;
+    }
+
+    local_addr->s_addr = tmp.sin_addr.s_addr;
+    
+    pj_sock_close(sock);
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_detect_nat_type(const pj_sockaddr_in *server,
+					    pj_stun_config *stun_cfg,
+					    void *user_data,
+					    pj_stun_nat_detect_cb *cb)
+{
+    pj_pool_t *pool;
+    nat_detect_session *sess;
+    pj_stun_session_cb sess_cb;
+    pj_ioqueue_callback ioqueue_cb;
+    int addr_len;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(server && stun_cfg, PJ_EINVAL);
+    PJ_ASSERT_RETURN(stun_cfg->pf && stun_cfg->ioqueue && stun_cfg->timer_heap,
+		     PJ_EINVAL);
+
+    /*
+     * Init NAT detection session.
+     */
+    pool = pj_pool_create(stun_cfg->pf, "natck%p", 512, 512, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    sess = PJ_POOL_ZALLOC_T(pool, nat_detect_session);
+    sess->pool = pool;
+    sess->user_data = user_data;
+    sess->cb = cb;
+
+    status = pj_mutex_create_recursive(pool, pool->obj_name, &sess->mutex);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+    
+    pj_memcpy(&sess->server, server, sizeof(pj_sockaddr_in));
+
+    /*
+     * Init timer to self-destroy.
+     */
+    sess->timer_heap = stun_cfg->timer_heap;
+    sess->destroy_timer.cb = &on_timer_destroy;
+    sess->destroy_timer.user_data = sess;
+
+
+    /*
+     * Initialize socket.
+     */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sess->sock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /*
+     * Bind to any.
+     */
+    pj_bzero(&sess->local_addr, sizeof(pj_sockaddr_in));
+    sess->local_addr.sin_family = PJ_AF_INET;
+    status = pj_sock_bind(sess->sock, &sess->local_addr, 
+			  sizeof(pj_sockaddr_in));
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /*
+     * Get local/bound address.
+     */
+    addr_len = sizeof(sess->local_addr);
+    status = pj_sock_getsockname(sess->sock, &sess->local_addr, &addr_len);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /*
+     * Find out which interface is used to send to the server.
+     */
+    status = get_local_interface(server, &sess->local_addr.sin_addr);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    PJ_LOG(5,(sess->pool->obj_name, "Local address is %s:%d",
+	      pj_inet_ntoa(sess->local_addr.sin_addr), 
+	      pj_ntohs(sess->local_addr.sin_port)));
+
+    /*
+     * Register socket to ioqueue to receive asynchronous input
+     * notification.
+     */
+    pj_bzero(&ioqueue_cb, sizeof(ioqueue_cb));
+    ioqueue_cb.on_read_complete = &on_read_complete;
+
+    status = pj_ioqueue_register_sock(sess->pool, stun_cfg->ioqueue, 
+				      sess->sock, sess, &ioqueue_cb,
+				      &sess->key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /*
+     * Create STUN session.
+     */
+    pj_bzero(&sess_cb, sizeof(sess_cb));
+    sess_cb.on_request_complete = &on_request_complete;
+    sess_cb.on_send_msg = &on_send_msg;
+    status = pj_stun_session_create(stun_cfg, pool->obj_name, &sess_cb,
+				    PJ_FALSE, &sess->stun_sess);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    pj_stun_session_set_user_data(sess->stun_sess, sess);
+
+    /*
+     * Kick-off ioqueue reading.
+     */
+    pj_ioqueue_op_key_init(&sess->read_op, sizeof(sess->read_op));
+    pj_ioqueue_op_key_init(&sess->write_op, sizeof(sess->write_op));
+    on_read_complete(sess->key, &sess->read_op, 0);
+
+    /*
+     * Start TEST_1
+     */
+    PJ_LOG(5,(sess->pool->obj_name, "Server set to %s:%d",
+	      pj_inet_ntoa(server->sin_addr), 
+	      pj_ntohs(server->sin_port)));
+
+    status = start_test(sess, ST_TEST_1, NULL, 0);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    return PJ_SUCCESS;
+
+on_error:
+    sess_destroy(sess);
+    return status;
+}
+
+
+static void sess_destroy(nat_detect_session *sess)
+{
+    if (sess->stun_sess) { 
+	pj_stun_session_destroy(sess->stun_sess);
+    }
+
+    if (sess->key) {
+	pj_ioqueue_unregister(sess->key);
+    } else if (sess->sock && sess->sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(sess->sock);
+    }
+
+    if (sess->mutex) {
+	pj_mutex_destroy(sess->mutex);
+    }
+
+    if (sess->pool) {
+	pj_pool_release(sess->pool);
+    }
+}
+
+
+static pj_status_t start_test(nat_detect_session *sess,
+			      enum state state,
+			      const pj_sockaddr_in *alt_addr,
+			      pj_uint32_t change_flag)
+{
+    pj_stun_tx_data *tdata;
+    pj_status_t status;
+
+    /* Create BIND request */
+    status = pj_stun_session_create_req(sess->stun_sess, 
+					PJ_STUN_BINDING_REQUEST,
+					NULL, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Add CHANGE-REQUEST attribute if necessary */
+    if (change_flag) {
+	status = pj_stun_msg_add_uint_attr(sess->pool, tdata->msg,
+					   PJ_STUN_ATTR_CHANGE_REQUEST,
+					   change_flag);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Configure alternate address */
+    if (alt_addr)
+	sess->cur_server = (pj_sockaddr_in*) alt_addr;
+    else
+	sess->cur_server = &sess->server;
+
+    /* Send the request */
+    status = pj_stun_session_send_msg(sess->stun_sess, PJ_TRUE, 
+				      sess->cur_server, 
+				      sizeof(pj_sockaddr_in),
+				      tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    sess->state = state;
+
+    return PJ_SUCCESS;
+}
+
+
+static void end_session(nat_detect_session *sess,
+			pj_status_t status,
+			pj_stun_nat_type nat_type)
+{
+    pj_stun_nat_detect_result result;
+    char errmsg[PJ_ERR_MSG_SIZE];
+    pj_time_val delay;
+
+    pj_bzero(&result, sizeof(result));
+    errmsg[0] = '\0';
+    result.status_text = errmsg;
+
+    result.status = status;
+    pj_strerror(status, errmsg, sizeof(errmsg));
+    result.nat_type = nat_type;
+    result.nat_type_name = nat_type_names[result.nat_type];
+
+    if (sess->cb)
+	(*sess->cb)(sess->user_data, &result);
+
+    delay.sec = 0;
+    delay.msec = 0;
+
+    pj_timer_heap_schedule(sess->timer_heap, &sess->destroy_timer, &delay);
+}
+
+
+/*
+ * Callback upon receiving packet from network.
+ */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read)
+{
+    nat_detect_session *sess;
+    pj_status_t status;
+
+    sess = (nat_detect_session *) pj_ioqueue_get_user_data(key);
+    pj_assert(sess != NULL);
+
+    pj_mutex_lock(sess->mutex);
+
+    if (bytes_read < 0) {
+	if (-bytes_read != PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) &&
+	    -bytes_read != PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) && 
+	    -bytes_read != PJ_STATUS_FROM_OS(OSERR_ECONNRESET)) 
+	{
+	    /* Permanent error */
+	    end_session(sess, -bytes_read, PJ_STUN_NAT_TYPE_UNKNOWN);
+	    goto on_return;
+	}
+
+    } else if (bytes_read > 0) {
+	pj_stun_session_on_rx_pkt(sess->stun_sess, sess->rx_pkt, bytes_read,
+				  PJ_STUN_IS_DATAGRAM|PJ_STUN_CHECK_PACKET, 
+				  NULL, &sess->src_addr, sess->src_addr_len);
+    }
+
+
+    sess->rx_pkt_len = sizeof(sess->rx_pkt);
+    sess->src_addr_len = sizeof(sess->src_addr);
+    status = pj_ioqueue_recvfrom(key, op_key, sess->rx_pkt, &sess->rx_pkt_len,
+				 PJ_IOQUEUE_ALWAYS_ASYNC, 
+				 &sess->src_addr, &sess->src_addr_len);
+
+    if (status != PJ_EPENDING) {
+	pj_assert(status != PJ_SUCCESS);
+	end_session(sess, status, PJ_STUN_NAT_TYPE_UNKNOWN);
+    }
+
+on_return:
+    pj_mutex_unlock(sess->mutex);
+}
+
+
+/*
+ * Callback to send outgoing packet from STUN session.
+ */
+static pj_status_t on_send_msg(pj_stun_session *stun_sess,
+			       const void *pkt,
+			       pj_size_t pkt_size,
+			       const pj_sockaddr_t *dst_addr,
+			       unsigned addr_len)
+{
+    nat_detect_session *sess;
+    pj_ssize_t pkt_len;
+
+    sess = (nat_detect_session*) pj_stun_session_get_user_data(stun_sess);
+
+    pkt_len = pkt_size;
+    return pj_ioqueue_sendto(sess->key, &sess->write_op, pkt, &pkt_len, 0,
+			     dst_addr, addr_len);
+
+}
+
+/*
+ * Callback upon request completion.
+ */
+static void on_request_complete(pj_stun_session *stun_sess,
+			        pj_status_t status,
+			        pj_stun_tx_data *tdata,
+			        const pj_stun_msg *response,
+				const pj_sockaddr_t *src_addr,
+				unsigned src_addr_len)
+{
+    nat_detect_session *sess;
+    pj_stun_sockaddr_attr *mattr = NULL;
+
+    PJ_UNUSED_ARG(tdata);
+    PJ_UNUSED_ARG(src_addr);
+    PJ_UNUSED_ARG(src_addr_len);
+
+    sess = (nat_detect_session*) pj_stun_session_get_user_data(stun_sess);
+
+    pj_mutex_lock(sess->mutex);
+
+    /* Find errors in the response */
+    if (status == PJ_SUCCESS) {
+
+	/* Check error message */
+	if (PJ_STUN_IS_ERROR_RESPONSE(response->hdr.type)) {
+	    pj_stun_errcode_attr *eattr;
+	    int err_code;
+
+	    eattr = (pj_stun_errcode_attr*)
+		    pj_stun_msg_find_attr(response, PJ_STUN_ATTR_ERROR_CODE, 0);
+
+	    if (eattr != NULL)
+		err_code = eattr->err_code;
+	    else
+		err_code = PJ_STUN_SC_SERVER_ERROR;
+
+	    status = PJ_STATUS_FROM_STUN_CODE(err_code);
+
+
+	} else {
+
+	    /* Get MAPPED-ADDRESS or XOR-MAPPED-ADDRESS */
+	    mattr = (pj_stun_sockaddr_attr*)
+		    pj_stun_msg_find_attr(response, PJ_STUN_ATTR_XOR_MAPPED_ADDR, 0);
+	    if (mattr == NULL) {
+		mattr = (pj_stun_sockaddr_attr*)
+			pj_stun_msg_find_attr(response, PJ_STUN_ATTR_MAPPED_ADDR, 0);
+	    }
+
+	    if (mattr == NULL) {
+		status = PJNATH_ESTUNNOMAPPEDADDR;
+	    }
+	}
+    }
+
+    /* Handle the test result according to RFC 3489 page 22:
+
+
+                        +--------+
+                        |  Test  |
+                        |   1    |
+                        +--------+
+                             |
+                             |
+                             V
+                            /\              /\
+                         N /  \ Y          /  \ Y             +--------+
+          UDP     <-------/Resp\--------->/ IP \------------->|  Test  |
+          Blocked         \ ?  /          \Same/              |   2    |
+                           \  /            \? /               +--------+
+                            \/              \/                    |
+                                             | N                  |
+                                             |                    V
+                                             V                    /\
+                                         +--------+  Sym.      N /  \
+                                         |  Test  |  UDP    <---/Resp\
+                                         |   2    |  Firewall   \ ?  /
+                                         +--------+              \  /
+                                             |                    \/
+                                             V                     |Y
+                  /\                         /\                    |
+   Symmetric  N  /  \       +--------+   N  /  \                   V
+      NAT  <--- / IP \<-----|  Test  |<--- /Resp\               Open
+                \Same/      |   1B   |     \ ?  /               Internet
+                 \? /       +--------+      \  /
+                  \/                         \/
+                  |                           |Y
+                  |                           |
+                  |                           V
+                  |                           Full
+                  |                           Cone
+                  V              /\
+              +--------+        /  \ Y
+              |  Test  |------>/Resp\---->Restricted
+              |   3    |       \ ?  /
+              +--------+        \  /
+                                 \/
+                                  |N
+                                  |       Port
+                                  +------>Restricted
+
+                 Figure 2: Flow for type discovery process
+     */
+
+    switch (sess->state) {
+    case ST_TEST_1:
+	if (status == PJ_SUCCESS) {
+	    pj_stun_changed_addr_attr *ca;
+
+	    /* Get CHANGED-ADDRESS attribute */
+	    ca = (pj_stun_changed_addr_attr*)
+		 pj_stun_msg_find_attr(response, PJ_STUN_ATTR_CHANGED_ADDR, 0);
+
+	    if (ca) {
+		pj_memcpy(&sess->test1_ca, &ca->sockaddr, 
+			  sizeof(pj_sockaddr_in));
+	    }
+
+	    /* Save mapped address */
+	    pj_memcpy(&sess->test1_ma, &mattr->sockaddr,
+		      sizeof(pj_sockaddr_in));
+
+	    /* Compare mapped address with local address */
+	    sess->test1_same_ip = (pj_memcmp(&sess->local_addr, &mattr->sockaddr,
+					     sizeof(pj_sockaddr_in))==0);
+	    
+	    /* Execute test 2:
+	     *  Send BINDING_REQUEST with both the "change IP" and "change port" 
+	     *  flags from the CHANGE-REQUEST attribute set
+	     */
+	    start_test(sess, ST_TEST_2, NULL, CHANGE_ADDR_PORT);
+
+	} else {
+	    /* Test 1 has completed with error.
+	     * Terminate our test session.
+	     */
+	    if (status == PJNATH_ESTUNTIMEDOUT)
+		end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_BLOCKED);
+	    else
+		end_session(sess, status, PJ_STUN_NAT_TYPE_UNKNOWN);
+	}
+	break;
+
+    case ST_TEST_2:
+	if (sess->test1_same_ip) {
+	    if (status == PJ_SUCCESS) {
+		end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_OPEN);
+	    } else if (status == PJNATH_ESTUNTIMEDOUT) {
+		end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_SYMMETRIC_UDP);
+	    } else {
+		end_session(sess, status, PJ_STUN_NAT_TYPE_UNKNOWN);
+	    }
+	} else {
+	    if (status == PJ_SUCCESS) {
+		end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_FULL_CONE);
+	    } else if (status == PJNATH_ESTUNTIMEDOUT) {
+		if (sess->test1_ca.sin_family == 0) {
+		    PJ_LOG(4,(sess->pool->obj_name, 
+			      "CHANGED-ADDRESS attribute not present in "
+			      "Binding response, unable to continue test"));
+		    end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_UNKNOWN);
+		} else {
+		    /* Execute TEST_1B */
+		    start_test(sess, ST_TEST_1B, &sess->test1_ca, 0);
+		}
+	    } else {
+		end_session(sess, status, PJ_STUN_NAT_TYPE_UNKNOWN);
+	    }
+	}
+	break;
+
+    case ST_TEST_1B:
+	if (status == PJ_SUCCESS) {
+	    int cmp;
+
+	    /* Compare MAPPED-ADDRESS with the one from TEST_1 */
+	    cmp = pj_memcmp(&mattr->sockaddr, &sess->test1_ma, 
+			    sizeof(pj_sockaddr_in));
+
+	    if (cmp!=0) {
+		/* Different address, this is symmetric NAT */
+		end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_SYMMETRIC);
+	    } else {
+		/* Same address. Check if this is port restricted.
+		 * Execute TEST_3
+		 */
+		start_test(sess, ST_TEST_3, NULL, CHANGE_PORT);
+	    }
+	} else {
+	    end_session(sess, status, PJ_STUN_NAT_TYPE_UNKNOWN);
+	}
+	break;
+
+    case ST_TEST_3:
+	if (status == PJ_SUCCESS) {
+	    end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_RESTRICTED);
+	} else if (status == PJNATH_ESTUNTIMEDOUT) {
+	    end_session(sess, PJ_SUCCESS, PJ_STUN_NAT_TYPE_PORT_RESTRICTED);
+	} else {
+	    end_session(sess, status, PJ_STUN_NAT_TYPE_UNKNOWN);
+	}
+	break;
+    }
+
+    pj_mutex_unlock(sess->mutex);
+}
+
+
+static void on_timer_destroy(pj_timer_heap_t *th,
+			     pj_timer_entry *te)
+{
+    nat_detect_session *sess;
+
+    PJ_UNUSED_ARG(th);
+
+    sess = (nat_detect_session*) te->user_data;
+
+    pj_mutex_lock(sess->mutex);
+    pj_ioqueue_unregister(sess->key);
+    sess->key = NULL;
+    pj_mutex_unlock(sess->mutex);
+
+    sess_destroy(sess);
+}
diff --git a/pjnath/src/pjstun-client/client_main.c b/pjnath/src/pjstun-client/client_main.c
index 578a582..ac82892 100644
--- a/pjnath/src/pjstun-client/client_main.c
+++ b/pjnath/src/pjstun-client/client_main.c
@@ -49,6 +49,8 @@
     pj_sockaddr_in	 relay_addr;
     char		 data_buf[256];
     char		*data;
+    pj_bool_t		 detect;
+    pj_status_t		 detect_result;
 } g;
 
 static struct options
@@ -152,6 +154,7 @@
 	int n;
 
 	pj_timer_heap_poll(g.th, NULL);
+	pj_ioqueue_poll(g.stun_config.ioqueue, &timeout);
 
 	PJ_FD_ZERO(&readset);
 	PJ_FD_SET(g.sock, &readset);
@@ -330,6 +333,10 @@
 	    return -1;
     }
 
+    status = pj_ioqueue_create(g.pool, 16, &g.stun_config.ioqueue);
+    if (status != PJ_SUCCESS)
+	return status;
+
     status = pj_thread_create(g.pool, "stun", &worker_thread, NULL, 
 			      0, 0, &g.thread);
     if (status != PJ_SUCCESS)
@@ -587,9 +594,42 @@
 
 }
 
+
+static void nat_detect_cb(void *user_data,
+			  const pj_stun_nat_detect_result *res)
+{
+    g.detect_result = res->status;
+
+    if (res->status == PJ_SUCCESS) {
+	PJ_LOG(3,(THIS_FILE, "NAT successfully detected as %s", res->nat_type_name));
+    } else {
+	PJ_LOG(2,(THIS_FILE, "Error detecting NAT type: %s", res->status_text));
+    }
+}
+
+static pj_status_t perform_detection()
+{
+    pj_status_t status;
+
+    g.detect_result = PJ_EPENDING;
+    status = pj_stun_detect_nat_type(&g.srv_addr, &g.stun_config, NULL, 
+				     &nat_detect_cb);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    while (g.detect_result == PJ_EPENDING)
+	pj_thread_sleep(100);
+
+    status = g.detect_result;
+
+    return status;
+}
+
+
 static void menu(void)
 {
     puts("Menu:");
+    puts("  d       Perform NAT detection");
     printf("  pr      Set peer address (currently %s:%d)\n",
 	   pj_inet_ntoa(g.peer_addr.sin_addr), pj_ntohs(g.peer_addr.sin_port));
     printf("  dt      Set data (currently \"%s\")\n", g.data);
@@ -616,7 +656,9 @@
 
 	fgets(input, sizeof(input), stdin);
 	
-	if (0) {
+	if (input[0] == 'd' && (input[1]=='\r' || input[1]=='\n')) {
+
+	    perform_detection();
 
 	} else if (input[0]=='d' && input[1]=='t') {
 	    printf("Input data: ");
@@ -663,6 +705,7 @@
     puts("where TARGET is \"host[:port]\"");
     puts("");
     puts("and OPTIONS:");
+    puts(" --detect, -d      Perform NAT type detection first");
     puts(" --realm, -r       Set realm of the credential");
     puts(" --username, -u    Set username of the credential");
     puts(" --password, -p    Set password of the credential");
@@ -676,6 +719,7 @@
 int main(int argc, char *argv[])
 {
     struct pj_getopt_option long_options[] = {
+	{ "detect",	0, 0, 'd'},
 	{ "realm",	1, 0, 'r'},
 	{ "username",	1, 0, 'u'},
 	{ "password",	1, 0, 'p'},
@@ -692,8 +736,11 @@
     g.data = g.data_buf;
     pj_ansi_strcpy(g.data, "Hello world");
 
-    while((c=pj_getopt_long(argc,argv, "r:u:p:N:hF", long_options, &opt_id))!=-1) {
+    while((c=pj_getopt_long(argc,argv, "r:u:p:N:dhF", long_options, &opt_id))!=-1) {
 	switch (c) {
+	case 'd':
+	    g.detect = PJ_TRUE;
+	    break;
 	case 'r':
 	    o.realm = pj_optarg;
 	    break;
@@ -743,6 +790,12 @@
     if (status != PJ_SUCCESS)
 	goto on_return;
     
+    if (g.detect) {
+	status = perform_detection();
+	if (status != PJ_SUCCESS)
+	    goto on_return;
+    }
+
     console_main();
 
 on_return:
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c
index 919a190..cc3caca 100644
--- a/pjsip-apps/src/pjsua/pjsua_app.c
+++ b/pjsip-apps/src/pjsua/pjsua_app.c
@@ -19,7 +19,7 @@
 #include <pjsua-lib/pjsua.h>
 
 
-#define THIS_FILE	"pjsua.c"
+#define THIS_FILE	"pjsua_app.c"
 #define NO_LIMIT	(int)0x7FFFFFFF
 
 //#define STEREO_DEMO
@@ -2307,6 +2307,33 @@
 }
 
 
+/* Callback upon NAT detection completion */
+static void nat_detect_cb(void *user_data,
+			  const pj_stun_nat_detect_result *res)
+{
+    PJ_UNUSED_ARG(user_data);
+
+    if (res->status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "NAT detection failed", res->status);
+    } else {
+	PJ_LOG(3, (THIS_FILE, "NAT detected as %s", res->nat_type_name));
+    }
+}
+
+
+/*
+ * Detect NAT type.
+ */
+static void detect_nat_type(void)
+{
+    pj_status_t status;
+
+    status = pjsua_detect_nat_type(NULL, &nat_detect_cb);
+    if (status != PJ_SUCCESS)
+	pjsua_perror(THIS_FILE, "Error", status);
+}
+
+
 /*
  * Main "user interface" loop.
  */
@@ -2420,6 +2447,10 @@
 	    }
 	    break;
 
+	case 'n':
+	    detect_nat_type();
+	    break;
+
 	case 'i':
 	    /* Send instant messaeg */
 
@@ -3473,6 +3504,9 @@
 	return status;
     }
 
+    if (app_config.cfg.stun_domain.slen || app_config.cfg.stun_host.slen)
+	detect_nat_type();
+
     console_app_main(&uri_arg);
 
     return PJ_SUCCESS;
diff --git a/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp b/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp
index 81e47f3..0367d3b 100644
--- a/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp
+++ b/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp
@@ -56,7 +56,7 @@
 #if 0
 	// Use this to have the STUN server resolved normally
 #   define STUN_DOMAIN	NULL
-#   define STUN_SERVER	"stun.fwdnet.net"
+#   define STUN_SERVER	"192.168.0.2"
 #elif 0
 	// Use this to have the STUN server resolved with DNS SRV
 #   define STUN_DOMAIN	"iptel.org"
@@ -515,6 +515,25 @@
 }
 
 
+/* Callback upon NAT detection completion */
+static void nat_detect_cb(void *user_data,
+			  const pj_stun_nat_detect_result *res)
+{
+    PJ_UNUSED_ARG(user_data);
+
+    if (res->status != PJ_SUCCESS) {
+	char msg[250];
+	pj_ansi_snprintf(msg, sizeof(msg), "NAT detection failed: %s",
+			 res->status_text);
+	SetCallStatus(msg, pj_ansi_strlen(msg));
+    } else {
+	char msg[250];
+	pj_ansi_snprintf(msg, sizeof(msg), "NAT type is %s",
+			 res->nat_type_name);
+	SetCallStatus(msg, pj_ansi_strlen(msg));
+    }
+}
+
 
 BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
 {
@@ -548,6 +567,8 @@
 	CommandBar_Show(hwndCB, TRUE);
 
     SetTimer(hMainWnd, ID_POLL_TIMER, 50, NULL);
+
+    pjsua_detect_nat_type(NULL, &nat_detect_cb);
     return TRUE;
 }
 
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 91856d2..ea16d6b 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -40,6 +40,9 @@
 /* Include all PJSIP-SIMPLE headers */
 #include <pjsip_simple.h>
 
+/* Include all PJNATH headers */
+#include <pjnath.h>
+
 /* Include all PJLIB-UTIL headers. */
 #include <pjlib-util.h>
 
@@ -1310,6 +1313,24 @@
  */
 
 /**
+ * This is a utility function to detect NAT type in front of this
+ * endpoint. Once invoked successfully, this function will complete 
+ * asynchronously and report the result in the callback.
+ *
+ * @param srv_port	Optional STUN server and port, in "SERVER[:PORT]"
+ *			format. If this option is NULL, the function will use
+ *			the STUN server that has been set in the pjsua
+ *			configuration.
+ * @param user_data	User data to be returned back in the callback.
+ * @param cb		Optional callback to report the detection result.
+ *
+ * @return		PJ_SUCCESS if detection is started successfully.
+ */
+PJ_DECL(pj_status_t) pjsua_detect_nat_type(void *user_data,
+					   pj_stun_nat_detect_cb *cb);
+
+
+/**
  * This is a utility function to verify that valid SIP url is given. If the
  * URL is valid, PJ_SUCCESS will be returned.
  *
diff --git a/pjsip/src/pjsua-lib/pjsua_core.c b/pjsip/src/pjsua-lib/pjsua_core.c
index 29cee19..321d340 100644
--- a/pjsip/src/pjsua-lib/pjsua_core.c
+++ b/pjsip/src/pjsua-lib/pjsua_core.c
@@ -678,6 +678,7 @@
 
 
     /* Start resolving STUN server */
+
     status = pjsua_resolve_stun_server(PJ_FALSE);
     if (status != PJ_SUCCESS && status != PJ_EPENDING) {
 	pjsua_perror(THIS_FILE, "Error resolving STUN server", status);
@@ -938,22 +939,27 @@
 		port = 3478;
 	    }
 
+	    pjsua_var.stun_status = 
+		pj_sockaddr_in_init(&pjsua_var.stun_srv.ipv4, &str_host, 
+				    (pj_uint16_t)port);
 
-	    pjsua_var.stun_status = pj_gethostbyname(&str_host, &he);
+	    if (pjsua_var.stun_status != PJ_SUCCESS) {
+		pjsua_var.stun_status = pj_gethostbyname(&str_host, &he);
 
-	    if (pjsua_var.stun_status == PJ_SUCCESS) {
-		pj_sockaddr_in_init(&pjsua_var.stun_srv.ipv4, NULL, 0);
-		pjsua_var.stun_srv.ipv4.sin_addr = *(pj_in_addr*)he.h_addr;
-		pjsua_var.stun_srv.ipv4.sin_port = pj_htons((pj_uint16_t)port);
-
-		PJ_LOG(3,(THIS_FILE, 
-			  "STUN server %.*s resolved, address is %s:%d",
-			  (int)pjsua_var.ua_cfg.stun_host.slen,
-			  pjsua_var.ua_cfg.stun_host.ptr,
-			  pj_inet_ntoa(pjsua_var.stun_srv.ipv4.sin_addr),
-			  (int)pj_ntohs(pjsua_var.stun_srv.ipv4.sin_port)));
+		if (pjsua_var.stun_status == PJ_SUCCESS) {
+		    pj_sockaddr_in_init(&pjsua_var.stun_srv.ipv4, NULL, 0);
+		    pjsua_var.stun_srv.ipv4.sin_addr = *(pj_in_addr*)he.h_addr;
+		    pjsua_var.stun_srv.ipv4.sin_port = pj_htons((pj_uint16_t)port);
+		}
 	    }
 
+	    PJ_LOG(3,(THIS_FILE, 
+		      "STUN server %.*s resolved, address is %s:%d",
+		      (int)pjsua_var.ua_cfg.stun_host.slen,
+		      pjsua_var.ua_cfg.stun_host.ptr,
+		      pj_inet_ntoa(pjsua_var.stun_srv.ipv4.sin_addr),
+		      (int)pj_ntohs(pjsua_var.stun_srv.ipv4.sin_port)));
+
 	}
 	/* Otherwise disable STUN. */
 	else {
@@ -1853,6 +1859,31 @@
 
 
 /*
+ * Detect NAT type.
+ */
+PJ_DEF(pj_status_t) pjsua_detect_nat_type( void *user_data,
+					   pj_stun_nat_detect_cb *cb)
+{
+    pj_status_t status;
+
+    /* Make sure STUN server resolution has completed */
+    status = pjsua_resolve_stun_server(PJ_TRUE);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    /* Make sure we have STUN */
+    if (pjsua_var.stun_srv.ipv4.sin_family == 0) {
+	return PJ_EINVALIDOP;
+    }
+
+    return pj_stun_detect_nat_type(&pjsua_var.stun_srv.ipv4, 
+				   &pjsua_var.stun_cfg, 
+				   user_data, cb);
+}
+
+
+/*
  * Verify that valid SIP url is given.
  */
 PJ_DEF(pj_status_t) pjsua_verify_sip_url(const char *c_url)