Kea 1.5.0
pkt_filter_inet.h
Go to the documentation of this file.
1// Copyright (C) 2013-2018 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_FILTER_INET_H
8#define PKT_FILTER_INET_H
9
10#include <dhcp/pkt_filter.h>
11#include <boost/scoped_array.hpp>
12
13namespace isc {
14namespace dhcp {
15
20class PktFilterInet : public PktFilter {
21public:
22
27
35 virtual bool isDirectResponseSupported() const {
36 return (false);
37 }
38
50 virtual SocketInfo openSocket(Iface& iface,
51 const isc::asiolink::IOAddress& addr,
52 const uint16_t port,
53 const bool receive_bcast,
54 const bool send_bcast);
55
66 virtual Pkt4Ptr receive(Iface& iface, const SocketInfo& socket_info);
67
84 virtual int send(const Iface& iface, uint16_t sockfd,
85 const Pkt4Ptr& pkt);
86
87private:
91 size_t recv_control_buf_len_;
93 size_t send_control_buf_len_;
95 boost::scoped_array<char> recv_control_buf_;
97 boost::scoped_array<char> send_control_buf_;
98};
99
100} // namespace isc::dhcp
101} // namespace isc
102
103#endif // PKT_FILTER_INET_H
Represents a single network interface.
Definition: iface_mgr.h:114
Packet handling class using AF_INET socket family.
virtual SocketInfo openSocket(Iface &iface, const isc::asiolink::IOAddress &addr, const uint16_t port, const bool receive_bcast, const bool send_bcast)
Open primary and fallback socket.
virtual int send(const Iface &iface, uint16_t sockfd, const Pkt4Ptr &pkt)
Send packet over specified socket.
virtual bool isDirectResponseSupported() const
Check if packet can be sent to the host without address directly.
virtual Pkt4Ptr receive(Iface &iface, const SocketInfo &socket_info)
Receive packet over specified socket.
Abstract packet handling class.
Definition: pkt_filter.h:44
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
Definition: pkt4.h:546
Defines the logger used by the top-level component of kea-dhcp-ddns.
Holds information about socket.
Definition: socket_info.h:19