rxsockfn.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <setjmp.h>
#include "oorexxapi.h"
#include <sys/types.h>
#include <errno.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <unistd.h>
#include "rxsock.h"
Include dependency graph for rxsockfn.cpp:

Go to the source code of this file.

Macros

#define psock_errno(s)   fprintf(stderr, "RxSOCK Error: %s\n", s)
 
#define sock_errno()   errno
 

Functions

 RexxRoutine0 (int, SockSock_Errno)
 
 RexxRoutine1 (CSTRING, SockPSock_Errno, OPTIONAL_CSTRING, type)
 
 RexxRoutine2 (int, SockAccept, int, sock, OPTIONAL_RexxObjectPtr, stemSource)
 
 RexxRoutine2 (int, SockBind, int, sock, RexxObjectPtr, stemSource)
 
 RexxRoutine1 (int, SockClose, int, sock)
 
 RexxRoutine2 (int, SockConnect, int, sock, RexxObjectPtr, stemSource)
 
 RexxRoutine3 (int, SockGetHostByAddr, CSTRING, addrArg, RexxObjectPtr, stemSource, OPTIONAL_int, domain)
 
 RexxRoutine2 (int, SockGetHostByName, CSTRING, name, RexxObjectPtr, stemSource)
 
 RexxRoutine0 (RexxStringObject, SockGetHostId)
 
 RexxRoutine0 (RexxStringObject, SockGetHostName)
 
 RexxRoutine2 (int, SockGetPeerName, int, sock, RexxObjectPtr, stemSource)
 
 RexxRoutine2 (int, SockGetSockName, int, sock, RexxObjectPtr, stemSource)
 
 RexxRoutine4 (int, SockGetSockOpt, int, sock, CSTRING, level, CSTRING, option, CSTRING, var)
 
 RexxRoutine3 (int, SockIoctl, int, sock, CSTRING, command, RexxObjectPtr, var)
 
 RexxRoutine2 (int, SockListen, int, sock, int, backlog)
 
 RexxRoutine4 (int, SockRecv, int, sock, CSTRING, var, int, dataLen, OPTIONAL_CSTRING, flagVal)
 
 RexxRoutine5 (int, SockRecvFrom, int, sock, CSTRING, var, int, dataLen, RexxObjectPtr, flagArg, OPTIONAL_RexxObjectPtr, stemSource)
 
 RexxRoutine4 (int, SockSelect, OPTIONAL_RexxObjectPtr, array1, OPTIONAL_RexxObjectPtr, array2, OPTIONAL_RexxObjectPtr, array3, OPTIONAL_int, timeout)
 
 RexxRoutine3 (int, SockSend, int, sock, RexxStringObject, dataObj, OPTIONAL_CSTRING, flagArg)
 
 RexxRoutine4 (int, SockSendTo, int, sock, RexxStringObject, dataObj, RexxObjectPtr, flagsOrStem, OPTIONAL_RexxObjectPtr, stemSource)
 
 RexxRoutine4 (int, SockSetSockOpt, int, sock, CSTRING, target, CSTRING, option, CSTRING, arg)
 
 RexxRoutine2 (int, SockShutDown, int, sock, int, how)
 
 RexxRoutine0 (int, SockInit)
 
 RexxRoutine3 (int, SockSocket, CSTRING, domainArg, CSTRING, typeArg, CSTRING, protocolArg)
 

Macro Definition Documentation

◆ psock_errno

#define psock_errno (   s)    fprintf(stderr, "RxSOCK Error: %s\n", s)

Definition at line 84 of file rxsockfn.cpp.

◆ sock_errno

#define sock_errno ( )    errno

Definition at line 89 of file rxsockfn.cpp.

Function Documentation

◆ RexxRoutine0() [1/4]

RexxRoutine0 ( int  ,
SockInit   
)

Definition at line 1235 of file rxsockfn.cpp.

References setErrno().

◆ RexxRoutine0() [2/4]

RexxRoutine0 ( int  ,
SockSock_Errno   
)

Definition at line 100 of file rxsockfn.cpp.

References sock_errno.

◆ RexxRoutine0() [3/4]

RexxRoutine0 ( RexxStringObject  ,
SockGetHostId   
)

Definition at line 335 of file rxsockfn.cpp.

References setErrno().

◆ RexxRoutine0() [4/4]

RexxRoutine0 ( RexxStringObject  ,
SockGetHostName   
)

Definition at line 398 of file rxsockfn.cpp.

References setErrno().

◆ RexxRoutine1() [1/2]

RexxRoutine1 ( CSTRING  ,
SockPSock_Errno  ,
OPTIONAL_CSTRING  ,
type   
)

Definition at line 112 of file rxsockfn.cpp.

References psock_errno, and type.

◆ RexxRoutine1() [2/2]

RexxRoutine1 ( int  ,
SockClose  ,
int  ,
sock   
)

Definition at line 204 of file rxsockfn.cpp.

References setErrno().

◆ RexxRoutine2() [1/8]

RexxRoutine2 ( int  ,
SockAccept  ,
int  ,
sock  ,
OPTIONAL_RexxObjectPtr  ,
stemSource   
)

Definition at line 136 of file rxsockfn.cpp.

References NULLOBJECT, StemManager::resolveStem(), setErrno(), and sockAddrToStem().

◆ RexxRoutine2() [2/8]

RexxRoutine2 ( int  ,
SockBind  ,
int  ,
sock  ,
RexxObjectPtr  ,
stemSource   
)

Definition at line 172 of file rxsockfn.cpp.

