#include <sys/types.h>
#include <adt/generic_char_map.h>
#include <adt/dynamic_fifo.h>
#include <adt/int_map.h>
#include <net/in.h>
#include <net/device.h>
#include <net/packet.h>
Go to the source code of this file.
Data Structures | |
struct | socket_core |
Socket core. More... | |
Defines | |
#define | SOCKET_INITIAL_ACCEPTED_SIZE 1 |
Initial size of the sockets for acceptance queue. | |
#define | SOCKET_INITIAL_RECEIVED_SIZE 4 |
Initial size of the received packet queue. | |
#define | SOCKET_MAP_KEY_LISTENING "L" |
Listening sockets' port map key. | |
#define | SOCKET_MAX_ACCEPTEDED_SIZE 0 |
Maximum size of the sockets for acceptance queue. | |
#define | SOCKET_MAX_RECEIVED_SIZE 0 |
Maximum size of the received packet queue. | |
Typedefs | |
typedef socket_core | socket_core_t |
Type definition of the socket core. | |
typedef socket_port | socket_port_t |
Type definition of the socket port. | |
Functions | |
GENERIC_CHAR_MAP_DECLARE (socket_port_map, socket_core_t *) | |
Bount port sockets map. | |
INT_MAP_DECLARE (socket_ports, socket_port_t) | |
Ports map. | |
INT_MAP_DECLARE (socket_cores, socket_core_t) | |
Sockets map. | |
int | socket_bind (socket_cores_t *local_sockets, socket_ports_t *global_sockets, int socket_id, void *addr, size_t addrlen, int free_ports_start, int free_ports_end, int last_used_port) |
Binds the socket to the port. | |
int | socket_bind_free_port (socket_ports_t *global_sockets, socket_core_t *socket, int free_ports_start, int free_ports_end, int last_used_port) |
Binds the socket to a free port. | |
int | socket_create (socket_cores_t *local_sockets, int app_phone, void *specific_data, int *socket_id) |
Creates a new socket. | |
int | socket_port_add (socket_ports_t *global_sockets, int port, socket_core_t *socket, const uint8_t *key, size_t key_length) |
Adds the socket to an already bound port. | |
socket_core_t * | socket_port_find (socket_ports_t *global_sockets, int port, const uint8_t *key, size_t key_length) |
Finds the bound port socket. | |
void | socket_port_release (socket_ports_t *global_sockets, socket_core_t *socket) |
Releases the socket port. | |
int | socket_reply_packets (packet_t *packet, size_t *length) |
Replies the packet or the packet queue data to the application via the socket. |
Definition in file socket_core.h.