Kea 2.7.5
pkt_filter6.h
Go to the documentation of this file.
1// Copyright (C) 2013-2015,2021 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef PKT_FILTER6_H
8#define PKT_FILTER6_H
9
10#include <asiolink/io_address.h>
11#include <dhcp/pkt6.h>
12
13namespace isc {
14namespace dhcp {
15
17struct SocketInfo;
18
20class Iface;
21
71public:
72
74 virtual ~PktFilter6() { }
75
89 virtual SocketInfo openSocket(const Iface& iface,
90 const isc::asiolink::IOAddress& addr,
91 const uint16_t port,
92 const bool join_multicast) = 0;
93
102 virtual Pkt6Ptr receive(const SocketInfo& socket_info) = 0;
103
115 virtual int send(const Iface& iface, uint16_t sockfd,
116 const Pkt6Ptr& pkt) = 0;
117
129 static bool joinMulticast(int sock, const std::string& ifname,
130 const std::string & mcast);
131
132};
133
134
136typedef boost::shared_ptr<PktFilter6> PktFilter6Ptr;
137
138} // namespace isc::dhcp
139} // namespace isc
140
141#endif // PKT_FILTER6_H
Represents a single network interface.
Definition iface_mgr.h:118
Abstract packet handling class for DHCPv6.
Definition pkt_filter6.h:70
virtual SocketInfo openSocket(const Iface &iface, const isc::asiolink::IOAddress &addr, const uint16_t port, const bool join_multicast)=0
Opens a socket.
virtual Pkt6Ptr receive(const SocketInfo &socket_info)=0
Receives DHCPv6 message on the interface.
virtual ~PktFilter6()
Virtual Destructor.
Definition pkt_filter6.h:74
static bool joinMulticast(int sock, const std::string &ifname, const std::string &mcast)
Joins IPv6 multicast group on a socket.
virtual int send(const Iface &iface, uint16_t sockfd, const Pkt6Ptr &pkt)=0
Sends DHCPv6 message through a specified interface and socket.
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
Definition pkt6.h:31
boost::shared_ptr< PktFilter6 > PktFilter6Ptr
Pointer to a PktFilter object.
Defines the logger used by the top-level component of kea-lfc.
Holds information about socket.
Definition socket_info.h:19