PPL Logo

util/sockRoutines.h File Reference

Go to the source code of this file.

Data Structures

struct  skt_ip_t
struct  skt_ip_t
struct  ChMessageInt_t
struct  ChMessageLong_t
struct  ChMessageHeader
struct  ChMessage
struct  ChInfiAddr
struct  ChNodeinfo
struct  ChSingleNodeinfo
struct  CcsMessageHeader

Typedefs

typedef void(* skt_idleFn )(void)
typedef int(* skt_abortFn )(SOCKET skt, int errCode, const char *msg)

Functions

skt_ip_t skt_my_ip (void)
static void sleep (int secs)
void skt_init (void)
void skt_set_idle (skt_idleFn f)
skt_abortFn skt_set_abort (skt_abortFn f)
skt_ip_t skt_lookup_ip (const char *name)
skt_ip_t skt_innode_my_ip (void)
skt_ip_t skt_innode_lookup_ip (const char *name)
char * skt_print_ip (char *dest, skt_ip_t addr)
int skt_ip_match (skt_ip_t a, skt_ip_t b)
struct sockaddr_in skt_build_addr (skt_ip_t IP, int port)
SOCKET skt_datagram (unsigned int *port, int bufsize)
SOCKET skt_server (unsigned int *port)
SOCKET skt_server_ip (unsigned int *port, skt_ip_t *ip)
SOCKET skt_accept (SOCKET src_fd, skt_ip_t *pip, unsigned int *port)
SOCKET skt_connect (skt_ip_t ip, int port, int timeout)
void skt_close (SOCKET fd)
int skt_select1 (SOCKET fd, int msec)
void skt_setSockBuf (SOCKET skt, int bufsize)
int skt_sendN (SOCKET hSocket, const void *pBuff, int nBytes)
int skt_recvN (SOCKET hSocket, void *pBuff, int nBytes)
int skt_sendV (SOCKET fd, int nBuffers, const void **buffers, int *lengths)
int skt_sendmsg (SOCKET hSocket, struct msghdr *mh, int num_bufs, int total_bytes)
int skt_sendmsg (SOCKET hSocket, WSABUF *buffers, int num_bufs, int total_bytes)
int skt_tcp_no_nagle (SOCKET fd)
ChMessageInt_t ChMessageInt_new (unsigned int src)
unsigned int ChMessageInt (ChMessageInt_t src)
ChMessageLong_t ChMessageLong_new (CMK_TYPEDEF_UINT8 src)
CMK_TYPEDEF_UINT8 ChMessageLong (ChMessageLong_t src)
int ChMessage_recv (SOCKET fd, ChMessage *dst)
int ChMessageHeader_recv (SOCKET fd, ChMessage *dst)
int ChMessageData_recv (SOCKET fd, ChMessage *dst)
void ChMessage_free (ChMessage *doomed)
void ChMessageHeader_new (const char *type, int len, ChMessageHeader *dst)
void ChMessage_new (const char *type, int len, ChMessage *dst)
int ChMessage_send (SOCKET fd, const ChMessage *src)

Variables

skt_ip_t _skt_invalid_ip


Typedef Documentation

typedef void(* skt_idleFn)(void)

Definition at line 149 of file sockRoutines.h.

typedef int(* skt_abortFn)(SOCKET skt, int errCode, const char *msg)

Definition at line 150 of file sockRoutines.h.


Function Documentation

skt_ip_t skt_my_ip ( void   ) 

Definition at line 240 of file sockRoutines.C.

References skt_ip_t::data, and skt_lookup_ip().

Referenced by CcsServer_new(), CmiInitCPUAffinity(), getenv_display(), LrtsInitCpuTopo(), and skt_innode_my_ip().

Here is the call graph for this function:

Here is the caller graph for this function:

static void sleep ( int  secs  )  [static]

Definition at line 119 of file sockRoutines.h.

Referenced by _recvRestartCheckpointHandler(), arg_init(), CmiYield(), driver(), goFaceless(), SendMsgBuf(), and skt_should_retry().

Here is the caller graph for this function:

void skt_init ( void   ) 

Definition at line 66 of file sockRoutines.C.

References doCleanup(), skt_inited, and version.

