-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathndp.h
32 lines (21 loc) · 735 Bytes
/
ndp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// (C) 2020-2023 by folkert van heusden <[email protected]>, released under Apache License v2.0
#pragma once
#include <optional>
#include "any_addr.h"
#include "mac_resolver.h"
#include "stats.h"
class icmp6;
class ndp : public mac_resolver
{
private:
icmp6 *icmp6_ { nullptr };
uint64_t *ndp_cache_req { nullptr };
uint64_t *ndp_cache_hit { nullptr };
bool send_request(const any_addr & ip, const any_addr::addr_family af) override;
std::optional<any_addr> check_special_ip_addresses(const any_addr & ip, const any_addr::addr_family family) override;
public:
ndp(stats *const s);
virtual ~ndp();
void register_icmp6(icmp6 *const icmp6_) { this->icmp6_ = icmp6_; }
void operator()() override;
};