References StemManager::resolveStem(), setErrno(), and stemToSockAddr().

◆ RexxRoutine2() [3/8]

RexxRoutine2 ( int  ,
SockConnect  ,
int  ,
sock  ,
RexxObjectPtr  ,
stemSource   
)

Definition at line 226 of file rxsockfn.cpp.

References StemManager::resolveStem(), setErrno(), and stemToSockAddr().

◆ RexxRoutine2() [4/8]

RexxRoutine2 ( int  ,
SockGetHostByName  ,
CSTRING  ,
name  ,
RexxObjectPtr  ,
stemSource   
)

Definition at line 301 of file rxsockfn.cpp.

References hostEntToStem(), StemManager::resolveStem(), and setErrno().

◆ RexxRoutine2() [5/8]

RexxRoutine2 ( int  ,
SockGetPeerName  ,
int  ,
sock  ,
RexxObjectPtr  ,
stemSource   
)

Definition at line 418 of file rxsockfn.cpp.

References StemManager::resolveStem(), setErrno(), and sockAddrToStem().

◆ RexxRoutine2() [6/8]

RexxRoutine2 ( int  ,
SockGetSockName  ,
int  ,
sock  ,
RexxObjectPtr  ,
stemSource   
)

Definition at line 455 of file rxsockfn.cpp.

References StemManager::resolveStem(), setErrno(), and sockAddrToStem().

◆ RexxRoutine2() [7/8]

RexxRoutine2 ( int  ,
SockListen  ,
int  ,
sock  ,
int  ,
backlog   
)

Definition at line 631 of file rxsockfn.cpp.

References setErrno().

◆ RexxRoutine2() [8/8]

RexxRoutine2 ( int  ,
SockShutDown  ,
int  ,
sock  ,
int  ,
how   
)

Definition at line 1213 of file rxsockfn.cpp.

References setErrno().

◆ RexxRoutine3() [1/4]

RexxRoutine3 ( int  ,
SockGetHostByAddr  ,
CSTRING  ,
addrArg  ,
RexxObjectPtr  ,
stemSource  ,
OPTIONAL_int  ,
domain   
)

Definition at line 258 of file rxsockfn.cpp.

References argumentOmitted, hostEntToStem(), StemManager::resolveStem(), and setErrno().

◆ RexxRoutine3() [2/4]

RexxRoutine3 ( int  ,
SockIoctl  ,
int  ,
sock  ,
CSTRING  ,
command  ,
RexxObjectPtr  ,
var   
)

Definition at line 569 of file rxsockfn.cpp.

References caselessCompare(), and setErrno().

◆ RexxRoutine3() [3/4]

RexxRoutine3 ( int  ,
SockSend  ,
int  ,
sock  ,
RexxStringObject  ,
dataObj  ,
OPTIONAL_CSTRING  ,
flagArg   
)

Definition at line 1008 of file rxsockfn.cpp.

References caselessCompare(), and setErrno().

◆ RexxRoutine3() [4/4]

RexxRoutine3 ( int  ,
SockSocket  ,
CSTRING  ,
domainArg  ,
CSTRING  ,
typeArg  ,
CSTRING  ,
protocolArg   
)

Definition at line 1260 of file rxsockfn.cpp.

References caselessCompare(), setErrno(), stripBlanks(), and type.

◆ RexxRoutine4() [1/5]

RexxRoutine4 ( int  ,
SockGetSockOpt  ,
int  ,
sock  ,
CSTRING  ,
level  ,
CSTRING  ,
option  ,
CSTRING  ,
var   
)

Definition at line 491 of file rxsockfn.cpp.

References caselessCompare(), setErrno(), and stringToSockOpt().

◆ RexxRoutine4() [2/5]

RexxRoutine4 ( int  ,
SockRecv  ,
int  ,
sock  ,
CSTRING  ,
var  ,
int  ,
dataLen  ,
OPTIONAL_CSTRING  ,
flagVal   
)

Definition at line 649 of file rxsockfn.cpp.

References caselessCompare(), and setErrno().

◆ RexxRoutine4() [3/5]

RexxRoutine4 ( int  ,
SockSelect  ,
OPTIONAL_RexxObjectPtr  ,
array1  ,
OPTIONAL_RexxObjectPtr  ,
array2  ,
OPTIONAL_RexxObjectPtr  ,
array3  ,
OPTIONAL_int  ,
timeout   
)

Definition at line 815 of file rxsockfn.cpp.

References argumentOmitted, intArrayToStem(), setErrno(), and stemToIntArray().

◆ RexxRoutine4() [4/5]

RexxRoutine4 ( int  ,
SockSendTo  ,
int  ,
sock  ,
RexxStringObject  ,
dataObj  ,
RexxObjectPtr  ,
flagsOrStem  ,
OPTIONAL_RexxObjectPtr  ,
stemSource   
)

◆ RexxRoutine4() [5/5]

RexxRoutine4 ( int  ,
SockSetSockOpt  ,
int  ,
sock  ,
CSTRING  ,
target  ,
CSTRING  ,
option  ,
CSTRING  ,
arg   
)

Definition at line 1138 of file rxsockfn.cpp.

References caselessCompare(), setErrno(), and stringToSockOpt().

◆ RexxRoutine5()

RexxRoutine5 ( int  ,
SockRecvFrom  ,
int  ,
sock  ,
CSTRING  ,
var  ,
int  ,
dataLen  ,
RexxObjectPtr  ,
flagArg  ,
OPTIONAL_RexxObjectPtr  ,
stemSource   
)