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)
 
 RexxRoutine1 (int, SockSoClose, int, sock)
 

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 1241 of file rxsockfn.cpp.

References cleanup().

◆ RexxRoutine0() [2/4]

RexxRoutine0 ( int  ,
SockSock_Errno   
)

Definition at line 106 of file rxsockfn.cpp.

References sock_errno.

◆ RexxRoutine0() [3/4]

RexxRoutine0 ( RexxStringObject  ,
SockGetHostId   
)

Definition at line 340 of file rxsockfn.cpp.

References cleanup().

◆ RexxRoutine0() [4/4]

RexxRoutine0 ( RexxStringObject  ,
SockGetHostName   
)

Definition at line 403 of file rxsockfn.cpp.

References cleanup().

◆ RexxRoutine1() [1/3]

RexxRoutine1 ( CSTRING  ,
SockPSock_Errno  ,
OPTIONAL_CSTRING  ,
type   
)

Definition at line 118 of file rxsockfn.cpp.

References psock_errno, and type.

◆ RexxRoutine1() [2/3]

RexxRoutine1 ( int  ,
SockClose  ,
int  ,
sock   
)

Definition at line 209 of file rxsockfn.cpp.

References cleanup().

◆ RexxRoutine1() [3/3]

RexxRoutine1 ( int  ,
SockSoClose  ,
int  ,
sock   
)

Definition at line 1336 of file rxsockfn.cpp.

References cleanup().

◆ RexxRoutine2() [1/8]

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

Definition at line 142 of file rxsockfn.cpp.

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

◆ RexxRoutine2() [2/8]

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

Definition at line 177 of file rxsockfn.cpp.

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

◆ RexxRoutine2() [3/8]

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

Definition at line 231 of file rxsockfn.cpp.

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

◆ RexxRoutine2() [4/8]

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

Definition at line 306 of file rxsockfn.cpp.

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

◆ RexxRoutine2() [5/8]

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

Definition at line 426 of file rxsockfn.cpp.

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

◆ RexxRoutine2() [6/8]

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

Definition at line 463 of file rxsockfn.cpp.

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

◆ RexxRoutine2() [7/8]

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

Definition at line 639 of file rxsockfn.cpp.

References cleanup().

◆ RexxRoutine2() [8/8]

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

Definition at line 1219 of file rxsockfn.cpp.

References cleanup().

◆ RexxRoutine3() [1/4]

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

Definition at line 263 of file rxsockfn.cpp.

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

◆ RexxRoutine3() [2/4]

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

Definition at line 577 of file rxsockfn.cpp.

References caselessCompare(), and cleanup().

◆ RexxRoutine3() [3/4]

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

Definition at line 1016 of file rxsockfn.cpp.

References caselessCompare(), and cleanup().

◆ RexxRoutine3() [4/4]

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

Definition at line 1266 of file rxsockfn.cpp.

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

◆ RexxRoutine4() [1/5]

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

Definition at line 499 of file rxsockfn.cpp.

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

◆ RexxRoutine4() [2/5]

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

Definition at line 657 of file rxsockfn.cpp.

References caselessCompare(), and cleanup().

◆ RexxRoutine4() [3/5]

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

Definition at line 823 of file rxsockfn.cpp.

References argumentOmitted, cleanup(), intArrayToStem(), 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 1144 of file rxsockfn.cpp.

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

◆ RexxRoutine5()

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