]> git.ipfire.org Git - people/stevee/aiccu.git/blob - common/ayiya.h
Add setup script functionality to Linux client
[people/stevee/aiccu.git] / common / ayiya.h
1 /**********************************************************
2 SixXS - Automatic IPv6 Connectivity Configuration Utility
3 ***********************************************************
4 Copyright 2003-2005 SixXS - http://www.sixxs.net
5 ***********************************************************
6 common/ayiya.c - AYIYA - Anything In Anything
7 ***********************************************************
8 $Author: jeroen $
9 $Id: ayiya.h,v 1.10 2006-07-13 19:33:39 jeroen Exp $
10 $Date: 2006-07-13 19:33:39 $
11 **********************************************************/
12
13 #ifndef AYIYA_H
14 #define AYIYA_H "H5K7:W3NDY5UU5N1K1N1C0l3"
15
16 #include "common.h"
17 #include "tic.h"
18
19 /* Anything In Anything - AYIYA (uses UDP in our case) */
20 #define AYIYA_PORT "5072"
21 /*#define AYIYA_PORT "8374"*/
22
23 /*
24 * AYIYA version (which document this should conform to)
25 * Per draft-massar-v6ops-ayiya-02 (July 2004)
26 */
27 #define AYIYA_VERSION "draft-02"
28
29 enum ayiya_identities
30 {
31 ayiya_id_none = 0x0, /* None */
32 ayiya_id_integer = 0x1, /* Integer */
33 ayiya_id_string = 0x2 /* ASCII String */
34 };
35
36 enum ayiya_hash
37 {
38 ayiya_hash_none = 0x0, /* No hash */
39 ayiya_hash_md5 = 0x1, /* MD5 Signature */
40 ayiya_hash_sha1 = 0x2, /* SHA1 Signature */
41 ayiya_hash_umac = 0x3 /* UMAC Signature (UMAC: Message Authentication Code using Universal Hashing / draft-krovetz-umac-04.txt */
42 };
43
44 enum ayiya_auth
45 {
46 ayiya_auth_none = 0x0, /* No authentication */
47 ayiya_auth_sharedsecret = 0x1, /* Shared Secret */
48 ayiya_auth_pgp = 0x2 /* Public/Private Key */
49 };
50
51 enum ayiya_opcode
52 {
53 ayiya_op_noop = 0x0, /* No Operation */
54 ayiya_op_forward = 0x1, /* Forward */
55 ayiya_op_echo_request = 0x2, /* Echo Request */
56 ayiya_op_echo_request_forward = 0x3, /* Echo Request and Forward */
57 ayiya_op_echo_response = 0x4, /* Echo Response */
58 ayiya_op_motd = 0x5, /* MOTD */
59 ayiya_op_query_request = 0x6, /* Query Request */
60 ayiya_op_query_response = 0x7 /* Query Response */
61 };
62
63 struct ayiyahdr
64 {
65 #if BYTE_ORDER == BIG_ENDIAN
66 uint32_t ayh_idlen: 4; /* Identity Length */
67 uint32_t ayh_idtype: 4; /* Identity Type */
68 uint32_t ayh_siglen: 4; /* Signature Length */
69 uint32_t ayh_hshmeth:4; /* Hashing Method */
70 uint32_t ayh_autmeth:4; /* Authentication Method */
71 uint32_t ayh_opcode: 4; /* Operation Code */
72 uint32_t ayh_nextheader:8; /* Next Header (PROTO_*) */
73 #elif BYTE_ORDER == LITTLE_ENDIAN
74 uint32_t ayh_idtype: 4; /* Identity Type */
75 uint32_t ayh_idlen: 4; /* Identity Length */
76 uint32_t ayh_hshmeth:4; /* Hashing Method */
77 uint32_t ayh_siglen: 4; /* Signature Length */
78 uint32_t ayh_opcode: 4; /* Operation Code */
79 uint32_t ayh_autmeth:4; /* Authentication Method */
80 uint32_t ayh_nextheader:8; /* Next Header (PROTO_*) */
81 #else
82 #error unsupported endianness!
83 #endif
84 uint32_t ayh_epochtime; /* Time in seconds since "00:00:00 1970-01-01 UTC" */
85 };
86
87 /* Functions */
88 bool ayiya(struct TIC_Tunnel *hTunnel);
89 void ayiya_beat(void);
90
91 #endif /* AYIYA_H */
92