libwebsockets
Lightweight C library for HTML5 websockets
|
Data Structures | |
struct | lws_dll2 |
struct | lws_dll2_owner |
Macros | |
#define | lws_start_foreach_ll(type, it, start) |
#define | lws_end_foreach_ll(it, nxt) |
#define | lws_start_foreach_ll_safe(type, it, start, nxt) |
#define | lws_end_foreach_ll_safe(it) |
#define | lws_start_foreach_llp(type, it, start) |
#define | lws_start_foreach_llp_safe(type, it, start, nxt) |
#define | lws_end_foreach_llp(it, nxt) |
#define | lws_end_foreach_llp_safe(it) |
#define | lws_ll_fwd_insert(___new_object, ___m_list, ___list_head) |
#define | lws_ll_fwd_remove(___type, ___m_list, ___target, ___list_head) |
#define | lws_dll2_search_sz_pl(own, name, namelen, type, membd2list, membptr) |
#define | lws_dll2_describe(x, y) |
#define | lws_start_foreach_dll_safe(___type, ___it, ___tmp, ___start) |
#define | lws_end_foreach_dll_safe(___it, ___tmp) |
#define | lws_start_foreach_dll(___type, ___it, ___start) |
#define | lws_end_foreach_dll(___it) |
Typedefs | |
typedef struct lws_dll2 | lws_dll2_t |
typedef struct lws_dll2_owner | lws_dll2_owner_t |
typedef int(* | lws_dll2_foreach_cb_t) (struct lws_dll2 *d, void *user) |
simple single and doubly-linked lists
struct lws_dll2 |
Definition at line 197 of file lws-dll2.h.
Data Fields | ||
---|---|---|
struct lws_dll2 * | prev | |
struct lws_dll2 * | next | |
struct lws_dll2_owner * | owner |
struct lws_dll2_owner |
Definition at line 203 of file lws-dll2.h.
Data Fields | ||
---|---|---|
struct lws_dll2 * | tail | |
struct lws_dll2 * | head | |
uint32_t | count |
#define lws_start_foreach_ll | ( | type, | |
it, | |||
start | |||
) |
#include <include/libwebsockets/lws-dll2.h>
lws_start_foreach_ll(): linkedlist iterator helper start
type | type of iteration, eg, struct xyz * |
it | iterator var name to create |
start | start of list |
This helper creates an iterator and starts a while (it) { loop. The iterator runs through the linked list starting at start and ends when it gets a NULL. The while loop should be terminated using lws_start_foreach_ll().
Definition at line 44 of file lws-dll2.h.
#define lws_end_foreach_ll | ( | it, | |
nxt | |||
) |
#include <include/libwebsockets/lws-dll2.h>
lws_end_foreach_ll(): linkedlist iterator helper end
it | same iterator var name given when starting |
nxt | member name in the iterator pointing to next list element |
This helper is the partner for lws_start_foreach_ll() that ends the while loop.
Definition at line 59 of file lws-dll2.h.
#define lws_start_foreach_ll_safe | ( | type, | |
it, | |||
start, | |||
nxt | |||
) |
#include <include/libwebsockets/lws-dll2.h>
lws_start_foreach_ll_safe(): linkedlist iterator helper start safe against delete
type | type of iteration, eg, struct xyz * |
it | iterator var name to create |
start | start of list |
nxt | member name in the iterator pointing to next list element |
This helper creates an iterator and starts a while (it) { loop. The iterator runs through the linked list starting at start and ends when it gets a NULL. The while loop should be terminated using lws_end_foreach_ll_safe(). Performs storage of next increment for situations where iterator can become invalidated during iteration.
Definition at line 79 of file lws-dll2.h.
#define lws_end_foreach_ll_safe | ( | it | ) |
#include <include/libwebsockets/lws-dll2.h>
lws_end_foreach_ll_safe(): linkedlist iterator helper end (pre increment storage)
it | same iterator var name given when starting |
This helper is the partner for lws_start_foreach_ll_safe() that ends the while loop. It uses the precreated next_ variable already stored during start.
Definition at line 95 of file lws-dll2.h.
#define lws_start_foreach_llp | ( | type, | |
it, | |||
start | |||
) |
#include <include/libwebsockets/lws-dll2.h>
lws_start_foreach_llp(): linkedlist pointer iterator helper start
type | type of iteration, eg, struct xyz ** |
it | iterator var name to create |
start | start of list |
This helper creates an iterator and starts a while (it) { loop. The iterator runs through the linked list starting at the address of start and ends when it gets a NULL. The while loop should be terminated using lws_start_foreach_llp().
This helper variant iterates using a pointer to the previous linked-list element. That allows you to easily delete list members by rewriting the previous pointer to the element's next pointer.
Definition at line 116 of file lws-dll2.h.
#define lws_start_foreach_llp_safe | ( | type, | |
it, | |||
start, | |||
nxt | |||
) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 121 of file lws-dll2.h.
#define lws_end_foreach_llp | ( | it, | |
nxt | |||
) |
#include <include/libwebsockets/lws-dll2.h>
lws_end_foreach_llp(): linkedlist pointer iterator helper end
it | same iterator var name given when starting |
nxt | member name in the iterator pointing to next list element |
This helper is the partner for lws_start_foreach_llp() that ends the while loop.
Definition at line 138 of file lws-dll2.h.
#define lws_end_foreach_llp_safe | ( | it | ) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 143 of file lws-dll2.h.
#define lws_ll_fwd_insert | ( | ___new_object, | |
___m_list, | |||
___list_head | |||
) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 148 of file lws-dll2.h.
#define lws_ll_fwd_remove | ( | ___type, | |
___m_list, | |||
___target, | |||
___list_head | |||
) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 157 of file lws-dll2.h.
#define lws_dll2_search_sz_pl | ( | own, | |
name, | |||
namelen, | |||
type, | |||
membd2list, | |||
membptr | |||
) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 268 of file lws-dll2.h.
#define lws_dll2_describe | ( | x, | |
y | |||
) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 277 of file lws-dll2.h.
#define lws_start_foreach_dll_safe | ( | ___type, | |
___it, | |||
___tmp, | |||
___start | |||
) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 286 of file lws-dll2.h.
#define lws_end_foreach_dll_safe | ( | ___it, | |
___tmp | |||
) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 292 of file lws-dll2.h.
#define lws_start_foreach_dll | ( | ___type, | |
___it, | |||
___start | |||
) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 297 of file lws-dll2.h.
#define lws_end_foreach_dll | ( | ___it | ) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 302 of file lws-dll2.h.
typedef struct lws_dll2 lws_dll2_t |
#include <include/libwebsockets/lws-dll2.h>
typedef struct lws_dll2_owner lws_dll2_owner_t |
#include <include/libwebsockets/lws-dll2.h>
typedef int(* lws_dll2_foreach_cb_t) (struct lws_dll2 *d, void *user) |
#include <include/libwebsockets/lws-dll2.h>
Definition at line 231 of file lws-dll2.h.
LWS_VISIBLE LWS_EXTERN int lws_dll2_is_detached | ( | const struct lws_dll2 * | d | ) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_head | ( | struct lws_dll2 * | d, |
struct lws_dll2_owner * | owner | ||
) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_tail | ( | struct lws_dll2 * | d, |
struct lws_dll2_owner * | owner | ||
) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_remove | ( | struct lws_dll2 * | d | ) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN int lws_dll2_foreach_safe | ( | struct lws_dll2_owner * | owner, |
void * | user, | ||
lws_dll2_foreach_cb_t | cb | ||
) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_clear | ( | struct lws_dll2 * | d | ) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_owner_clear | ( | struct lws_dll2_owner * | d | ) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_before | ( | struct lws_dll2 * | d, |
struct lws_dll2 * | after | ||
) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_insert | ( | struct lws_dll2 * | d, |
struct lws_dll2 * | prev | ||
) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_sorted | ( | lws_dll2_t * | d, |
lws_dll2_owner_t * | own, | ||
int(*)(const lws_dll2_t *d, const lws_dll2_t *i) | compare | ||
) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void lws_dll2_add_sorted_priv | ( | lws_dll2_t * | d, |
lws_dll2_owner_t * | own, | ||
void * | priv, | ||
int(*)(void *priv, const lws_dll2_t *d, const lws_dll2_t *i) | compare3 | ||
) |
#include <include/libwebsockets/lws-dll2.h>
LWS_VISIBLE LWS_EXTERN void* _lws_dll2_search_sz_pl | ( | lws_dll2_owner_t * | own, |
const char * | name, | ||
size_t | namelen, | ||
size_t | dll2_ofs, | ||
size_t | ptr_ofs | ||
) |
#include <include/libwebsockets/lws-dll2.h>