Loading...
Searching...
No Matches
sock_types.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Inria
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
23#ifndef SOCK_TYPES_H
24#define SOCK_TYPES_H
25
26#include "mbox.h"
27#include "net/af.h"
28#ifdef SOCK_HAS_ASYNC
30#endif
31#include "net/sock/udp.h"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
44#ifndef CONFIG_OPENWSN_SOCK_MBOX_SIZE_EXP
45#define CONFIG_OPENWSN_SOCK_MBOX_SIZE_EXP (3)
46#endif
47
51#ifndef OPENWSN_SOCK_MBOX_SIZE
52#define OPENWSN_SOCK_MBOX_SIZE (1 << CONFIG_OPENWSN_SOCK_MBOX_SIZE_EXP)
53#endif
54
60
72
79struct sock_udp {
80 struct sock_udp *next;
84#ifdef MODULE_SOCK_ASYNC_EVENT
85 sock_async_ctx_t async_ctx;
86#endif
87#ifdef SOCK_HAS_ASYNC
88 sock_udp_cb_t async_cb;
89 void* async_cb_arg;
90#endif
91};
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* SOCK_TYPES_H */
Global UNIX address family definitions.
void(* sock_udp_cb_t)(sock_udp_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_udp_t.
Definition types.h:157
#define OPENWSN_SOCK_MBOX_SIZE
Size for OpenWSN sock_udp_t::mbox_queue.
Definition sock_types.h:52
Mailbox API.
UDP sock definitions.
Common IP-based transport layer end point.
Definition sock.h:215
Mailbox struct definition.
Definition mbox.h:41
Describes a message object which can be sent between threads.
Definition msg.h:196
Generic openwsn sock type.
Definition sock_types.h:67
sock_udp_ep_t local
local end-point
Definition sock_types.h:68
sock_udp_ep_t remote
remote end-point
Definition sock_types.h:69
uint16_t flags
option flags
Definition sock_types.h:70
Asynchronous context for Asynchronous sock with event API.
UDP sock type.
Definition sock_types.h:128
openwsn_gen_sock_t gen_sock
Generic socket.
Definition sock_types.h:81
mbox_t mbox
Mailboxes target for the sock
Definition sock_types.h:82
struct sock_udp * next
sock liked list
Definition sock_types.h:80
msg_t mbox_queue[OPENWSN_SOCK_MBOX_SIZE]
queue for gnrc_sock_reg_t::mbox
Definition sock_types.h:83
Definitions for sock extension for asynchronous access.