]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
1e7a0e21 LP |
2 | #pragma once |
3 | ||
4 | /*** | |
810adae9 | 5 | Copyright © 2014 Intel Corporation. All rights reserved. |
1e7a0e21 LP |
6 | ***/ |
7 | ||
8 | #include "log.h" | |
9 | ||
10 | #include "sd-ndisc.h" | |
11 | ||
1bd6f895 PF |
12 | #define NDISC_ROUTER_SOLICITATION_INTERVAL (4U * USEC_PER_SEC) |
13 | #define NDISC_MAX_ROUTER_SOLICITATION_INTERVAL (3600U * USEC_PER_SEC) | |
14 | #define NDISC_MAX_ROUTER_SOLICITATIONS 3U | |
15 | ||
1e7a0e21 LP |
16 | struct sd_ndisc { |
17 | unsigned n_ref; | |
18 | ||
19 | int ifindex; | |
20 | int fd; | |
21 | ||
22 | sd_event *event; | |
23 | int event_priority; | |
24 | ||
25 | struct ether_addr mac_addr; | |
26 | uint8_t hop_limit; | |
27 | uint32_t mtu; | |
28 | ||
29 | sd_event_source *recv_event_source; | |
30 | sd_event_source *timeout_event_source; | |
1bd6f895 | 31 | sd_event_source *timeout_no_ra; |
1e7a0e21 | 32 | |
1bd6f895 | 33 | usec_t retransmit_time; |
1e7a0e21 LP |
34 | |
35 | sd_ndisc_callback_t callback; | |
36 | void *userdata; | |
37 | }; | |
38 | ||
39 | #define log_ndisc_errno(error, fmt, ...) log_internal(LOG_DEBUG, error, __FILE__, __LINE__, __func__, "NDISC: " fmt, ##__VA_ARGS__) | |
40 | #define log_ndisc(fmt, ...) log_ndisc_errno(0, fmt, ##__VA_ARGS__) |