FreeCalypso > hg > freecalypso-tools
annotate rvinterf/tmsh/audioresp.c @ 159:8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 17 Mar 2017 07:34:29 +0000 |
parents | |
children | e4c98a2c1673 |
rev | line source |
---|---|
159
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * In this module we are going to implement the handling of ETM_AUDIO responses. |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <sys/types.h> |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdio.h> |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <string.h> |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include <strings.h> |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include <stdlib.h> |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include "pktmux.h" |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #include "limits.h" |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include "localtypes.h" |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #include "etm.h" |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 extern u_char rvi_msg[]; |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 extern int rvi_msg_len; |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 static void |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 aul_response() |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 { |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 print_etm_pkt_raw("aul response"); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 } |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 static void |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 aus_response() |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 { |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 print_etm_pkt_raw("aus response"); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 } |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 static void |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 aur_response() |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 { |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 print_etm_pkt_raw("aur response"); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 } |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 static void |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 auw_response() |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 { |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 print_etm_pkt_raw("auw response"); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 } |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 void |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 etm_audio_msg_rx() |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 { |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 switch (rvi_msg[4]) { |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 case 'L': |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 aul_response(); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 return; |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 case 'S': |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 aus_response(); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 return; |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 case 'R': |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 aur_response(); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 return; |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 case 'W': |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 auw_response(); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 return; |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 default: |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 unknown: |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 print_etm_pkt_raw("ETM_AUDIO"); |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 } |
8fac4aaec230
fc-tmsh: beginning of intelligent ETM_AUDIO response handling
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 } |