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
22#ifndef NET_L2SCAN_LIST_H
23#define NET_L2SCAN_LIST_H
24
25#include <stdlib.h>
26
27#include "list.h"
28#include "net/netopt.h"
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
37typedef struct l2scan_list {
39 /* items */
41
51 list_node_t *nodes, unsigned nodes_numof,
52 size_t node_size);
53
64 list_node_t *nodes, unsigned nodes_numof,
65 size_t node_size,
66 const netopt_scan_result_t *result);
67
79 void *nodes_array, unsigned nodes_numof,
80 size_t node_size);
81
82#ifdef __cplusplus
83}
84#endif
85
86#endif /* NET_L2SCAN_LIST_H */
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.
Intrusive linked list.
Definition of global configuration options.
Type of a Link Layer scan list.
Definition l2scan_list.h:37
list_node_t head
List head, where head->next is the first element.
Definition l2scan_list.h:38
List node structure.
Definition list.h:40
Basic network scan result.
Definition netopt.h:942