diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-15 20:41:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-15 20:41:40 +0000 |
commit | 1574e0f8c2a55363c024a95f440ba7be647efbe1 (patch) | |
tree | 5e4507d9aa404ac983c5774b71b25ec6174ee7cc /src/dns/dns.h | |
parent | 5ec7048ed9ffeddbe06e34a31d388080fae143e5 (diff) | |
download | gnunet-1574e0f8c2a55363c024a95f440ba7be647efbe1.tar.gz gnunet-1574e0f8c2a55363c024a95f440ba7be647efbe1.zip |
-removing legacy dns/vpn/exit code and renaming -new versions to current
Diffstat (limited to 'src/dns/dns.h')
-rw-r--r-- | src/dns/dns.h | 93 |
1 files changed, 70 insertions, 23 deletions
diff --git a/src/dns/dns.h b/src/dns/dns.h index dd0f55e16..29a9f937b 100644 --- a/src/dns/dns.h +++ b/src/dns/dns.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | (C) 2010, 2011, 2012 Christian Grothoff (and other contributing authors) | 3 | (C) 2012 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -19,36 +19,83 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file dns/dns.h | 22 | * @file dns/dns_new.h |
23 | * @brief IPC messages between DNS API and DNS service | 23 | * @brief IPC messages between DNS API and DNS service |
24 | * @author Philipp Toelke | ||
25 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
26 | */ | 25 | */ |
27 | #ifndef DNS_H | 26 | #ifndef DNS_NEW_H |
28 | #define DNS_H | 27 | #define DNS_NEW_H |
29 | 28 | ||
30 | GNUNET_NETWORK_STRUCT_BEGIN | 29 | GNUNET_NETWORK_STRUCT_BEGIN |
31 | 30 | ||
32 | struct query_packet | 31 | |
32 | /** | ||
33 | * Message from client to DNS service to register itself. | ||
34 | */ | ||
35 | struct GNUNET_DNS_Register | ||
36 | { | ||
37 | /** | ||
38 | * Header of type GNUNET_MESSAGE_TYPE_DNS_CLIENT_INIT | ||
39 | */ | ||
40 | struct GNUNET_MessageHeader header; | ||
41 | |||
42 | /** | ||
43 | * NBO encoding of 'enum GNUNET_DNS_Flags' for the client. | ||
44 | */ | ||
45 | uint32_t flags; | ||
46 | }; | ||
47 | |||
48 | |||
49 | /** | ||
50 | * Message from DNS service to client: please handle a request. | ||
51 | */ | ||
52 | struct GNUNET_DNS_Request | ||
53 | { | ||
54 | /** | ||
55 | * Header of type GNUNET_MESSAGE_TYPE_DNS_CLIENT_REQUEST | ||
56 | */ | ||
57 | struct GNUNET_MessageHeader header; | ||
58 | |||
59 | /** | ||
60 | * Always zero. | ||
61 | */ | ||
62 | uint32_t reserved GNUNET_PACKED; | ||
63 | |||
64 | /** | ||
65 | * Unique request ID. | ||
66 | */ | ||
67 | uint64_t request_id GNUNET_PACKED; | ||
68 | |||
69 | /* followed by original DNS request (without UDP header) */ | ||
70 | |||
71 | }; | ||
72 | |||
73 | |||
74 | /** | ||
75 | * Message from client to DNS service: here is my reply. | ||
76 | */ | ||
77 | struct GNUNET_DNS_Response | ||
33 | { | 78 | { |
34 | struct GNUNET_MessageHeader hdr; | 79 | /** |
35 | 80 | * Header of type GNUNET_MESSAGE_TYPE_DNS_CLIENT_RESPONSE | |
36 | /** | 81 | */ |
37 | * The IP-Address this query was originally sent to | 82 | struct GNUNET_MessageHeader header; |
38 | */ | 83 | |
39 | char orig_to[16]; | 84 | /** |
40 | /** | 85 | * Zero to drop, 1 for no change (no payload), 2 for update (message has payload). |
41 | * The IP-Address this query was originally sent from | 86 | */ |
42 | */ | 87 | uint32_t drop_flag GNUNET_PACKED; |
43 | char orig_from[16]; | 88 | |
44 | char addrlen; | 89 | /** |
45 | /** | 90 | * Unique request ID. |
46 | * The UDP-Port this query was originally sent from | 91 | */ |
47 | */ | 92 | uint64_t request_id GNUNET_PACKED; |
48 | uint16_t src_port GNUNET_PACKED; | 93 | |
49 | 94 | /* followed by original DNS request (without UDP header) */ | |
50 | unsigned char data[1]; /* The DNS-Packet */ | 95 | |
51 | }; | 96 | }; |
97 | |||
98 | |||
52 | GNUNET_NETWORK_STRUCT_END | 99 | GNUNET_NETWORK_STRUCT_END |
53 | 100 | ||
54 | #endif | 101 | #endif |