aboutsummaryrefslogtreecommitdiff
path: root/src/identity/identity.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-07-14 18:53:34 +0000
committerChristian Grothoff <christian@grothoff.org>2013-07-14 18:53:34 +0000
commit7ca018f77ba7fc571d76478ec382e7b66204d0a5 (patch)
tree8d32f54ed2ce1b58db4a177f222ad0a3d487355e /src/identity/identity.h
parent45dc1c554237d7ebe828152e2002abf86c2c7c98 (diff)
downloadgnunet-7ca018f77ba7fc571d76478ec382e7b66204d0a5.tar.gz
gnunet-7ca018f77ba7fc571d76478ec382e7b66204d0a5.zip
-identity IPC definitions
Diffstat (limited to 'src/identity/identity.h')
-rw-r--r--src/identity/identity.h196
1 files changed, 189 insertions, 7 deletions
diff --git a/src/identity/identity.h b/src/identity/identity.h
index 04cfc110f..e563cdd34 100644
--- a/src/identity/identity.h
+++ b/src/identity/identity.h
@@ -37,21 +37,203 @@
37 37
38GNUNET_NETWORK_STRUCT_BEGIN 38GNUNET_NETWORK_STRUCT_BEGIN
39 39
40
40/** 41/**
41 * Network size estimate sent from the service 42 * Answer from service to client about last operation;
42 * to clients. Contains the current size estimate 43 * GET_DEFAULT maybe answered with this message on failure;
43 * (or 0 if none has been calculated) and the 44 * CREATE and RENAME will always be answered with this message.
44 * standard deviation of known estimates.
45 *
46 */ 45 */
47struct GNUNET_IDENTITY_XXXMessage 46struct GNUNET_IDENTITY_ResultCodeMessage
48{ 47{
49 /** 48 /**
50 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_XXX 49 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_RESULT_CODE
51 */ 50 */
52 struct GNUNET_MessageHeader header; 51 struct GNUNET_MessageHeader header;
53 52
53 /**
54 * Status code for the last operation, in NBO.
55 */
56 uint32_t result_code GNUNET_PACKED;
57
58 /* followed by 0-terminated error message (on error) */
59
54}; 60};
61
62
63/**
64 * Service informs client about status of a pseudonym.
65 */
66struct GNUNET_IDENTITY_UpdateMessage
67{
68 /**
69 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE
70 */
71 struct GNUNET_MessageHeader header;
72
73 /**
74 * Number of bytes in identity name string including 0-termination, in NBO;
75 * 0 if the identity was deleted.
76 */
77 uint16_t name_len GNUNET_PACKED;
78
79 /**
80 * Always zero.
81 */
82 uint16_t reserved GNUNET_PACKED;
83
84 /**
85 * Public key of the identity that we provide an update about.
86 */
87 struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private_key;
88
89 /* followed by 0-terminated identity name */
90
91};
92
93
94
95/**
96 * Client requests knowledge about default identity for
97 * a subsystem from identity service.
98 */
99struct GNUNET_IDENTITY_GetDefaultMessage
100{
101 /**
102 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_GET_DEFAULT
103 */
104 struct GNUNET_MessageHeader header;
105
106 /**
107 * Number of bytes in service name string including 0-termination, in NBO.
108 */
109 uint16_t name_len GNUNET_PACKED;
110
111 /**
112 * Always zero.
113 */
114 uint16_t reserved GNUNET_PACKED;
115
116
117 /* followed by 0-terminated service name */
118
119};
120
121
122/**
123 * Used from service to client as a result to the GET_DEFAULT
124 * message, used from client to service to SET_DEFAULT.
125 */
126struct GNUNET_IDENTITY_SetDefaultMessage
127{
128 /**
129 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_SET_DEFAULT
130 */
131 struct GNUNET_MessageHeader header;
132
133 /**
134 * Number of bytes in service name string including 0-termination, in NBO.
135 */
136 uint16_t name_len GNUNET_PACKED;
137
138 /**
139 * Always zero.
140 */
141 uint16_t reserved GNUNET_PACKED;
142
143 /**
144 * Public key of the identity to use.
145 */
146 struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private_key;
147
148 /* followed by 0-terminated service name */
149
150};
151
152
153/**
154 * Client requests creation of an identity. Service
155 * will respond with a result code.
156 */
157struct GNUNET_IDENTITY_CreateRequestMessage
158{
159 /**
160 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_CREATE
161 */
162 struct GNUNET_MessageHeader header;
163
164 /**
165 * Number of bytes in identity name string including 0-termination, in NBO.
166 */
167 uint16_t name_len GNUNET_PACKED;
168
169 /**
170 * Always zero.
171 */
172 uint16_t reserved GNUNET_PACKED;
173
174 /**
175 * Public key of the identity to use.
176 */
177 struct GNUNET_CRYPTO_EccPrivateKeyBinaryEncoded private_key;
178
179 /* followed by 0-terminated identity name */
180
181};
182
183
184/**
185 * Client requests renaming of an identity. Service
186 * will respond with a result code.
187 */
188struct GNUNET_IDENTITY_RenameMessage
189{
190 /**
191 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_RENAME
192 */
193 struct GNUNET_MessageHeader header;
194
195 /**
196 * Number of characters in the old name including 0-termination, in NBO.
197 */
198 uint16_t old_name_len GNUNET_PACKED;
199
200 /**
201 * Number of characters in the new name including 0-termination, in NBO.
202 */
203 uint16_t new_name_len GNUNET_PACKED;
204
205 /* followed by 0-terminated old name */
206 /* followed by 0-terminated new name */
207};
208
209
210/**
211 * Client requests deletion of an identity. Service
212 * will respond with a result code.
213 */
214struct GNUNET_IDENTITY_DeleteMessage
215{
216 /**
217 * Type: GNUNET_MESSAGE_TYPE_IDENTITY_DELETE
218 */
219 struct GNUNET_MessageHeader header;
220
221 /**
222 * Number of characters in the name including 0-termination, in NBO.
223 */
224 uint16_t name_len GNUNET_PACKED;
225
226 /**
227 * Always zero.
228 */
229 uint16_t reserved GNUNET_PACKED;
230
231 /* followed by 0-terminated name */
232
233};
234
235
236
55GNUNET_NETWORK_STRUCT_END 237GNUNET_NETWORK_STRUCT_END
56 238
57#endif 239#endif