RTP Audio System  2.0.0
ext_socket.h File Reference
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <sys/fcntl.h>
#include <sys/time.h>
#include <inttypes.h>
#include <netinet/in.h>
#include <poll.h>

Go to the source code of this file.

Classes

struct  sctp_initmsg
struct  sctp_sndrcvinfo
struct  sctp_assoc_change
struct  sctp_paddr_change
struct  sctp_remote_error
struct  sctp_send_failed
struct  sctp_shutdown_event
struct  sctp_adaptation_event
struct  sctp_pdapi_event
struct  sctp_data_arrive
union  sctp_notification
struct  sctp_rtoinfo
struct  sctp_assocparams
struct  sctp_setprim
struct  sctp_setpeerprim
struct  sctp_setstrm_timeout
struct  sctp_paddrparams
struct  sctp_paddrinfo
struct  sctp_status
struct  sctp_event_subscribe
struct  sctp_assoc_value
struct  sctp_sack_info

Defines

#define SOCKETAPI_MAJOR_VERSION   0x2
#define SOCKETAPI_MINOR_VERSION   0x2200
#define MSG_UNORDERED   MSG_DONTROUTE
#define MSG_UNBUNDLED   MSG_CTRUNC
#define MSG_SHUTDOWN   MSG_EOF
#define MSG_MULTIADDRS   MSG_TRUNC
#define MSG_ABORT   0x200
#define MSG_PR_SCTP_TTL   0x400
#define MSG_ADDR_OVER   0x800
#define MSG_SEND_TO_ALL   0xc00
#define SCTP_UNORDERED   MSG_UNORDERED
#define SCTP_UNBUNDLED   MSG_UNBUNDLED
#define SCTP_NOTIFICATION   MSG_NOTIFICATION
#define SCTP_ABORT   MSG_ABORT
#define SCTP_EOF   MSG_EOF
#define SCTP_ADDR_OVER   MSG_ADDR_OVER
#define SCTP_SEND_TO_ALL   MSG_SEND_TO_ALL
#define SCTP_MULTIADDRS   MSG_MULTIADDRS
#define SCTP_UNDEFINED   0
#define SCTP_INIT   1
#define SCTP_SNDRCV   2
#define SCTP_ASSOC_CHANGE   1
#define SCTP_COMM_UP   11
#define SCTP_COMM_LOST   12
#define SCTP_RESTART   13
#define SCTP_SHUTDOWN_COMP   14
#define SCTP_CANT_STR_ASSOC   15
#define SCTP_PEER_ADDR_CHANGE   2
#define SCTP_ADDR_REACHABLE   21
#define SCTP_ADDR_UNREACHABLE   22
#define SCTP_ADDR_REMOVED   23
#define SCTP_ADDR_ADDED   24
#define SCTP_ADDR_MADE_PRIM   25
#define SCTP_ADDR_CONFIRMED   26
#define SCTP_REMOTE_ERROR   3
#define SCTP_SEND_FAILED   4
#define SCTP_DATA_UNSENT   41
#define SCTP_DATA_SENT   42
#define SCTP_SHUTDOWN_EVENT   5
#define SCTP_ADAPTATION_INDICATION   6
#define SCTP_PARTIAL_DELIVERY_EVENT   7
#define SCTP_PARTIAL_DELIVERY_ABORTED   1
#define SCTP_DATA_ARRIVE   8
#define SCTP_ARRIVE_UNORDERED   (1 << 0)
#define SPP_HB_ENABLE   (1 << 0)
#define SPP_HB_DISABLE   (1 << 1)
#define SPP_PMTUD_ENABLE   (1 << 2)
#define SPP_PMTUD_DISABLE   (1 << 3)
#define SPP_SACKDELAY_ENABLE   (1 << 4)
#define SPP_SACKDELAY_DISABLE   (1 << 5)
#define SCTP_INACTIVE   0
#define SCTP_ACTIVE   1
#define SCTP_INITMSG   1000
#define SCTP_AUTOCLOSE   1001
#define SCTP_RTOINFO   1010
#define SCTP_ASSOCINFO   1011
#define SCTP_PRIMARY_ADDR   1012
#define SCTP_SET_PEER_PRIMARY_ADDR   1013
#define SCTP_SET_STREAM_TIMEOUTS   1014
#define SCTP_PEER_ADDR_PARAMS   1015
#define SCTP_STATUS   1016
#define SCTP_GET_PEER_ADDR_INFO   1017
#define SCTP_NODELAY   1018
#define SCTP_SET_DEFAULT_SEND_PARAM   1019
#define SCTP_EVENTS   1020
#define SCTP_DELAYED_SACK   1021
#define SCTP_FRAGMENT_INTERLEAVE   1022
#define SCTP_PARTIAL_DELIVERY_POINT   1023
#define SCTP_MAXSEG   1024
#define SCTP_I_WANT_MAPPED_V4_ADDR   1025
#define SCTP_BINDX_ADD_ADDR   1
#define SCTP_BINDX_REM_ADDR   2
#define sctp_connectx   ext_connectx

