VSF Documented
|
#include "shell/sys/linux/vsf_linux_cfg.h"
#include "../sys/types.h"
#include "utilities/vsf_utilities.h"
Go to the source code of this file.
Data Structures | |
struct | sockaddr |
struct | sockaddr_storage |
struct | linger |
struct | msghdr |
struct | cmsghdr |
struct | vsf_linux_sys_socket_vplt_t |
Typedefs | |
typedef uint32_t | socklen_t |
typedef uint16_t | sa_family_t |
typedef struct vsf_linux_sys_socket_vplt_t | vsf_linux_sys_socket_vplt_t |
Enumerations | |
enum | sock_type { SOCK_STREAM = 1 , SOCK_DGRAM = 2 , SOCK_RAW = 3 , SOCK_RDM = 4 , SOCK_SEQPACKET = 5 , SOCK_PACKET = 10 } |
enum | { MSG_OOB = 1 << 0 , MSG_OOB = 1 << 0 , MSG_PEEK = 1 << 1 , MSG_PEEK = 1 << 1 , MSG_DONTROUTE = 1 << 2 , MSG_DONTROUTE = 1 << 2 , MSG_CTRUNC = 1 << 3 , MSG_CTRUNC = 1 << 3 , MSG_TRUNC = 1 << 5 , MSG_TRUNC = 1 << 5 , MSG_DONTWAIT = 1 << 6 , MSG_DONTWAIT = 1 << 6 , MSG_WAITALL = 1 << 8 , MSG_WAITALL = 1 << 8 , MSG_NOSIGNAL = 1 << 14 , MSG_NOSIGNAL = 1 << 14 } |
enum | { SHUT_RD = 1 << 0 , SHUT_WR = 1 << 1 , SHUT_RDWR = SHUT_RD | SHUT_WR } |
Functions | |
int | setsockopt (int sockfd, int level, int optname, const void *optval, socklen_t optlen) |
int | getsockopt (int sockfd, int level, int optname, void *optval, socklen_t *optlen) |
int | getpeername (int sockfd, struct sockaddr *addr, socklen_t *addrlen) |
int | getsockname (int sockfd, struct sockaddr *addr, socklen_t *addrlen) |
int | accept (int sockfd, struct sockaddr *addr, socklen_t *addrlen) |
int | accept4 (int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) |
int | bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
int | connect (int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
int | listen (int sockfd, int backlog) |
ssize_t | recv (int sockfd, void *buffer, size_t length, int flags) |
ssize_t | recvmsg (int sockfd, struct msghdr *msg, int flags) |
ssize_t | recvfrom (int sockfd, void *buffer, size_t length, int flags, struct sockaddr *src_addr, socklen_t *addrlen) |
ssize_t | send (int sockfd, const void *buffer, size_t length, int flags) |
ssize_t | sendmsg (int sockfd, const struct msghdr *msg, int flags) |
ssize_t | sendto (int sockfd, const void *buffer, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) |
int | shutdown (int sockfd, int how) |
int | socket (int domain, int type, int protocol) |
int | socketpair (int domain, int type, int protocol, int socket_vector[2]) |
Variables | |
__VSF_VPLT_DECORATOR__ vsf_linux_sys_socket_vplt_t | vsf_linux_sys_socket_vplt |
#define SOMAXCONN 256 |
#define SCM_RIGHTS 0x01 |
#define SCM_CREDENTIALS 0x02 |
#define SCM_SECURITY 0x03 |
#define PF_UNSPEC 0 |
#define PF_LOCAL 1 |
#define PF_UNIX PF_LOCAL |
#define PF_INET 2 |
#define PF_INET6 10 |
#define PF_NETLINK 16 |
#define PF_PACKET 17 |
#define AF_UNSPEC PF_UNSPEC |
#define AF_LOCAL PF_LOCAL |
#define AF_UNIX PF_UNIX |
#define AF_FILE PF_FILE |
#define AF_INET PF_INET |
#define AF_INET6 PF_INET6 |
#define AF_NETLINK PF_NETLINK |
#define AF_PACKET PF_PACKET |
#define SOL_IP IPPROTO_IP |
#define SOL_TCP IPPROTO_TCP |
#define SOL_UDP IPPROTO_UDP |
#define IP_TOS 1 |
#define IP_TTL 2 |
#define IP_HDRINCL 3 |
#define IP_OPTIONS 4 |
#define SOCK_MAX (SOCK_PACKET + 1) |
#define SOCK_CLOEXEC O_CLOEXEC |
#define SOCK_NONBLOCK O_NONBLOCK |
#define INVALID_SOCKET -1 |
#define SOCKET_ERROR -1 |
#define __socklen_t_defined |
#define VSF_LINUX_SOCKET_WRAPPER | ( | __api | ) | VSF_SHELL_WRAPPER(vsf_linux_socket, __api) |
#define setsockopt VSF_LINUX_SOCKET_WRAPPER(setsockopt) |
#define getsockopt VSF_LINUX_SOCKET_WRAPPER(getsockopt) |
#define getpeername VSF_LINUX_SOCKET_WRAPPER(getpeername) |
#define getsockname VSF_LINUX_SOCKET_WRAPPER(getsockname) |
#define accept VSF_LINUX_SOCKET_WRAPPER(accept) |
#define accept4 VSF_LINUX_SOCKET_WRAPPER(accept4) |
#define bind VSF_LINUX_SOCKET_WRAPPER(bind) |
#define connect VSF_LINUX_SOCKET_WRAPPER(connect) |
#define listen VSF_LINUX_SOCKET_WRAPPER(listen) |
#define recv VSF_LINUX_SOCKET_WRAPPER(recv) |
#define recvmsg VSF_LINUX_SOCKET_WRAPPER(recvmsg) |
#define recvfrom VSF_LINUX_SOCKET_WRAPPER(recvfrom) |
#define send VSF_LINUX_SOCKET_WRAPPER(send) |
#define sendmsg VSF_LINUX_SOCKET_WRAPPER(sendmsg) |
#define sendto VSF_LINUX_SOCKET_WRAPPER(sendto) |
#define shutdown VSF_LINUX_SOCKET_WRAPPER(shutdown) |
#define socket VSF_LINUX_SOCKET_WRAPPER(socket) |
#define socketpair VSF_LINUX_SOCKET_WRAPPER(socketpair) |
#define __NR_connect connect |
#define __NR_accept accept |
#define __NR_accept4 accept4 |
#define __NR_bind bind |
#define SOL_SOCKET 0xFFFF |
#define SO_DEBUG 1 |
#define SO_REUSEADDR 2 |
#define SO_TYPE 3 |
#define SO_ERROR 4 |
#define SO_DONTROUTE 5 |
#define SO_BROADCAST 6 |
#define SO_SNDBUF 7 |
#define SO_RCVBUF 8 |
#define SO_KEEPALIVE 9 |
#define SO_OOBINLINE 10 |
#define SO_NO_CHECK 11 |
#define SO_PRIORITY 12 |
#define SO_LINGER 13 |
#define SO_BSDCOMPAT 14 |
#define SO_REUSEPORT 15 |
#define SO_RCVLOWAT 18 |
#define SO_SNDLOWAT 19 |
#define SO_RCVTIMEO 20 |
#define SO_SNDTIMEO 21 |
#define SO_BINDTODEVICE 25 |
#define SO_MAX_PACING_RATE 47 |
#define SO_NONBLOCK 100 |
#define IP_TOS 1 |
#define IP_TTL 2 |
#define IP_HDRINCL 3 |
#define IP_OPTIONS 4 |
#define IP_PKTINFO 8 |
#define IP_MULTICAST_IF 32 |
#define IP_MULTICAST_TTL 33 |
#define IP_MULTICAST_LOOP 34 |
#define IP_ADD_MEMBERSHIP 35 |
#define IP_DROP_MEMBERSHIP 36 |
#define IP_MULTICAST_ALL 49 |
#define IPV6_UNICAST_HOPS 16 |
#define IPV6_MULTICAST_IF 17 |
#define IPV6_MULTICAST_HOPS 18 |
#define IPV6_MULTICAST_LOOP 19 |
#define IPV6_JOIN_GROUP 20 |
#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP |
#define IPV6_LEAVE_GROUP 21 |
#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP |
#define IPV6_V6ONLY 26 |
#define MSG_OOB MSG_OOB |
#define MSG_PEEK MSG_PEEK |
#define MSG_DONTROUTE MSG_DONTROUTE |
#define MSG_CTRUNC MSG_CTRUNC |
#define MSG_TRUNC MSG_TRUNC |
#define MSG_DONTWAIT MSG_DONTWAIT |
#define MSG_WAITALL MSG_WAITALL |
#define MSG_NOSIGNAL MSG_NOSIGNAL |
#define CMSG_ALIGN | ( | len | ) | (((len)+sizeof(long)-1) & ~(sizeof(long)-1)) |
#define CMSG_SPACE | ( | len | ) | (sizeof(struct cmsghdr) + CMSG_ALIGN(len)) |
#define CMSG_LEN | ( | len | ) | (sizeof(struct cmsghdr) + (len)) |
#define CMSG_FIRSTHDR | ( | msg | ) |
typedef uint16_t sa_family_t |
typedef struct vsf_linux_sys_socket_vplt_t vsf_linux_sys_socket_vplt_t |
enum sock_type |
anonymous enum |
int setsockopt | ( | int | sockfd, |
int | level, | ||
int | optname, | ||
const void * | optval, | ||
socklen_t | optlen | ||
) |
int getsockopt | ( | int | sockfd, |
int | level, | ||
int | optname, | ||
void * | optval, | ||
socklen_t * | optlen | ||
) |
int listen | ( | int | sockfd, |
int | backlog | ||
) |
ssize_t recvfrom | ( | int | sockfd, |
void * | buffer, | ||
size_t | length, | ||
int | flags, | ||
struct sockaddr * | src_addr, | ||
socklen_t * | addrlen | ||
) |
ssize_t sendto | ( | int | sockfd, |
const void * | buffer, | ||
size_t | length, | ||
int | flags, | ||
const struct sockaddr * | dest_addr, | ||
socklen_t | addrlen | ||
) |
int shutdown | ( | int | sockfd, |
int | how | ||
) |
int socket | ( | int | domain, |
int | type, | ||
int | protocol | ||
) |
int socketpair | ( | int | domain, |
int | type, | ||
int | protocol, | ||
int | socket_vector[2] | ||
) |
|
extern |