]> rtime.felk.cvut.cz Git - frescor/fna.git/commitdiff
correct network functions
authorsangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Tue, 20 Mar 2007 10:26:04 +0000 (10:26 +0000)
committersangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Tue, 20 Mar 2007 10:26:04 +0000 (10:26 +0000)
git-svn-id: http://www.frescor.org/private/svn/frescor/fna/trunk@347 35b4ef3e-fd22-0410-ab77-dab3279adceb

include/fna.h

index 9229fb4a3575126e9a26ef11c27c935e89612bb0..28d3b2827a3f9d85b649d6e5b3f6be82bf3c2c10 100644 (file)
@@ -788,19 +788,20 @@ int fna_receive_endpoint_get_status
  * split them.
  *
  * Some protocols, like IP, are capable of sending large messages
- * (and use fragmentation internally) but other protocols doesn't
- * provide fragmentation features.
+ * (and use fragmentation internally) but other protocols don't.
  *
  * @param[in] resource_id The network we want the tx time from.
  * @param[in] destination The destination address
  * @param[out] max_size The maximum number of bytes for each message
  *
  * @return
- *   FNA_NO_ERROR: in this case it also means contract accepted \n
+ *   FNA_NO_ERROR \n
  *   FNA_ERR_INTERNAL_ERROR: protocol dependent internal errors \n
  *   FNA_ERR_NOT_INITIALIZED: if the protocol is not initialized \n
- *   FNA_ERR_RESOURCE_ID_INVALID: if we are not in charge of resource_id \n
- *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
+ *   FNA_ERR_RESOURCE_ID_INVALID: if resource id does not represent
+ *   a network accessible from the current processing node \n
+ *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL or destination is
+ *   invalid \n
  *
  **/
 int fna_network_message_get_max_size
@@ -812,19 +813,21 @@ int fna_network_message_get_max_size
  * fna_network_bytes_to_budget()
  *
  * This operation converts a number of bytes into a temporal budget for
- * a specific network. Network overheads are not included here but internally
- * when negotiating a specific contract.
+ * a specific network. Network overheads are not included here but are
+ * considered internally when negotiating a specific contract.
  *
  * @param[in] resource_id The network
  * @param[in] nbytes Number of bytes
  * @param[out] budget The network budget for nbytes
  *
  * @return
- *   FNA_NO_ERROR: in this case it also means contract accepted \n
+ *   FNA_NO_ERROR \n
  *   FNA_ERR_INTERNAL_ERROR: protocol dependent internal errors \n
  *   FNA_ERR_NOT_INITIALIZED: if the protocol is not initialized \n
- *   FNA_ERR_RESOURCE_ID_INVALID: if we are not in charge of resource_id \n
- *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
+ *   FNA_ERR_RESOURCE_ID_INVALID: if resource id does not represent
+ *   a network accessible from the current processing node \n
+ *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL or nbytes is less
+ *   than zero \n
  *
  **/
 int fna_network_bytes_to_budget
@@ -843,11 +846,13 @@ int fna_network_bytes_to_budget
  * @param[out] nbytes Number of bytes
  *
  * @return
- *   FNA_NO_ERROR: in this case it also means contract accepted \n
+ *   FNA_NO_ERROR \n
  *   FNA_ERR_INTERNAL_ERROR: protocol dependent internal errors \n
  *   FNA_ERR_NOT_INITIALIZED: if the protocol is not initialized \n
- *   FNA_ERR_RESOURCE_ID_INVALID: if we are not in charge of resource_id \n
- *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
+ *   FNA_ERR_RESOURCE_ID_INVALID: if resource id does not represent
+ *   a network accessible from the current processing node \n
+ *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL or budget refers to
+ *   an invalid time value \n
  *
  **/
 int fna_network_budget_to_bytes
@@ -860,25 +865,26 @@ int fna_network_budget_to_bytes
  *
  * This operation gets the minimum effective budget for a network. Each message
  * consumes a contracted budget in "chunks" (i.e: packets) that we call
- * effective budget.
+ * minimum effective budget.
  *
  * A negotiated contract, for N bytes in a period T, means that there is a
  * virtual resource that reserves for the user:
  *
- *         (N bytes)/budget_to_bytes(min_effective_budget) "CHUNKS"
+ *   Ceiling ((N bytes) / budget_to_bytes (min_effective_budget)) "CHUNKS"
  *
  * Note that if the user decides not to send these N bytes at once but, say,
- * one byte at a time, it will consume more "CHUNKS" and the reserved budget
- * will become exhausted before sending all the bytes.
+ * one byte at a time, it will consume one "CHUNK" at a time and the reserved
+ * budget will become exhausted before sending all the bytes.
  *
  * @param[in] resource_id The network
  * @param[out] budget The network budget
  *
  * @return
- *   FNA_NO_ERROR: in this case it also means contract accepted \n
+ *   FNA_NO_ERROR \n
  *   FNA_ERR_INTERNAL_ERROR: protocol dependent internal errors \n
  *   FNA_ERR_NOT_INITIALIZED: if the protocol is not initialized \n
- *   FNA_ERR_RESOURCE_ID_INVALID: if we are not in charge of resource_id \n
+ *   FNA_ERR_RESOURCE_ID_INVALID: if resource id does not represent
+ *   a network accessible from the current processing node \n
  *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
  *
  **/