FreeCalypso > hg > freecalypso-sw
comparison rvinterf/lowlevel/clientcmd.c @ 266:cb833ff54d88
rvinterf: CLI2RVI_RESET_PACKET_RX command implemented
| author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
|---|---|
| date | Thu, 06 Feb 2014 01:10:13 +0000 |
| parents | 2f285f20d617 |
| children | 2682003dcba7 |
comparison
equal
deleted
inserted
replaced
| 265:4c416868524a | 266:cb833ff54d88 |
|---|---|
| 36 cli->rx_buf[2] << 16 | | 36 cli->rx_buf[2] << 16 | |
| 37 cli->rx_buf[3] << 8 | cli->rx_buf[4]; | 37 cli->rx_buf[3] << 8 | cli->rx_buf[4]; |
| 38 cli->int_rvt_match[c] = cli->rx_buf[5] << 24 | | 38 cli->int_rvt_match[c] = cli->rx_buf[5] << 24 | |
| 39 cli->rx_buf[6] << 16 | | 39 cli->rx_buf[6] << 16 | |
| 40 cli->rx_buf[7] << 8 | cli->rx_buf[8]; | 40 cli->rx_buf[7] << 8 | cli->rx_buf[8]; |
| 41 #if 0 | |
| 41 sprintf(logmsg, | 42 sprintf(logmsg, |
| 42 "*** Client program interested in RVT mask %08X match %08X", | 43 "*** Client program interested in RVT mask %08X match %08X", |
| 43 cli->int_rvt_mask[c], cli->int_rvt_match[c]); | 44 cli->int_rvt_mask[c], cli->int_rvt_match[c]); |
| 44 output_line(logmsg); | 45 output_line(logmsg); |
| 46 #endif | |
| 45 cli->int_rvt_count++; | 47 cli->int_rvt_count++; |
| 46 send_local_msg_to_client(cli, "+OK"); | 48 send_local_msg_to_client(cli, "+OK"); |
| 47 return; | 49 return; |
| 48 case CLI2RVI_WANT_MUXPROTO: | 50 case CLI2RVI_WANT_MUXPROTO: |
| 49 if (cli->rx_msglen != 2) { | 51 if (cli->rx_msglen != 2) { |
| 53 if (cli->rx_buf[1] < 0x12 || cli->rx_buf[1] > 0x18) { | 55 if (cli->rx_buf[1] < 0x12 || cli->rx_buf[1] > 0x18) { |
| 54 send_local_msg_to_client(cli, | 56 send_local_msg_to_client(cli, |
| 55 "-Unsupported protocol MUX value"); | 57 "-Unsupported protocol MUX value"); |
| 56 return; | 58 return; |
| 57 } | 59 } |
| 60 #if 0 | |
| 58 sprintf(logmsg, | 61 sprintf(logmsg, |
| 59 "*** Client program interested in MUX proto %02X", | 62 "*** Client program interested in MUX proto %02X", |
| 60 cli->rx_buf[1]); | 63 cli->rx_buf[1]); |
| 61 output_line(logmsg); | 64 output_line(logmsg); |
| 65 #endif | |
| 62 cli->int_proto[cli->rx_buf[1] - 0x12] = 1; | 66 cli->int_proto[cli->rx_buf[1] - 0x12] = 1; |
| 67 send_local_msg_to_client(cli, "+OK"); | |
| 68 return; | |
| 69 case CLI2RVI_RESET_PACKET_RX: | |
| 70 cli->int_rvt_count = 0; | |
| 71 bzero(cli->int_proto, sizeof(cli->int_proto)); | |
| 63 send_local_msg_to_client(cli, "+OK"); | 72 send_local_msg_to_client(cli, "+OK"); |
| 64 return; | 73 return; |
| 65 case CLI2RVI_PKT_TO_TARGET: | 74 case CLI2RVI_PKT_TO_TARGET: |
| 66 c = cli->rx_msglen - 1; | 75 c = cli->rx_msglen - 1; |
| 67 if (c < 1 || c > MAX_PKT_TO_TARGET) { | 76 if (c < 1 || c > MAX_PKT_TO_TARGET) { |
