comparison rvinterf/l1filter/init.c @ 855:ea458ee48691

rvinterf/l1filter: new program written, compiles
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 09 Nov 2021 23:14:22 +0000
parents rvinterf/libasync/init.c@c1aadfcd185f
children
comparison
equal deleted inserted replaced
854:74331b35b1da 855:ea458ee48691
1 /*
2 * This module implements some init for l1trace-filter.
3 */
4
5 #include <sys/types.h>
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <unistd.h>
9 #include "pktmux.h"
10 #include "localsock.h"
11
12 extern int sock;
13
14 send_init_command(cmdpkt, cmdlen)
15 u_char *cmdpkt;
16 {
17 u_char lenbuf[2];
18
19 lenbuf[0] = 0;
20 lenbuf[1] = cmdlen;
21 write(sock, lenbuf, 2);
22 write(sock, cmdpkt, cmdlen);
23 }
24
25 init()
26 {
27 static u_char want_l1_mux[2] = {CLI2RVI_WANT_MUXPROTO, RVT_L1_HEADER};
28
29 localsock_prep_for_length_rx();
30 send_init_command(want_l1_mux, 2);
31 }