SimGrid 3.7.1
Scalable simulation of distributed systems
Functions
Retrieving data about sockets and peers
XBT_sock

Functions

int xbt_socket_my_port (xbt_socket_t sock)
int xbt_socket_peer_port (xbt_socket_t sock)
 Get the port number on which this socket is connected on remote side.
const char * xbt_socket_peer_name (xbt_socket_t sock)
const char * xbt_socket_peer_proc (xbt_socket_t sock)

Detailed Description

Who are you talking to?


Function Documentation

int xbt_socket_my_port ( xbt_socket_t  sock)

Get the port number on which this socket is connected on my side

int xbt_socket_peer_port ( xbt_socket_t  sock)

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 unique 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 XBT sockets differ from BSD ones here.

const char* xbt_socket_peer_name ( xbt_socket_t  sock)

Get the host name of the remote side

const char* xbt_socket_peer_proc ( xbt_socket_t  sock)

Get the process name of the remote side


Back to the main Simgrid Documentation page The version of SimGrid documented here is v3.7.1.
Documentation of other versions can be found in their respective archive files (directory doc/html).
Generated by doxygen