diff rvinterf/asyncshell/rxctl.c @ 1011:820d34f3f3d7

fc-shell: added ability to receive and dump TCH packets
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 20 Mar 2016 21:10:21 +0000
parents c9f353b5d70c
children
line wrap: on
line diff
--- a/rvinterf/asyncshell/rxctl.c	Sun Mar 20 20:35:17 2016 +0000
+++ b/rvinterf/asyncshell/rxctl.c	Sun Mar 20 21:10:21 2016 +0000
@@ -45,6 +45,17 @@
 }
 
 void
+tch_rx_control(newstate)
+{
+	static int state = 0;
+
+	if (state == newstate)
+		return;
+	send_rxctl_cmd(RVT_TCH_HEADER, newstate);
+	state = newstate;
+}
+
+void
 rxctl_user_cmd(args, enable)
 	char *args;
 {
@@ -67,6 +78,8 @@
 			ati_rx_control(enable);
 		else if (!strcmp(np, "gpf"))
 			gpf_rx_control(enable);
+		else if (!strcmp(np, "tch"))
+			tch_rx_control(enable);
 		else {
 			printf("error: unknown channel \"%s\"\n", np);
 			return;