Referenced by arg_init(), CcsConnectIpWithTimeout(), CcsConnectWithTimeout(), CcsServer_new(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

void skt_set_idle ( skt_idleFn  f  ) 

Definition at line 48 of file sockRoutines.C.

References idleFunc.

Referenced by arg_init().

Here is the caller graph for this function:

skt_abortFn skt_set_abort ( skt_abortFn  f  ) 

Definition at line 49 of file sockRoutines.C.

References skt_abort.

Referenced by arg_init(), CcsImpl_kill(), CcsServer_recvRequest(), CcsServer_sendReply(), and main().

Here is the caller graph for this function:

skt_ip_t skt_lookup_ip ( const char *  name  ) 

Definition at line 295 of file sockRoutines.C.

References h, and skt_parse_dotted().

Referenced by arg_init(), CcsConnectWithTimeout(), skt_innode_lookup_ip(), and skt_my_ip().

Here is the call graph for this function:

Here is the caller graph for this function:

skt_ip_t skt_innode_my_ip ( void   ) 

Definition at line 312 of file sockRoutines.C.

References skt_innode_lookup_ip(), and skt_my_ip().

Referenced by arg_init(), and LrtsInitCpuTopo().

Here is the call graph for this function:

Here is the caller graph for this function:

skt_ip_t skt_innode_lookup_ip ( const char *  name  ) 

Definition at line 324 of file sockRoutines.C.

References len, and skt_lookup_ip().

Referenced by arg_init(), and skt_innode_my_ip().

Here is the call graph for this function:

Here is the caller graph for this function:

char* skt_print_ip ( char *  dest,
skt_ip_t  addr 
)

Definition at line 343 of file sockRoutines.C.

References skt_ip_t::data.

Referenced by arg_init(), CcsServer_new(), CcsServer_recvRequest(), getenv_display(), main(), and printSvr().

Here is the caller graph for this function:

int skt_ip_match ( skt_ip_t  a,
skt_ip_t  b 
)

Definition at line 355 of file sockRoutines.C.

Referenced by arg_init().

Here is the caller graph for this function:

struct sockaddr_in skt_build_addr ( skt_ip_t  IP,
int  port 
) [read]

Definition at line 359 of file sockRoutines.C.

Referenced by skt_connect(), skt_datagram(), and skt_server_ip().

Here is the caller graph for this function:

SOCKET skt_datagram ( unsigned int port,
int  bufsize 
)

Definition at line 368 of file sockRoutines.C.

References bind, int, len, skt_abort, skt_build_addr(), and skt_should_retry().

Here is the call graph for this function:

SOCKET skt_server ( unsigned int port  ) 

Definition at line 400 of file sockRoutines.C.

References skt_server_ip().

Referenced by arg_init(), CcsServer_new(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

SOCKET skt_server_ip ( unsigned int port,
skt_ip_t ip 
)

Definition at line 405 of file sockRoutines.C.

References bind, int, len, skt_abort, skt_build_addr(), and skt_should_retry().

Referenced by skt_server().

Here is the call graph for this function:

Here is the caller graph for this function:

SOCKET skt_accept ( SOCKET  src_fd,
skt_ip_t pip,
unsigned int port 
)

Definition at line 435 of file sockRoutines.C.

References len, skt_abort, and skt_should_retry().

Referenced by arg_init(), CcsServer_recvRequest(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

SOCKET skt_connect ( skt_ip_t  ip,
int  port,
int  timeout 
)

Definition at line 454 of file sockRoutines.C.

References ERRNO, skt_abort, skt_build_addr(), skt_close(), skt_should_retry(), and stats::time().

Referenced by arg_init(), CcsConnectIpWithTimeout(), CcsImpl_kill(), and CcsSendRequestGeneric().

Here is the call graph for this function:

Here is the caller graph for this function:

void skt_close ( SOCKET  fd  ) 

int skt_select1 ( SOCKET  fd,
int  msec 
)

Definition at line 174 of file sockRoutines.C.

References skt_abort, skt_ignore_SIGPIPE, skt_should_retry(), and stats::time().

Referenced by arg_init(), CcsProbe(), CcsProbeTimeout(), CcsRecvResponse(), CcsRecvResponseMsg(), CcsServerCheck(), and skt_recvN().

Here is the call graph for this function:

Here is the caller graph for this function:

void skt_setSockBuf ( SOCKET  skt,
int  bufsize 
)

Definition at line 489 of file sockRoutines.C.

References int, len, and skt_abort.

int skt_sendN ( SOCKET  hSocket,
const void *  pBuff,
int  nBytes 
)

Definition at line 526 of file sockRoutines.C.

References skt_abort, skt_ignore_SIGPIPE, and skt_should_retry().

Referenced by arg_init(), CcsImpl_authInit(), CcsImpl_kill(), CcsServer_createSalt(), main(), and skt_sendV().

Here is the call graph for this function:

Here is the caller graph for this function:

int skt_recvN ( SOCKET  hSocket,
void *  pBuff,
int  nBytes 
)

int skt_sendV ( SOCKET  fd,
int  nBuffers,
const void **  buffers,
int lengths 
)

Definition at line 557 of file sockRoutines.C.

References PUP::b, buf, CmiTmpAlloc(), CmiTmpFree(), dest, len, and skt_sendN().

Referenced by arg_init(), CcsSendRequestGeneric(), CcsServer_writeReply(), and ChMessage_send().

Here is the call graph for this function:

Here is the caller graph for this function:

int skt_sendmsg ( SOCKET  hSocket,
struct msghdr *  mh,
int  num_bufs,
int  total_bytes 
)

Definition at line 583 of file sockRoutines.C.

References PUP::l, offset, skt_abort, and skt_ignore_SIGPIPE.

int skt_sendmsg ( SOCKET  hSocket,
WSABUF *  buffers,
int  num_bufs,
int  total_bytes 
)

Definition at line 614 of file sockRoutines.C.

References skt_abort, and skt_ignore_SIGPIPE.

int skt_tcp_no_nagle ( SOCKET  fd  ) 

Definition at line 165 of file sockRoutines.C.

References flag.

Referenced by arg_init().

Here is the caller graph for this function:

ChMessageInt_t ChMessageInt_new ( unsigned int  src  ) 

unsigned int ChMessageInt ( ChMessageInt_t  src  ) 

ChMessageLong_t ChMessageLong_new ( CMK_TYPEDEF_UINT8  src  ) 

Definition at line 672 of file sockRoutines.C.

References ChMessageLong_t::data.

CMK_TYPEDEF_UINT8 ChMessageLong ( ChMessageLong_t  src  ) 

Definition at line 678 of file sockRoutines.C.

References ChMessageLong_t::data.

int ChMessage_recv ( SOCKET  fd,
ChMessage dst 
)

Definition at line 685 of file sockRoutines.C.

References ChMessageData_recv(), and ChMessageHeader_recv().

Referenced by arg_init().

Here is the call graph for this function:

Here is the caller graph for this function:

int ChMessageHeader_recv ( SOCKET  fd,
ChMessage dst 
)

Definition at line 693 of file sockRoutines.C.

References ChMessageInt(), ChMessage::data, ChMessage::header, ChMessageHeader::len, ChMessage::len, and skt_recvN().

Referenced by arg_init(), and ChMessage_recv().

Here is the call graph for this function:

Here is the caller graph for this function:

int ChMessageData_recv ( SOCKET  fd,
ChMessage dst 
)

Definition at line 702 of file sockRoutines.C.

References ChMessage::data, ChMessage::len, malloc(), and skt_recvN().

Referenced by arg_init(), and ChMessage_recv().

Here is the call graph for this function:

Here is the caller graph for this function:

void ChMessage_free ( ChMessage doomed  ) 

Definition at line 710 of file sockRoutines.C.

References ChMessage::data, free(), ChMessage::header, ChMessage::len, and ChMessageHeader::type.

Referenced by arg_init().

Here is the call graph for this function:

Here is the caller graph for this function:

void ChMessageHeader_new ( const char *  type,
int  len,
ChMessageHeader dst 
)

Definition at line 717 of file sockRoutines.C.

References ChMessageInt_new(), ChMessageHeader::len, and ChMessageHeader::type.

Referenced by arg_init(), and ChMessage_new().

Here is the call graph for this function:

Here is the caller graph for this function:

void ChMessage_new ( const char *  type,
int  len,
ChMessage dst 
)

Definition at line 723 of file sockRoutines.C.

References ChMessageHeader_new(), ChMessage::data, ChMessage::header, ChMessage::len, and malloc().

Referenced by arg_init().

Here is the call graph for this function:

Here is the caller graph for this function:

int ChMessage_send ( SOCKET  fd,
const ChMessage src 
)

Definition at line 729 of file sockRoutines.C.

References ChMessage::data, ChMessage::header, ChMessage::len, and skt_sendV().

Referenced by arg_init().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 158 of file sockRoutines.h.

Referenced by arg_init().


Generated on Mon Sep 21 08:12:12 2020 for Charm++ by  doxygen 1.5.5