Loading...
Searching...
No Matches
l2scan_list.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 ML!PA Consulting Gmbh
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
9#pragma once
10
23
24#include <stdlib.h>
25
26#include "list.h"
27#include "net/netopt.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
36typedef struct l2scan_list {
38 /* items */
40
50 list_node_t *nodes, unsigned nodes_numof,
51 size_t node_size);
52
63 list_node_t *nodes, unsigned nodes_numof,
64 size_t node_size,
65 const netopt_scan_result_t *result);
66
78 void *nodes_array, unsigned nodes_numof,
79 size_t node_size);
80
81#ifdef __cplusplus
82}
83#endif
84
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:36
list_node_t head
List head, where head->next is the first element.
Definition l2scan_list.h:37