blob: 25718ff4b5a1c198ecd8f159a1ed79e83d8d12ab [file] [log] [blame]
Alexander Couzensbeb10ef2016-11-01 22:05:13 +01001
2#ifndef UNIXSOCKET_PROTO_H
3#define UNIXSOCKET_PROTO_H
4
5/* The unix socket protocol is using a 2 byte header
6 * containg the version and type.
7 *
8 * header: | 1b version | 1b type |
9 *
10 * for data packets it would be
11 *
12 * data: | 0x1 | 0x0 | lapd ..|
13 * control: | 0x1 | 0x1 | control payload |
14 *
15 * Atm there is only one control packet:
16 * - set_altc (superchannel or timeslot)
17 *
18 * set_altc payload:
19 * | 4b magic | 1b new_state|
20 * | 0x23004200 | 0x0 | to timeslot
21 * | 0x23004200 | 0x1 | to superchannel
22 */
23
24#define UNIXSOCKET_PROTO_VERSION 0x1
25
26enum {
27 UNIXSOCKET_PROTO_DATA = 0x0,
28 UNIXSOCKET_PROTO_CONTROL = 0x1,
29};
30
31#endif /* UNIXSOCKET_PROTO_H */