diff options
-rw-r--r-- | doc/handbook/chapters/developer.texi | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/doc/handbook/chapters/developer.texi b/doc/handbook/chapters/developer.texi index 7cefa5603..6c426ebad 100644 --- a/doc/handbook/chapters/developer.texi +++ b/doc/handbook/chapters/developer.texi | |||
@@ -5162,6 +5162,8 @@ receiving a type map by sending back a | |||
5162 | retransmit the type map (with exponential back-off). | 5162 | retransmit the type map (with exponential back-off). |
5163 | 5163 | ||
5164 | @cindex CADET Subsystem | 5164 | @cindex CADET Subsystem |
5165 | @cindex CADET | ||
5166 | @cindex cadet | ||
5165 | @node CADET Subsystem | 5167 | @node CADET Subsystem |
5166 | @section CADET Subsystem | 5168 | @section CADET Subsystem |
5167 | 5169 | ||
@@ -5228,6 +5230,7 @@ Should a message get lost on TRANSPORT/CORE level, if a channel is | |||
5228 | created with as reliable, CADET will retransmit the lost message and | 5230 | created with as reliable, CADET will retransmit the lost message and |
5229 | deliver it in order to the destination application. | 5231 | deliver it in order to the destination application. |
5230 | 5232 | ||
5233 | @pindex GNUNET_CADET_connect | ||
5231 | To communicate with other peers using CADET, it is necessary to first | 5234 | To communicate with other peers using CADET, it is necessary to first |
5232 | connect to the service using @code{GNUNET_CADET_connect}. | 5235 | connect to the service using @code{GNUNET_CADET_connect}. |
5233 | This function takes several parameters in form of callbacks, to allow the | 5236 | This function takes several parameters in form of callbacks, to allow the |
@@ -5239,7 +5242,8 @@ CADET, even do one connection per listening port). | |||
5239 | The function returns a handle which has to be used for any further | 5242 | The function returns a handle which has to be used for any further |
5240 | interaction with the service. | 5243 | interaction with the service. |
5241 | 5244 | ||
5242 | To connect to a remote peer a client has to call the | 5245 | @pindex GNUNET_CADET_channel_create |
5246 | To connect to a remote peer, a client has to call the | ||
5243 | @code{GNUNET_CADET_channel_create} function. The most important parameters | 5247 | @code{GNUNET_CADET_channel_create} function. The most important parameters |
5244 | given are the remote peer's identity (it public key) and a port, which | 5248 | given are the remote peer's identity (it public key) and a port, which |
5245 | specifies which application on the remote peer to connect to, similar to | 5249 | specifies which application on the remote peer to connect to, similar to |
@@ -5249,6 +5253,7 @@ exchanges to assure and authenticated, secure and verified communication. | |||
5249 | Similar to @code{GNUNET_CADET_connect},@code{GNUNET_CADET_create_channel} | 5253 | Similar to @code{GNUNET_CADET_connect},@code{GNUNET_CADET_create_channel} |
5250 | returns a handle to interact with the created channel. | 5254 | returns a handle to interact with the created channel. |
5251 | 5255 | ||
5256 | @pindex GNUNET_CADET_notify_transmit_ready | ||
5252 | For every message the client wants to send to the remote application, | 5257 | For every message the client wants to send to the remote application, |
5253 | @code{GNUNET_CADET_notify_transmit_ready} must be called, indicating the | 5258 | @code{GNUNET_CADET_notify_transmit_ready} must be called, indicating the |
5254 | channel on which the message should be sent and the size of the message | 5259 | channel on which the message should be sent and the size of the message |
@@ -5265,6 +5270,7 @@ case. To be alerted when a channel is online, a client can call | |||
5265 | means that the channel is online. The callback can give 0 bytes to CADET | 5270 | means that the channel is online. The callback can give 0 bytes to CADET |
5266 | if no message is to be sent, this is OK. | 5271 | if no message is to be sent, this is OK. |
5267 | 5272 | ||
5273 | @pindex GNUNET_CADET_notify_transmit_cancel | ||
5268 | If a transmission was requested but before the callback fires it is no | 5274 | If a transmission was requested but before the callback fires it is no |
5269 | longer needed, it can be canceled with | 5275 | longer needed, it can be canceled with |
5270 | @code{GNUNET_CADET_notify_transmit_ready_cancel}, which uses the handle | 5276 | @code{GNUNET_CADET_notify_transmit_ready_cancel}, which uses the handle |
@@ -5273,6 +5279,7 @@ As in the case of CORE, only one message can be requested at a time: a | |||
5273 | client must not call @code{GNUNET_CADET_notify_transmit_ready} again until | 5279 | client must not call @code{GNUNET_CADET_notify_transmit_ready} again until |
5274 | the callback is called or the request is canceled. | 5280 | the callback is called or the request is canceled. |
5275 | 5281 | ||
5282 | @pindex GNUNET_CADET_channel_destroy | ||
5276 | When a channel is no longer needed, a client can call | 5283 | When a channel is no longer needed, a client can call |
5277 | @code{GNUNET_CADET_channel_destroy} to get rid of it. | 5284 | @code{GNUNET_CADET_channel_destroy} to get rid of it. |
5278 | Note that CADET will try to transmit all pending traffic before notifying | 5285 | Note that CADET will try to transmit all pending traffic before notifying |
@@ -5284,6 +5291,7 @@ on any incoming or outgoing channels are given to the client when CADET | |||
5284 | executes the callbacks given to it at the time of | 5291 | executes the callbacks given to it at the time of |
5285 | @code{GNUNET_CADET_connect}. | 5292 | @code{GNUNET_CADET_connect}. |
5286 | 5293 | ||
5294 | @pindex GNUNET_CADET_disconnect | ||
5287 | Finally, when an application no longer wants to use CADET, it should call | 5295 | Finally, when an application no longer wants to use CADET, it should call |
5288 | @code{GNUNET_CADET_disconnect}, but first all channels and pending | 5296 | @code{GNUNET_CADET_disconnect}, but first all channels and pending |
5289 | transmissions must be closed (otherwise CADET will complain). | 5297 | transmissions must be closed (otherwise CADET will complain). |
@@ -5579,7 +5587,7 @@ simply disconnects from the service, with no message involved. | |||
5579 | @subsection The NSE Peer-to-Peer Protocol | 5587 | @subsection The NSE Peer-to-Peer Protocol |
5580 | 5588 | ||
5581 | 5589 | ||
5582 | 5590 | @pindex GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD | |
5583 | The NSE subsystem only has one message in the P2P protocol, the | 5591 | The NSE subsystem only has one message in the P2P protocol, the |
5584 | @code{GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD} message. | 5592 | @code{GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD} message. |
5585 | 5593 | ||
@@ -5794,6 +5802,7 @@ The hostlist daemon is the main component of the HOSTLIST subsystem. It is | |||
5794 | started by the ARM service and (if configured) starts the HOSTLIST client | 5802 | started by the ARM service and (if configured) starts the HOSTLIST client |
5795 | and server components. | 5803 | and server components. |
5796 | 5804 | ||
5805 | @pindex GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT | ||
5797 | If the daemon provides a hostlist itself it can advertise it's own | 5806 | If the daemon provides a hostlist itself it can advertise it's own |
5798 | hostlist to other peers. To do so it sends a | 5807 | hostlist to other peers. To do so it sends a |
5799 | @code{GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT} message to other peers | 5808 | @code{GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT} message to other peers |
@@ -8085,10 +8094,9 @@ This includes some of well known utilities, like "ping" and "nslookup". | |||
8085 | @node Importing DNS Zones into GNS | 8094 | @node Importing DNS Zones into GNS |
8086 | @subsection Importing DNS Zones into GNS | 8095 | @subsection Importing DNS Zones into GNS |
8087 | 8096 | ||
8088 | |||
8089 | |||
8090 | This section discusses the challenges and problems faced when writing the | 8097 | This section discusses the challenges and problems faced when writing the |
8091 | Ascension tool. It also takes a look at possible improvements in the future. | 8098 | Ascension tool. It also takes a look at possible improvements in the |
8099 | future. | ||
8092 | 8100 | ||
8093 | @menu | 8101 | @menu |
8094 | * Conversions between DNS and GNS:: | 8102 | * Conversions between DNS and GNS:: |
@@ -8096,12 +8104,13 @@ Ascension tool. It also takes a look at possible improvements in the future. | |||
8096 | * Performance:: | 8104 | * Performance:: |
8097 | @end menu | 8105 | @end menu |
8098 | 8106 | ||
8107 | @cindex DNS Conversion | ||
8099 | @node Conversions between DNS and GNS | 8108 | @node Conversions between DNS and GNS |
8100 | @subsubsection Conversions between DNS and GNS | 8109 | @subsubsection Conversions between DNS and GNS |
8101 | 8110 | ||
8102 | The differences between the two name systems lies in the details | 8111 | The differences between the two name systems lies in the details |
8103 | and is not always transparent. For instance an SRV record is converted to a | 8112 | and is not always transparent. |
8104 | GNS only BOX record. | 8113 | For instance an SRV record is converted to a GNS only BOX record. |
8105 | 8114 | ||
8106 | This is done by converting to a BOX record from an existing SRV record: | 8115 | This is done by converting to a BOX record from an existing SRV record: |
8107 | 8116 | ||
@@ -8114,11 +8123,12 @@ _sip._tcp.example.com. 14000 IN SRV 0 0 5060 www.example.com. | |||
8114 | 14000 BOX n 5060 6 33 0 0 5060 www.example.com | 8123 | 14000 BOX n 5060 6 33 0 0 5060 www.example.com |
8115 | @end example | 8124 | @end example |
8116 | 8125 | ||
8117 | Other records that have such a transformation is the MX record type, as well as | 8126 | Other records that have such a transformation is the MX record type, |
8118 | the SOA record type. | 8127 | as well as the SOA record type. |
8128 | |||
8129 | Transformation of a SOA record into GNS works as described in the | ||
8130 | following example. Very important to note are the rname and mname keys. | ||
8119 | 8131 | ||
8120 | Transformation of a SOA record into GNS works as described in the following | ||
8121 | example. Very important to note are the rname and mname keys. | ||
8122 | @example | 8132 | @example |
8123 | # BIND syntax for a clean SOA record | 8133 | # BIND syntax for a clean SOA record |
8124 | @ IN SOA master.example.com. hostmaster.example.com. ( | 8134 | @ IN SOA master.example.com. hostmaster.example.com. ( |