annotate rvinterf/l1filter/init.c @ 970:3efb8d20794e

CHANGES: document fcup-smsend[mult] -e addition
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 01 Sep 2023 18:45:22 +0000
parents ea458ee48691
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
855
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
2 * This module implements some init for l1trace-filter.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 */
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #include <sys/types.h>
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #include <stdio.h>
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #include <stdlib.h>
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include <unistd.h>
855
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
9 #include "pktmux.h"
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
10 #include "localsock.h"
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 extern int sock;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 send_init_command(cmdpkt, cmdlen)
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 u_char *cmdpkt;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 {
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 u_char lenbuf[2];
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 lenbuf[0] = 0;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 lenbuf[1] = cmdlen;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 write(sock, lenbuf, 2);
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 write(sock, cmdpkt, cmdlen);
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 }
855
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
24
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
25 init()
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
26 {
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
27 static u_char want_l1_mux[2] = {CLI2RVI_WANT_MUXPROTO, RVT_L1_HEADER};
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
28
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
29 localsock_prep_for_length_rx();
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
30 send_init_command(want_l1_mux, 2);
ea458ee48691 rvinterf/l1filter: new program written, compiles
Mychaela Falconia <falcon@freecalypso.org>
parents: 422
diff changeset
31 }