| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

socket.h
Go to the documentation of this file.
1
9 #ifndef _TZSL_SYS_SOCKET_H_
10 #define _TZSL_SYS_SOCKET_H_
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 #include <core/socket.h>
17 #include <sys/types.h>
18
20 typedef int socklen_t;
21
30 int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
31
40 int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
41
50 int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
51
63 int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen);
64
76 int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen);
77
86 int listen(int sockfd, int backlog);
87
96 int socket(int socket_family, int socket_type, int protocol);
97
107 ssize_t recv(int sockfd, void *buf, size_t len, int flags);
108
118 ssize_t send(int sockfd, const void *buf, size_t len, int flags);
119
129 int socketpair(int socket_family, int socket_type, int protocol, int sv[2]);
130
139 ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
140
149 ssize_t sendmsg(int sockfd, struct msghdr *msg, int flags);
150
151 #ifdef __cplusplus
152 }
153 #endif
154
155 #endif /* _TZSL_SYS_SOCKET_H_ */
156
types.h
Wrapper for kernel types.h header.
send
ssize_t send(int sockfd, const void *buf, size_t len, int flags)
Send a message to a socket.
recvmsg
ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags)
Receive multipple message on a socket.
bind
int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
Bind a name to a socket.
accept
int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
Accept a connection on a socket.
getsockopt
int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen)
Get options on socket.
listen
int listen(int sockfd, int backlog)
Listen for connections on a socket.
socketpair
int socketpair(int socket_family, int socket_type, int protocol, int sv[2])
Create a pair of connected sockets.
connect
int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
Initiate a connection on a socket.
socket
int socket(int socket_family, int socket_type, int protocol)
Create endpoint for communication.
socklen_t
int socklen_t
A type of width of at least 32 bits representing lengths in socket subsystem.
Definition: socket.h:20
sendmsg
ssize_t sendmsg(int sockfd, struct msghdr *msg, int flags)
Send multipple message on a socket.
recv
ssize_t recv(int sockfd, void *buf, size_t len, int flags)
Receive a message from a socket.
ssize_t
intptr_t ssize_t
Definition: types.h:17
setsockopt
int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen)
Set options on socket.