|
#define | OSL_INADDR_NONE 0xffffffff |
|
#define | OSL_INVALID_PORT (-1) |
|
enum | oslAddrFamily { osl_Socket_FamilyInet,
osl_Socket_FamilyIpx,
osl_Socket_FamilyInvalid,
osl_Socket_Family_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| Represents the address-family of a socket. More...
|
|
enum | oslProtocol {
osl_Socket_ProtocolIp,
osl_Socket_ProtocolIpx,
osl_Socket_ProtocolSpx,
osl_Socket_ProtocolSpxII,
osl_Socket_ProtocolInvalid,
osl_Socket_Protocol_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| represent a specific protocol within an address-family More...
|
|
enum | oslSocketType {
osl_Socket_TypeStream,
osl_Socket_TypeDgram,
osl_Socket_TypeRaw,
osl_Socket_TypeRdm,
osl_Socket_TypeSeqPacket,
osl_Socket_TypeInvalid,
osl_Socket_Type_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| Represents the type of a socket. More...
|
|
enum | oslSocketOption {
osl_Socket_OptionDebug,
osl_Socket_OptionAcceptConn,
osl_Socket_OptionReuseAddr,
osl_Socket_OptionKeepAlive,
osl_Socket_OptionDontRoute,
osl_Socket_OptionBroadcast,
osl_Socket_OptionUseLoopback,
osl_Socket_OptionLinger,
osl_Socket_OptionOOBinLine,
osl_Socket_OptionSndBuf,
osl_Socket_OptionRcvBuf,
osl_Socket_OptionSndLowat,
osl_Socket_OptionRcvLowat,
osl_Socket_OptionSndTimeo,
osl_Socket_OptionRcvTimeo,
osl_Socket_OptionError,
osl_Socket_OptionType,
osl_Socket_OptionTcpNoDelay,
osl_Socket_OptionInvalid,
osl_Socket_Option_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| Represents socket-options. More...
|
|
enum | oslSocketOptionLevel { osl_Socket_LevelSocket,
osl_Socket_LevelTcp,
osl_Socket_LevelInvalid,
osl_Socket_Level_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| Represents the different socket-option levels. More...
|
|
enum | oslSocketMsgFlag {
osl_Socket_MsgNormal,
osl_Socket_MsgOOB,
osl_Socket_MsgPeek,
osl_Socket_MsgDontRoute,
osl_Socket_MsgMaxIOVLen,
osl_Socket_MsgInvalid,
osl_Socket_Msg_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| Represents flags to be used with send/recv-calls. More...
|
|
enum | oslSocketDirection {
osl_Socket_DirRead,
osl_Socket_DirWrite,
osl_Socket_DirReadWrite,
osl_Socket_DirInvalid,
osl_Socket_Dir_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| Used by shutdown to denote which end of the socket to "close". More...
|
|
enum | oslSocketError {
osl_Socket_E_None,
osl_Socket_E_NotSocket,
osl_Socket_E_DestAddrReq,
osl_Socket_E_MsgSize,
osl_Socket_E_Prototype,
osl_Socket_E_NoProtocol,
osl_Socket_E_ProtocolNoSupport,
osl_Socket_E_TypeNoSupport,
osl_Socket_E_OpNotSupport,
osl_Socket_E_PfNoSupport,
osl_Socket_E_AfNoSupport,
osl_Socket_E_AddrInUse,
osl_Socket_E_AddrNotAvail,
osl_Socket_E_NetDown,
osl_Socket_E_NetUnreachable,
osl_Socket_E_NetReset,
osl_Socket_E_ConnAborted,
osl_Socket_E_ConnReset,
osl_Socket_E_NoBufferSpace,
osl_Socket_E_IsConnected,
osl_Socket_E_NotConnected,
osl_Socket_E_Shutdown,
osl_Socket_E_TooManyRefs,
osl_Socket_E_TimedOut,
osl_Socket_E_ConnRefused,
osl_Socket_E_HostDown,
osl_Socket_E_HostUnreachable,
osl_Socket_E_WouldBlock,
osl_Socket_E_Already,
osl_Socket_E_InProgress,
osl_Socket_E_InvalidError,
osl_Socket_E_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| Describes the various error socket error conditions, which may occur. More...
|
|
enum | oslSocketResult {
osl_Socket_Ok,
osl_Socket_Error,
osl_Socket_TimedOut,
osl_Socket_Interrupted,
osl_Socket_InProgress,
osl_Socket_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
} |
| Common return codes of socket related functions. More...
|
|
typedef struct oslSocketAddrImpl * | oslSocketAddr |
| Opaque datatype SocketAddr. More...
|
|
typedef sal_uInt8 | oslSocketIpxNetNumber[4] |
|
typedef sal_uInt8 | oslSocketIpxNodeNumber[6] |
|
typedef struct oslSocketImpl * | oslSocket |
|
SAL_DLLPUBLIC oslSocket | osl_createSocket (oslAddrFamily Family, oslSocketType Type, oslProtocol Protocol) |
| Create a socket of the specified Family and Type. More...
|
|
SAL_DLLPUBLIC void | osl_acquireSocket (oslSocket Socket) |
| increases the refcount of the socket handle by one More...
|
|
SAL_DLLPUBLIC void | osl_releaseSocket (oslSocket Socket) |
| decreases the refcount of the socket handle by one. More...
|
|
SAL_DLLPUBLIC oslSocketAddr | osl_getLocalAddrOfSocket (oslSocket Socket) |
| Retrieves the Address of the local end of the socket. More...
|
|
SAL_DLLPUBLIC oslSocketAddr | osl_getPeerAddrOfSocket (oslSocket Socket) |
| Retrieves the Address of the remote end of the socket. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_bindAddrToSocket (oslSocket Socket, oslSocketAddr Addr) |
| Binds the given address to the socket. More...
|
|
SAL_DLLPUBLIC oslSocketResult | osl_connectSocketTo (oslSocket Socket, oslSocketAddr Addr, const TimeValue *pTimeout) |
| Connects the socket to the given address. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_listenOnSocket (oslSocket Socket, sal_Int32 MaxPendingConnections) |
| Prepares the socket to act as an acceptor of incoming connections. More...
|
|
SAL_DLLPUBLIC oslSocket | osl_acceptConnectionOnSocket (oslSocket Socket, oslSocketAddr *pAddr) |
| Waits for an ingoing connection on the socket. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_receiveSocket (oslSocket Socket, void *pBuffer, sal_uInt32 BytesToRead, oslSocketMsgFlag Flag) |
| Tries to receive BytesToRead data from the connected socket, if no error occurs. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_receiveFromSocket (oslSocket Socket, oslSocketAddr SenderAddr, void *pBuffer, sal_uInt32 BufferSize, oslSocketMsgFlag Flag) |
| Tries to receives BufferSize data from the (usually unconnected) (datagram-)socket, if no error occurs. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_sendSocket (oslSocket Socket, const void *pBuffer, sal_uInt32 BytesToSend, oslSocketMsgFlag Flag) |
| Tries to send BytesToSend data from the connected socket, if no error occurs. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_sendToSocket (oslSocket Socket, oslSocketAddr ReceiverAddr, const void *pBuffer, sal_uInt32 BytesToSend, oslSocketMsgFlag Flag) |
| Tries to send one datagram with BytesToSend data to the given ReceiverAddr via the (implicitly unconnected) datagram-socket. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_isReceiveReady (oslSocket Socket, const TimeValue *pTimeout) |
| Checks if read operations will block. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_isSendReady (oslSocket Socket, const TimeValue *pTimeout) |
| Checks if send operations will block. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_isExceptionPending (oslSocket Socket, const TimeValue *pTimeout) |
| Checks if a request for out-of-band data will block. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_shutdownSocket (oslSocket Socket, oslSocketDirection Direction) |
| Shuts down communication on a connected socket. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_getSocketOption (oslSocket Socket, oslSocketOptionLevel Level, oslSocketOption Option, void *pBuffer, sal_uInt32 BufferLen) |
| Retrieves attributes associated with the socket. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_setSocketOption (oslSocket Socket, oslSocketOptionLevel Level, oslSocketOption Option, void *pBuffer, sal_uInt32 BufferLen) |
| Sets the sockets attributes. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_enableNonBlockingMode (oslSocket Socket, sal_Bool On) |
| Enables/disables non-blocking-mode of the socket. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_isNonBlockingMode (oslSocket Socket) |
| Query state of non-blocking-mode of the socket. More...
|
|
SAL_DLLPUBLIC oslSocketType | osl_getSocketType (oslSocket Socket) |
| Queries the socket for its type. More...
|
|
SAL_DLLPUBLIC void | osl_getLastSocketErrorDescription (oslSocket Socket, rtl_uString **strError) |
| returns a string which describes the last socket error. More...
|
|
SAL_DLLPUBLIC oslSocketError | osl_getLastSocketError (oslSocket Socket) |
| Returns a constant describing the last error for the socket system. More...
|
|
SAL_DLLPUBLIC void | osl_closeSocket (oslSocket Socket) |
| Closes the socket terminating any ongoing dataflow. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_readSocket (oslSocket Socket, void *pBuffer, sal_Int32 nSize) |
| Retrieves n bytes from the stream and copies them into pBuffer. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_writeSocket (oslSocket Socket, const void *pBuffer, sal_Int32 nSize) |
| Writes n bytes from pBuffer to the stream. More...
|
|
typedef struct oslHostAddrImpl * | oslHostAddr |
|
SAL_DLLPUBLIC oslSocketAddr | osl_createEmptySocketAddr (oslAddrFamily Family) |
| Creates a socket-address for the given family. More...
|
|
SAL_DLLPUBLIC oslSocketAddr | osl_copySocketAddr (oslSocketAddr Addr) |
| Creates a new SocketAddress and fills it from Addr. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_isEqualSocketAddr (oslSocketAddr Addr1, oslSocketAddr Addr2) |
| Compares the values of two SocketAddresses. More...
|
|
SAL_DLLPUBLIC oslSocketAddr | osl_resolveHostname (rtl_uString *strHostname) |
| Uses the systems name-service interface to find an address for strHostname. More...
|
|
SAL_DLLPUBLIC oslSocketAddr | osl_createInetBroadcastAddr (rtl_uString *strDottedAddr, sal_Int32 Port) |
| Create an internet address usable for sending broadcast datagrams. More...
|
|
SAL_DLLPUBLIC oslSocketAddr | osl_createInetSocketAddr (rtl_uString *strDottedAddr, sal_Int32 Port) |
| Create an internet-address, consisting of host address and port. More...
|
|
SAL_DLLPUBLIC void | osl_destroySocketAddr (oslSocketAddr Addr) |
| Frees all resources allocated by Addr. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_getServicePort (rtl_uString *strServicename, rtl_uString *strProtocol) |
| Looks up the port-number designated to the specified service/protocol-pair. More...
|
|
SAL_DLLPUBLIC oslAddrFamily | osl_getFamilyOfSocketAddr (oslSocketAddr Addr) |
| Retrieves the address-family from the Addr. More...
|
|
SAL_DLLPUBLIC sal_Int32 | osl_getInetPortOfSocketAddr (oslSocketAddr Addr) |
| Retrieves the internet port-number of Addr. More...
|
|
SAL_DLLPUBLIC sal_Bool | osl_setInetPortOfSocketAddr (oslSocketAddr Addr, sal_Int32 Port) |
| Sets the Port of Addr. More...
|
|
SAL_DLLPUBLIC oslSocketResult | osl_getHostnameOfSocketAddr (oslSocketAddr Addr, rtl_uString **strHostname) |
| Returns the hostname represented by Addr. More...
|
|
SAL_DLLPUBLIC oslSocketResult | osl_getDottedInetAddrOfSocketAddr (oslSocketAddr Addr, rtl_uString **strDottedInetAddr) |
| Gets the address in dotted decimal format. More...
|
|
SAL_DLLPUBLIC oslSocketResult | osl_setAddrOfSocketAddr (oslSocketAddr Addr, sal_Sequence *pByteSeq) |
| Sets the addr field in the struct sockaddr with pByteSeq. More...
|
|
SAL_DLLPUBLIC oslSocketResult | osl_getAddrOfSocketAddr (oslSocketAddr Addr, sal_Sequence **ppByteSeq) |
| Returns the addr field in the struct sockaddr. More...
|
|
SAL_DLLPUBLIC oslHostAddr | osl_createHostAddr (rtl_uString *strHostname, const oslSocketAddr Addr) |
| Create an oslHostAddr from given hostname and socket address. More...
|
|
SAL_DLLPUBLIC oslHostAddr | osl_createHostAddrByName (rtl_uString *strHostname) |
| Create an oslHostAddr by resolving the given strHostname. More...
|
|
SAL_DLLPUBLIC oslHostAddr | osl_createHostAddrByAddr (const oslSocketAddr Addr) |
| Create an oslHostAddr by reverse resolution of the given Addr. More...
|
|
SAL_DLLPUBLIC oslHostAddr | osl_copyHostAddr (const oslHostAddr Addr) |
| Create a copy of the given Addr. More...
|
|
SAL_DLLPUBLIC void | osl_destroyHostAddr (oslHostAddr Addr) |
| Frees all resources allocated by Addr. More...
|
|
SAL_DLLPUBLIC void | osl_getHostnameOfHostAddr (const oslHostAddr Addr, rtl_uString **strHostname) |
| Get the hostname member of Addr. More...
|
|
SAL_DLLPUBLIC oslSocketAddr | osl_getSocketAddrOfHostAddr (const oslHostAddr Addr) |
| Get the socket address member of Addr. More...
|
|
SAL_DLLPUBLIC oslSocketResult | osl_getLocalHostname (rtl_uString **strLocalHostname) |
| Retrieve this machines hostname (NOT the FQDN) More...
|
|