[Bugfix][T108][bug-view-1367] not support gsw set vlan info
Only Configure: No
Affected branch: unknown
Affected module: rtp
Is it affected on both ZXIC and ASR: only ASR
Self-test: yes
Doc Update: no
Change-Id: I9cf849d46788e7de7d4be26a8b00143faf1a2fe8
diff --git a/mbtk/test/libgsw_lib/gsw_voice_test.c b/mbtk/test/libgsw_lib/gsw_voice_test.c
index 894ac86..366b58a 100755
--- a/mbtk/test/libgsw_lib/gsw_voice_test.c
+++ b/mbtk/test/libgsw_lib/gsw_voice_test.c
@@ -118,6 +118,7 @@
int32_t (*gsw_voice_set_remote_rtp_ip)(const char *ip, int32_t len);
int32_t (*gsw_voice_set_rtp_port)(RTPMode rtpMode, int32_t port);
int32_t (*gsw_voice_set_rtp_param)(int32_t clockRate, int32_t channel, int32_t latency);
+int32_t (*gsw_voice_set_rtp_vlan_info)(const char *interfaceName);
/*#############################rtp end*/
CallHandle call_handle;
@@ -166,9 +167,9 @@
return -1;
}
- gsw_voice_get_current_call_end_reason = (int32_t (*)(CallHandle handle))dlsym(dlHandle_voice, "gsw_voice_get_current_call_end_reason");
- if(gsw_voice_get_current_call_end_reason == NULL) {
- printf("dlsym gsw_voice_get_current_call_end_reason failed: %s\n", dlerror());
+ gsw_voice_set_rtp_vlan_info = (int32_t (*)(const char *interfaceName))dlsym(dlHandle_voice, "gsw_voice_set_rtp_vlan_info");
+ if(gsw_voice_set_rtp_vlan_info == NULL) {
+ printf("dlsym gsw_voice_set_rtp_vlan_info failed: %s\n", dlerror());
return -1;
}
@@ -223,6 +224,12 @@
return -1;
}
+ gsw_voice_get_current_call_end_reason = (int32_t (*)(CallHandle handle))dlsym(dlHandle_voice, "gsw_voice_get_current_call_end_reason");
+ if(gsw_voice_get_current_call_end_reason == NULL) {
+ printf("dlsym gsw_voice_get_current_call_end_reason failed: %s\n", dlerror());
+ return -1;
+ }
+
return gsw_rtp_api_import();
}
@@ -248,7 +255,8 @@
"\t8 set remote rtp ip\n"
"\t9 set rtp port\n"
"\t10 set rtp param\n"
- "\t11 get current call end reason\n"
+ "\t11 set rtp vlan\n"
+ "\t12 get current call end reason\n"
"operator: >> \n");
memset(operator, 0, sizeof(operator));
@@ -473,9 +481,31 @@
}
}
break;
+ case 11:
+ {
+ printf(">>>>>Input gsw_voice_set_rtp_vlan_info<<<<<\n");
+
+ char interface[100] = {0};
+
+ printf("Enter vlan interface info (for example: eth2.4) \n");
+ printf("%d\n",scanf("%s", interface));
+ fflush(stdin);
+ printf("vlan interface is %s\n", interface);
+
+ ret = gsw_voice_set_rtp_vlan_info(interface);
+ if(ret != 0)
+ {
+ printf("gsw_voice_set_rtp_vlan_info fail\n");
+ }
+ else
+ {
+ printf("gsw_voice_set_rtp_vlan_info success\n");
+ }
+ }
+ break;
/*#############################rtp end*/
- case 11:
+ case 12:
{
printf(">>>>gsw_voice_get_current_call_end_reason<<<\n");
ret = gsw_voice_get_current_call_end_reason(call_handle);