libisdn
|
Go to the source code of this file.
Functions | |
void | dlist_init_head (struct dlist_head *h) |
Initialize linked list. | |
void | dlist_init (struct dlist_head *e) |
void | dlist_insert_after (struct dlist_head *elem, struct dlist_head *enew) |
Insert new element after given one. | |
void | dlist_insert_before (struct dlist_head *elem, struct dlist_head *enew) |
Insert new element before given one. | |
void | dlist_insert_tail (struct dlist_head *list, struct dlist_head *enew) |
Insert new element at the end of the list. | |
void | dlist_remove (struct dlist_head *elem) |
Remove element from the list. | |
struct dlist_head * | dlist_first (const struct dlist_head *list) |
Get first element in the list. | |
struct dlist_head * | dlist_last (const struct dlist_head *list) |
Get last element in the list. | |
struct dlist_head * | dlist_next (const struct dlist_head *elem) |
Get next element after given one. | |
struct dlist_head * | dlist_prev (const struct dlist_head *elem) |
Get element before given one. | |
struct dlist_head * | dlist_pop_head (const struct dlist_head *elem) |
struct dlist_head * | dlist_pop_tail (const struct dlist_head *elem) |
int | dlist_is_head (const struct dlist_head *elem) |
Check if the element passed is the list head. | |
int | dlist_is_first (const struct dlist_head *elem) |
Check if the element passed is the first one. | |
int | dlist_is_last (const struct dlist_head *elem) |
Check if the element passed is the last one. | |
void | dlist_replace (struct dlist_head *old, struct dlist_head *enew) |
Replace an element in the list with a new one. |
struct dlist_head* dlist_first | ( | const struct dlist_head * | elem | ) | [read] |
Get first element in the list.
dlist_first
[in] | elem | Any list element |
Definition at line 96 of file dlist.c.
References dlist_head::head, and dlist_head::next.
Referenced by dlist_pop_head().
void dlist_init | ( | struct dlist_head * | e | ) |
Definition at line 22 of file dlist.c.
References dlist_head::head, dlist_head::next, and dlist_head::prev.
void dlist_init_head | ( | struct dlist_head * | h | ) |
Initialize linked list.
dlist_init_head
[in] | h | pointer to linked list head |
Definition at line 15 of file dlist.c.
References dlist_head::head, dlist_head::next, and dlist_head::prev.
Referenced by msgb_fifo_init().
void dlist_insert_after | ( | struct dlist_head * | elem, |
struct dlist_head * | enew | ||
) |
Insert new element after given one.
dlist_insert_after
[in] | elem | Element to insert after |
[in] | new | New element |
Definition at line 29 of file dlist.c.
References dlist_head::head, dlist_head::next, and dlist_head::prev.
Referenced by dlist_insert_tail().
void dlist_insert_before | ( | struct dlist_head * | elem, |
struct dlist_head * | enew | ||
) |
Insert new element before given one.
dlist_insert_before
[in] | elem | Element to insert before |
[in] | new | New element |
Definition at line 46 of file dlist.c.
References dlist_head::head, dlist_head::next, and dlist_head::prev.
void dlist_insert_tail | ( | struct dlist_head * | list, |
struct dlist_head * | enew | ||
) |
Insert new element at the end of the list.
dlist_insert_tail
[in] | list | The list |
[in] | new | New element |
Definition at line 61 of file dlist.c.
References dlist_insert_after(), dlist_head::head, dlist_head::next, and dlist_head::prev.
Referenced by msgb_fifo_enqueue().
int dlist_is_first | ( | const struct dlist_head * | elem | ) |
Check if the element passed is the first one.
dlist_is_first
[in] | elem | Any list element |
Definition at line 148 of file dlist.c.
References dlist_head::head, and dlist_head::prev.
int dlist_is_head | ( | const struct dlist_head * | elem | ) |
Check if the element passed is the list head.
dlist_is_head
[in] | elem | Any list element |
Definition at line 142 of file dlist.c.
References dlist_head::head.
int dlist_is_last | ( | const struct dlist_head * | elem | ) |
Check if the element passed is the last one.
dlist_is_last
[in] | elem | Any list element |
Definition at line 154 of file dlist.c.
References dlist_head::head, and dlist_head::next.
struct dlist_head* dlist_last | ( | const struct dlist_head * | elem | ) | [read] |
Get last element in the list.
dlist_last
[in] | elem | Any list element |
Definition at line 104 of file dlist.c.
References dlist_head::head, and dlist_head::prev.
Referenced by dlist_pop_tail().
struct dlist_head* dlist_next | ( | const struct dlist_head * | elem | ) | [read] |
Get next element after given one.
dlist_next
[in] | elem | Any list element |
Definition at line 112 of file dlist.c.
References dlist_head::head, and dlist_head::next.
struct dlist_head* dlist_pop_head | ( | const struct dlist_head * | elem | ) | [read] |
Remove and return first element of list
[in] | elem | List |
Definition at line 128 of file dlist.c.
References dlist_first(), and dlist_remove().
Referenced by msgb_fifo_dequeue().
struct dlist_head* dlist_pop_tail | ( | const struct dlist_head * | elem | ) | [read] |
Remove and return last element of list
[in] | elem | List |
Definition at line 135 of file dlist.c.
References dlist_last(), and dlist_remove().
struct dlist_head* dlist_prev | ( | const struct dlist_head * | elem | ) | [read] |
Get element before given one.
dlist_prev
[in] | elem | Any list element |
Definition at line 120 of file dlist.c.
References dlist_head::head, and dlist_head::prev.
void dlist_remove | ( | struct dlist_head * | elem | ) |
Remove element from the list.
dlist_remove
[in] | elem | Element to remove |
Definition at line 79 of file dlist.c.
References dlist_head::head, dlist_head::next, and dlist_head::prev.
Referenced by dlist_pop_head(), and dlist_pop_tail().
void dlist_replace | ( | struct dlist_head * | old, |
struct dlist_head * | enew | ||
) |
Replace an element in the list with a new one.
dlist_replace
[in] | old | Element to replace |
[in] | new | Replacement |
Definition at line 159 of file dlist.c.
References dlist_head::head, dlist_head::next, and dlist_head::prev.