Loading...
Searching...
No Matches
l2scan_list.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 ML!PA Consulting Gmbh
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
20
21#include <stdlib.h>
22
23#include "list.h"
24#include "net/netopt.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
33typedef struct l2scan_list {
35 /* items */
37
47 list_node_t *nodes, unsigned nodes_numof,
48 size_t node_size);
49
60 list_node_t *nodes, unsigned nodes_numof,
61 size_t node_size,
62 const netopt_scan_result_t *result);
63
75 void *nodes_array, unsigned nodes_numof,
76 size_t node_size);
77
78#ifdef __cplusplus
79}
80#endif
81
unsigned l2scan_list_to_array(const l2scan_list_t *list, void *nodes_array, unsigned nodes_numof, size_t node_size)
Copy the content of a L2 scan list to an array to get rid of the list overhead.
struct l2scan_list l2scan_list_t
Type of a Link Layer scan list.
void l2scan_list_empty(l2scan_list_t *list, list_node_t *nodes, unsigned nodes_numof, size_t node_size)
Empty the list to start a new scan.
void l2scan_list_insert(l2scan_list_t *list, list_node_t *nodes, unsigned nodes_numof, size_t node_size, const netopt_scan_result_t *result)
Insert a new scan result into the list.
struct netopt_scan_result netopt_scan_result_t
Basic network scan result.
Intrusive linked list.
struct list_node list_node_t
List node structure.
Definition of global configuration options.
Type of a Link Layer scan list.
Definition l2scan_list.h:33
list_node_t head
List head, where head->next is the first element.
Definition l2scan_list.h:34