Annotation of ansh/inc/proto.h, revision 1.1.1.1.2.2
1.1 misho 1: /*************************************************************************
2: * (C) 2011 AITNET - Sofia/Bulgaria - <office@aitnet.org>
3: * by Michael Pounov <misho@elwix.org>
4: *
5: * $Author: misho $
1.1.1.1.2.2! misho 6: * $Id: proto.h,v 1.1.1.1.2.1 2011/10/07 13:41:26 misho Exp $
1.1 misho 7: *
8: *************************************************************************/
9: #ifndef __PROTO_H
10: #define __PROTO_H
11:
12:
13: #define ANSH_CODE 42
14: #define ANSH_VERSION 1
15: #define ANSH_ID 0x4224
16:
17: #define ANSH_FLG_ERR -1
18: #define ANSH_FLG_OK 0
19: #define ANSH_FLG_EOF 1
20: #define ANSH_FLG_CPOUT 2
21: #define ANSH_FLG_WINZ 3
22:
23: #define ANSH_FLG_GET(x) ((x) & 0xf)
24:
25:
26: struct ansh_hdr {
27: uint8_t ansh_ver;
28: int8_t ansh_flg;
29: uint16_t ansh_len;
1.1.1.1.2.1 misho 30: uint32_t ansh_nonce;
1.1.1.1.2.2! misho 31: uint32_t ansh_seq;
1.1 misho 32: uint32_t ansh_crc;
33: } __attribute__((packed));
34:
35:
36: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>