]> rtime.felk.cvut.cz Git - frescor/fna.git/commitdiff
changes in get_status functions and add receive create endpoint
authorsangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Tue, 13 Mar 2007 11:20:48 +0000 (11:20 +0000)
committersangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Tue, 13 Mar 2007 11:20:48 +0000 (11:20 +0000)
git-svn-id: http://www.frescor.org/private/svn/frescor/fna/trunk@331 35b4ef3e-fd22-0410-ab77-dab3279adceb

include/fna.h

index d3e4d6057e36ca88f0be6da0b4620f282d31b133..0c80ce9b18ba117406898a5d00732a6387ea0404 100644 (file)
@@ -678,12 +678,16 @@ int fna_receive_async
        size_t *received_bytes);
 
 /**
- * fna_send_endpoint_get_pending_messages()
+ * fna_send_endpoint_get_status()
  *
- * This function tells the number of messages still pending
+ * This function tells the number of messages still pending in the
+ * endpoint queue, whether the network is up or down with some
+ * optional information which is protocol_dependent.
  *
  * @param[in] endpoint The send endpoint (resource_id is in the endpoint).
  * @param[out] number_of_pending_messages The number of pending messages
+ * @param[out] network_status How is the network (up, down..)
+ * @param[out] protocol_status Protocol dependent status info
  *
  * @return
  *   FNA_NO_ERROR: in this case it also means contract accepted \n
@@ -693,18 +697,58 @@ int fna_receive_async
  *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
  *
  **/
-int fna_send_endpoint_get_pending_messages
-      (const frsh_send_endpoint_t *endpoint,
-       int *number_of_pending_messages);
+int fna_send_endpoint_get_status(const frsh_send_endpoint_t *endpoint,
+                                 int *number_of_pending_messages,
+                                 frsh_endpoint_network_status *network_status,
+                                 frsh_protocol_status_t *protocol_status);
+
+/**
+ * fna_receive_endpoint_create()
+ *
+ * This operation creates a receive endpoint associated with a
+ * undirectional stream within a network interface of the node.
+ *
+ * Receiving endpoints are not bound to any network vres, this is
+ * because don't originate any traffic.
+ *
+ * Note that the protocol address is not needed for reception because
+ * it can be determined internally by FRSH based on the network_id.
+ *
+ * Note also that messages may come from diferent originators.
+ *
+ * @param[in] resource_id  Id of the network from which we listen.
+ * @param[in] stream_id  Id of the stream within the network.
+ * @param[in] queueing_info Buffering information(queue size and
+ *                          policy).
+ * @param[in] protocol_info Extra protocol info opaque for the
+ *                          application.
+ * @param[out] endpoint  Placeholder for the endpoint object.
+ *
+ * @return
+ *   FNA_NO_ERROR: in this case it also means contract accepted \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
+ **/
+int fna_receive_endpoint_create
+      (const frsh_resource_id_t resource_id,
+       const frsh_stream_id_t stream_id,
+       const frsh_endpoint_queueing_info_t queueing_info,
+       const frsh_protocol_info_t protocol_info,
+       frsh_receive_endpoint_t *endpoint);
 
 /**
  * fna_receive_endpoint_get_pending_messages
  *
  * This function tells the number of messages still pending in the
- * receive endpoint queue
+ * endpoint queue, whether the network is up or down and some optional
+ * information which is protocol dependent.
  *
  * @param[in] endpoint The receive endpoint (resource_id is in the endpoint).
  * @param[out] number_of_pending_messages The number of pending messages
+ * @param[out] network_status How is the network (up, down..)
+ * @param[out] protocol_status Protocol dependent status info
  *
  * @return
  *   FNA_NO_ERROR: in this case it also means contract accepted \n
@@ -714,9 +758,11 @@ int fna_send_endpoint_get_pending_messages
  *   FNA_ERR_BAD_ARGUMENT: if pointers are NULL \n
  *
  **/
-int fna_receive_endpoint_get_pending_messages
+int fna_receive_endpoint_get_status
       (const frsh_receive_endpoint_t *endpoint,
-       int *number_of_pending_messages);
+       int *number_of_pending_messages,
+       frsh_endpoint_network_status *network_status,
+       frsh_protocol_status_t *protocol_status);
 
 /*@}*/
 
@@ -788,7 +834,7 @@ int fna_message_get_tx_time
  *
  **/
 int fna_message_get_max_size
-      (const frsh_resource_id_t *resource_id,
+      (const frsh_resource_id_t resource_id,
        size_t *max_size);
 
 /*@}*/