udp: Provide st->addr_configured
[secnet] / magic.h
CommitLineData
ff05a229
SE
1/* Magic numbers used within secnet */
2
3#ifndef magic_h
4#define magic_h
5
5b5f297f
IJ
6#define LABEL_NAK 0x00000000
7#define LABEL_MSG0 0x00020200
8#define LABEL_MSG1 0x01010101
9#define LABEL_MSG2 0x02020202
10#define LABEL_MSG3 0x03030303
11#define LABEL_MSG3BIS 0x13030313
12#define LABEL_MSG4 0x04040404
13#define LABEL_MSG5 0x05050505
14#define LABEL_MSG6 0x06060606
15#define LABEL_MSG7 0x07070707
16#define LABEL_MSG8 0x08080808
17#define LABEL_MSG9 0x09090909
dd9209d1 18#define LABEL_PROD 0x0a0a0a0a
ff05a229 19
09a385fb 20/* uses of the 32-bit capability bitmap */
5b5f297f
IJ
21#define CAPAB_EARLY 0x00000000 /* no Early flags yet (see NOTES) */
22#define CAPAB_TRANSFORM_MASK 0x0000ffff
23/* remaining 16 bits are unused */
24
25/*
26 * The transform capability mask is a set of bits, one for each
27 * transform supported. The transform capability numbers are set in
28 * the configuration (and should correspond between the two sites),
29 * although there are sensible defaults.
30 *
31 * Advertising a nonzero transform capability mask promises that
32 * the receiver understands LABEL_MSG3BIS messages, which
33 * contain an additional byte specifying the transform capability
34 * number actually chosen by the MSG3 sender.
35 *
36 * Aside from that, an empty bitmask is treated the same as
37 * 1u<<CAPAB_TRANSFORMNUM_ANCIENT
38 */
39
40/* bit indices, 0 is ls bit */
41#define CAPAB_TRANSFORMNUM_USER_MIN 0
42#define CAPAB_TRANSFORMNUM_USER_MAX 7
43#define CAPAB_TRANSFORMNUM_SERPENT256CBC 8
44#define CAPAB_TRANSFORMNUM_EAXSERPENT 9
45#define CAPAB_TRANSFORMNUM_MAX 15
46
47#define CAPAB_TRANSFORMNUM_ANCIENT CAPAB_TRANSFORMNUM_SERPENT256CBC
09a385fb 48
ff05a229 49#endif /* magic_h */