![]() |
Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
|
#include <sys/types.h>

Go to the source code of this file.
Data Structures | |
| struct | sockaddr |
| struct | sockaddr_storage |
| struct | in_addr |
| struct | sockaddr_in |
| struct | in6_addr |
| struct | sockaddr_in6 |
| struct | msghdr |
Typedefs | |
| typedef unsigned short | sa_family_t |
Functions | |
| int | socket (int domain, int type, int protocol) |
| Create an endpoint for communication. More... | |
| int | bind (int sockfd, const struct sockaddr *addr, socklen_t addrlen) |
| Give the endpoint the address it answers on. More... | |
| int | listen (int sockfd, int backlog) |
| Let the endpoint take the connections that arrive. More... | |
| ssize_t | sendto (int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen) |
| Send a message to the address given. More... | |
Tenok has no network stack, only the types and constants are named
| int bind | ( | int | sockfd, |
| const struct sockaddr * | addr, | ||
| socklen_t | addrlen | ||
| ) |
Give the endpoint the address it answers on.
| sockfd | The endpoint. |
| addr | The address to answer on. |
| addrlen | The size of the address. |
| int | -1 with errno set to ENOSYS. |
| int listen | ( | int | sockfd, |
| int | backlog | ||
| ) |
Let the endpoint take the connections that arrive.
| sockfd | The endpoint. |
| backlog | How many may wait to be taken. |
| int | -1 with errno set to ENOSYS. |
| ssize_t sendto | ( | int | sockfd, |
| const void * | buf, | ||
| size_t | len, | ||
| int | flags, | ||
| const struct sockaddr * | dest_addr, | ||
| socklen_t | addrlen | ||
| ) |
Send a message to the address given.
| sockfd | The endpoint to send from. |
| buf | What to send. |
| len | How much of it. |
| flags | How to send it. |
| dest_addr | Where to send it. |
| addrlen | The size of the address. |
| ssize_t | -1 with errno set to ENOSYS. |
| int socket | ( | int | domain, |
| int | type, | ||
| int | protocol | ||
| ) |
Create an endpoint for communication.
| domain | The family the endpoint speaks in. |
| type | How it carries what is sent. |
| protocol | Which protocol of the family to use. |
| int | -1 with errno set to ENOSYS. |