FreeCalypso > hg > freecalypso-tools
comparison rvinterf/tmsh/etmbasic.c @ 69:2159f260ed13
fc-tmsh: all commands internally return values
in preparation for adding one-shot mode of operation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 26 Oct 2016 23:17:03 +0000 |
parents | 585f63e5bca6 |
children | 5380872923a6 |
comparison
equal
deleted
inserted
replaced
68:585f63e5bca6 | 69:2159f260ed13 |
---|---|
9 #include <stdlib.h> | 9 #include <stdlib.h> |
10 #include "pktmux.h" | 10 #include "pktmux.h" |
11 #include "limits.h" | 11 #include "limits.h" |
12 #include "etm.h" | 12 #include "etm.h" |
13 #include "tm3.h" | 13 #include "tm3.h" |
14 #include "exitcodes.h" | |
14 | 15 |
15 extern u_char rvi_msg[]; | 16 extern u_char rvi_msg[]; |
16 extern int rvi_msg_len; | 17 extern int rvi_msg_len; |
17 | 18 |
18 void | 19 void |
70 default: | 71 default: |
71 print_etm_pkt_raw("TM unknown"); | 72 print_etm_pkt_raw("TM unknown"); |
72 } | 73 } |
73 } | 74 } |
74 | 75 |
75 void | |
76 cmd_tmpkt(argc, argv) | 76 cmd_tmpkt(argc, argv) |
77 char **argv; | 77 char **argv; |
78 { | 78 { |
79 u_char pkt[MAX_PKT_TO_TARGET]; | 79 u_char pkt[MAX_PKT_TO_TARGET]; |
80 int di, c, b; | 80 int di, c, b; |
88 pkt[di++] = b; | 88 pkt[di++] = b; |
89 c ^= b; | 89 c ^= b; |
90 } | 90 } |
91 pkt[di++] = c; | 91 pkt[di++] = c; |
92 send_pkt_to_target(pkt, di); | 92 send_pkt_to_target(pkt, di); |
93 return(0); | |
93 } | 94 } |
94 | 95 |
95 void | 96 void |
96 send_etm_cmd(buf, len) | 97 send_etm_cmd(buf, len) |
97 u_char *buf; | 98 u_char *buf; |