Typedefs

typedef unsigned int sctp_assoc_t
typedef unsigned short sctp_stream_t

Functions

unsigned int socketAPIGetVersion ()
int ext_socket (int domain, int type, int protocol)
int ext_open (const char *pathname, int flags, mode_t mode)
int ext_creat (const char *pathname, mode_t mode)
int ext_bind (int sockfd, struct sockaddr *my_addr, socklen_t addrlen)
int ext_connect (int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen)
int ext_listen (int s, int backlog)
int ext_accept (int s, struct sockaddr *addr, socklen_t *addrlen)
int ext_shutdown (int s, int how)
int ext_close (int fd)
int ext_getsockname (int sockfd, struct sockaddr *name, socklen_t *namelen)
int ext_getpeername (int sockfd, struct sockaddr *name, socklen_t *namelen)
int ext_fcntl (int fd, int cmd,...)
int ext_ioctl (int d, int request, const void *argp)
int ext_getsockopt (int sockfd, int level, int optname, void *optval, socklen_t *optlen)
int ext_setsockopt (int sockfd, int level, int optname, const void *optval, socklen_t optlen)
ssize_t ext_recv (int s, void *buf, size_t len, int flags)
ssize_t ext_recvfrom (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)
ssize_t ext_recvmsg (int s, struct msghdr *msg, int flags)
ssize_t ext_send (int s, const void *msg, size_t len, int flags)
ssize_t ext_sendto (int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)
ssize_t ext_sendmsg (int s, const struct msghdr *msg, int flags)
ssize_t ext_read (int fd, void *buf, size_t count)
ssize_t ext_write (int fd, const void *buf, size_t count)
int ext_select (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout)
int ext_poll (struct pollfd *fdlist, long unsigned int count, int time)
int ext_recvmsg2 (int sockfd, struct msghdr *msg, int flags, const int receiveNotifications)
int sctp_bindx (int sockfd, struct sockaddr *addrs, int addrcnt, int flags)
int ext_connectx (int sockfd, const struct sockaddr *addrs, int addrcnt, sctp_assoc_t *id)
int sctp_peeloff (int sockfd, sctp_assoc_t id)
int sctp_getpaddrs (int sockfd, sctp_assoc_t id, struct sockaddr **addrs)
void sctp_freepaddrs (struct sockaddr *addrs)
int sctp_getladdrs (int sockfd, sctp_assoc_t id, struct sockaddr **addrs)
void sctp_freeladdrs (struct sockaddr *addrs)
int sctp_opt_info (int sd, sctp_assoc_t assocID, int opt, void *arg, socklen_t *size)
ssize_t sctp_send (int s, const void *data, size_t len, const struct sctp_sndrcvinfo *sinfo, int flags)
ssize_t sctp_sendx (int sd, const void *data, size_t len, const struct sockaddr *addrs, int addrcnt, const struct sctp_sndrcvinfo *sinfo, int flags)
ssize_t sctp_sendmsg (int s, const void *data, size_t len, const struct sockaddr *to, socklen_t tolen, uint32_t ppid, uint32_t flags, uint16_t stream_no, uint32_t timetolive, uint32_t context)
ssize_t sctp_recvmsg (int s, void *msg, size_t len, struct sockaddr *from, socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, int *msg_flags)
int ext_pipe (int fds[2])
int sctp_isavailable ()
int sctp_enableOOTBHandling (const unsigned int enable)
int sctp_enableCRC32 (const unsigned int enable)

Define Documentation

