-XBT_PUBLIC int gras_socket_my_port (gras_socket_t sock);
-/** Get the port number on which this socket is connected on remote side */
-XBT_PUBLIC int gras_socket_peer_port(gras_socket_t sock);
+XBT_PUBLIC(int) gras_socket_my_port(gras_socket_t sock);
+/** @brief Get the port number on which this socket is connected on remote side
+ *
+ * This is the port declared on remote side with the
+ * gras_socket_master() function (if any, or a random number being uniq on
+ * the remote host). If remote used gras_socket_master() more than once, the
+ * lastly declared number will be used here.
+ *
+ * Note to BSD sockets experts: With BSD sockets, the sockaddr
+ * structure allows you to retrieve the port of the client socket on
+ * remote side, but it is of no use (from user perspective, it is
+ * some random number above 6000). That is why GRAS sockets differ
+ * from BSD ones here.
+ */
+
+XBT_PUBLIC(int) gras_socket_peer_port(gras_socket_t sock);