Kea  1.9.9-git
pkt_filter_lpf.h
Go to the documentation of this file.
1 // Copyright (C) 2013-2017 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_LPF_H
8 #define PKT_FILTER_LPF_H
9 
10 #include <dhcp/pkt_filter.h>
11 
12 #include <util/buffer.h>
13 
14 namespace isc {
15 namespace dhcp {
16 
23 class PktFilterLPF : public PktFilter {
24 public:
25 
31  virtual bool isDirectResponseSupported() const {
32  return (true);
33  }
34 
44  virtual SocketInfo openSocket(Iface& iface,
45  const isc::asiolink::IOAddress& addr,
46  const uint16_t port,
47  const bool receive_bcast,
48  const bool send_bcast);
49 
57  virtual Pkt4Ptr receive(Iface& iface, const SocketInfo& socket_info);
58 
67  virtual int send(const Iface& iface, uint16_t sockfd,
68  const Pkt4Ptr& pkt);
69 
70 };
71 
72 } // namespace isc::dhcp
73 } // namespace isc
74 
75 #endif // PKT_FILTER_LPF_H
Packet handling class using Linux Packet Filtering.
virtual bool isDirectResponseSupported() const
Check if packet can be sent to the host without address directly.
Represents a single network interface.
Definition: iface_mgr.h:118
Abstract packet handling class.
Definition: pkt_filter.h:44
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.
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
Definition: pkt4.h:544
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual Pkt4Ptr receive(Iface &iface, const SocketInfo &socket_info)
Receive packet over specified socket.
Holds information about socket.
Definition: socket_info.h:19
virtual int send(const Iface &iface, uint16_t sockfd, const Pkt4Ptr &pkt)
Send packet over specified socket.