#define MSG_ABORT   0x200
#define MSG_ADDR_OVER   0x800
#define MSG_MULTIADDRS   MSG_TRUNC
#define MSG_PR_SCTP_TTL   0x400
#define MSG_SEND_TO_ALL   0xc00
#define MSG_SHUTDOWN   MSG_EOF
#define MSG_UNBUNDLED   MSG_CTRUNC
#define MSG_UNORDERED   MSG_DONTROUTE
#define SCTP_ABORT   MSG_ABORT
#define SCTP_ACTIVE   1
#define SCTP_ADDR_ADDED   24
#define SCTP_ADDR_CONFIRMED   26
#define SCTP_ADDR_MADE_PRIM   25
#define SCTP_ADDR_REACHABLE   21
#define SCTP_ADDR_REMOVED   23
#define SCTP_ADDR_UNREACHABLE   22
#define SCTP_ARRIVE_UNORDERED   (1 << 0)
#define SCTP_ASSOC_CHANGE   1
#define SCTP_ASSOCINFO   1011
#define SCTP_AUTOCLOSE   1001
#define SCTP_BINDX_ADD_ADDR   1
#define SCTP_BINDX_REM_ADDR   2
#define SCTP_CANT_STR_ASSOC   15
#define SCTP_COMM_LOST   12
#define SCTP_COMM_UP   11
#define SCTP_DATA_ARRIVE   8
#define SCTP_DATA_SENT   42
#define SCTP_DATA_UNSENT   41
#define SCTP_DELAYED_SACK   1021
#define SCTP_EOF   MSG_EOF
#define SCTP_EVENTS   1020
#define SCTP_FRAGMENT_INTERLEAVE   1022
#define SCTP_GET_PEER_ADDR_INFO   1017
#define SCTP_I_WANT_MAPPED_V4_ADDR   1025
#define SCTP_INACTIVE   0
#define SCTP_INIT   1
#define SCTP_INITMSG   1000
#define SCTP_MAXSEG   1024
#define SCTP_NODELAY   1018
#define SCTP_NOTIFICATION   MSG_NOTIFICATION
#define SCTP_PARTIAL_DELIVERY_POINT   1023
#define SCTP_PEER_ADDR_CHANGE   2
#define SCTP_PEER_ADDR_PARAMS   1015
#define SCTP_PRIMARY_ADDR   1012
#define SCTP_REMOTE_ERROR   3
#define SCTP_RESTART   13
#define SCTP_RTOINFO   1010
#define SCTP_SEND_FAILED   4
#define SCTP_SET_DEFAULT_SEND_PARAM   1019
#define SCTP_SET_PEER_PRIMARY_ADDR   1013
#define SCTP_SET_STREAM_TIMEOUTS   1014
#define SCTP_SHUTDOWN_COMP   14
#define SCTP_SHUTDOWN_EVENT   5
#define SCTP_SNDRCV   2
#define SCTP_STATUS   1016
#define SCTP_UNDEFINED   0
#define SOCKETAPI_MAJOR_VERSION   0x2
#define SOCKETAPI_MINOR_VERSION   0x2200
#define SPP_HB_DISABLE   (1 << 1)
#define SPP_HB_ENABLE   (1 << 0)
#define SPP_PMTUD_DISABLE   (1 << 3)
#define SPP_PMTUD_ENABLE   (1 << 2)
#define SPP_SACKDELAY_DISABLE   (1 << 5)
#define SPP_SACKDELAY_ENABLE   (1 << 4)

Typedef Documentation

typedef unsigned int sctp_assoc_t
typedef unsigned short sctp_stream_t

Function Documentation

