]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/libsystemd-network/lldp-internal.h
Add SPDX license identifiers to source files under the LGPL
[thirdparty/systemd.git] / src / libsystemd-network / lldp-internal.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
0ef6f454
LP
2#pragma once
3
ad1ad5c8
SS
4/***
5 This file is part of systemd.
6
7 Copyright (C) 2014 Tom Gundersen
8 Copyright (C) 2014 Susant Sahani
9
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22***/
23
07630cea 24#include "sd-event.h"
34437b4f 25#include "sd-lldp.h"
07630cea 26
34437b4f 27#include "hashmap.h"
07630cea 28#include "log.h"
ad1ad5c8
SS
29#include "prioq.h"
30
34437b4f 31struct sd_lldp {
fc6a313b
LP
32 unsigned n_ref;
33
34437b4f
LP
34 int ifindex;
35 int fd;
ad1ad5c8 36
34437b4f
LP
37 sd_event *event;
38 int64_t event_priority;
39 sd_event_source *io_event_source;
40 sd_event_source *timer_event_source;
ad1ad5c8 41
34437b4f
LP
42 Prioq *neighbor_by_expiry;
43 Hashmap *neighbor_by_id;
ad1ad5c8 44
34437b4f 45 uint64_t neighbors_max;
ad1ad5c8 46
34437b4f
LP
47 sd_lldp_callback_t callback;
48 void *userdata;
ad1ad5c8 49
34437b4f 50 uint16_t capability_mask;
b553a6b1
LP
51
52 struct ether_addr filter_address;
ad1ad5c8
SS
53};
54
34437b4f
LP
55#define log_lldp_errno(error, fmt, ...) log_internal(LOG_DEBUG, error, __FILE__, __LINE__, __func__, "LLDP: " fmt, ##__VA_ARGS__)
56#define log_lldp(fmt, ...) log_lldp_errno(0, fmt, ##__VA_ARGS__)