int ext_accept ( int  s,
struct sockaddr *  addr,
socklen_t *  addrlen 
)
int ext_bind ( int  sockfd,
struct sockaddr *  my_addr,
socklen_t  addrlen 
)
int ext_close ( int  fd)
int ext_connect ( int  sockfd,
const struct sockaddr *  serv_addr,
socklen_t  addrlen 
)
int ext_connectx ( int  sockfd,
const struct sockaddr *  addrs,
int  addrcnt,
sctp_assoc_t id 
)
int ext_creat ( const char *  pathname,
mode_t  mode 
)
int ext_fcntl ( int  fd,
int  cmd,
  ... 
)
int ext_getpeername ( int  sockfd,
struct sockaddr *  name,
socklen_t *  namelen 
)
int ext_getsockname ( int  sockfd,
struct sockaddr *  name,
socklen_t *  namelen 
)
int ext_getsockopt ( int  sockfd,
int  level,
int  optname,
void *  optval,
socklen_t *  optlen 
)
int ext_ioctl ( int  d,
int  request,
const void *  argp 
)
int ext_listen ( int  s,
int  backlog 
)
int ext_open ( const char *  pathname,
int  flags,
mode_t  mode 
)
int ext_pipe ( int  fds[2])
int ext_poll ( struct pollfd *  fdlist,
long unsigned int  count,
int  time 
)
ssize_t ext_read ( int  fd,
void *  buf,
size_t  count 
)
ssize_t ext_recv ( int  s,
void *  buf,
size_t  len,
int  flags 
)
ssize_t ext_recvfrom ( int  s,
void *  buf,
size_t  len,
int  flags,
struct sockaddr *  from,
socklen_t *  fromlen 
)
ssize_t ext_recvmsg ( int  s,
struct msghdr *  msg,
int  flags 
)
int ext_recvmsg2 ( int  sockfd,
struct msghdr *  msg,
int  flags,
const int  receiveNotifications 
)
int ext_select ( int  n,
fd_set *  readfds,
fd_set *  writefds,
fd_set *  exceptfds,
struct timeval *  timeout 
)
ssize_t ext_send ( int  s,
const void *  msg,
size_t  len,
int  flags 
)
ssize_t ext_sendmsg ( int  s,
const struct msghdr *  msg,
int  flags 
)
ssize_t ext_sendto ( int  s,
const void *  msg,
size_t  len,
int  flags,
const struct sockaddr *  to,
socklen_t  tolen 
)
int ext_setsockopt ( int  sockfd,
int  level,
int  optname,
const void *  optval,
socklen_t  optlen 
)
int ext_shutdown ( int  s,
int  how 
)
int ext_socket ( int  domain,
int  type,
int  protocol 
)
ssize_t ext_write ( int  fd,
const void *  buf,
size_t  count 
)
int sctp_bindx ( int  sockfd,
struct sockaddr *  addrs,
int  addrcnt,
int  flags 
)
int sctp_enableCRC32 ( const unsigned int  enable)

Enable or disable CRC32 checksum.

Parameters:
enable0 to disable (use Adler32), <>0 to enable CRC32.
Returns:
0 for success, error code in case of error.
int sctp_enableOOTBHandling ( const unsigned int  enable)

Enable or disable OOTB handling.

Parameters:
enable0 to disable, <>0 to enable OOTB handling.
Returns:
0 for success, error code in case of error.
void sctp_freeladdrs ( struct sockaddr *  addrs)
void sctp_freepaddrs ( struct sockaddr *  addrs)
int sctp_getladdrs ( int  sockfd,
sctp_assoc_t  id,
struct sockaddr **  addrs 
)
int sctp_getpaddrs ( int  sockfd,
sctp_assoc_t  id,
struct sockaddr **  addrs 
)

Check, if SCTP support is available.

Returns:
true, if SCTP is available; false otherwise.
int sctp_opt_info ( int  sd,
sctp_assoc_t  assocID,
int  opt,
void *  arg,
socklen_t *  size 
)
int sctp_peeloff ( int  sockfd,
sctp_assoc_t  id 
)
ssize_t sctp_recvmsg ( int  s,
void *  msg,
size_t  len,
struct sockaddr *  from,
socklen_t *  fromlen,
struct sctp_sndrcvinfo sinfo,
int *  msg_flags 
)
ssize_t sctp_send ( int  s,
const void *  data,
size_t  len,
const struct sctp_sndrcvinfo sinfo,
int  flags 
)
ssize_t sctp_sendmsg ( int  s,
const void *  data,
size_t  len,
const struct sockaddr *  to,
socklen_t  tolen,
uint32_t  ppid,
uint32_t  flags,
uint16_t  stream_no,
uint32_t  timetolive,
uint32_t  context 
)
ssize_t sctp_sendx ( int  sd,
const void *  data,
size_t  len,
const struct sockaddr *  addrs,
int  addrcnt,
const struct sctp_sndrcvinfo sinfo,
int  flags 
)
unsigned int socketAPIGetVersion ( )
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines