OpenSDN source code
|
#include <dhcp_proto.h>
Classes | |
struct | DhcpStats |
struct | DhcpVhostMsg |
Public Types | |
enum | DhcpMsgType { DHCP_VHOST_MSG } |
typedef std::map< Interface *, DhcpLeaseDb * > | LeaseManagerMap |
typedef std::pair< Interface *, DhcpLeaseDb * > | LeaseManagerPair |
![]() | |
typedef WorkQueue < boost::shared_ptr< PktInfo > > | ProtoWorkQueue |
Public Member Functions | |
void | Shutdown () |
DhcpProto (Agent *agent, boost::asio::io_context &io, bool run_with_vrouter) | |
virtual | ~DhcpProto () |
ProtoHandler * | AllocProtoHandler (boost::shared_ptr< PktInfo > info, boost::asio::io_context &io) |
void | SendDhcpIpc (uint8_t *dhcp, std::size_t len) |
bool | dhcp_relay_mode () const |
void | set_dhcp_relay_mode (bool mode) |
Interface * | ip_fabric_interface () const |
void | set_ip_fabric_interface (Interface *itf) |
uint32_t | ip_fabric_interface_index () const |
void | set_ip_fabric_interface_index (uint32_t ind) |
uint32_t | pkt_interface_index () const |
void | set_pkt_interface_index (uint32_t ind) |
const MacAddress & | ip_fabric_interface_mac () const |
void | set_ip_fabric_interface_mac (const MacAddress &mac) |
bool | IsRunningWithVrouter () const |
void | IncrStatsDiscover () |
void | IncrStatsRequest () |
void | IncrStatsInform () |
void | IncrStatsDecline () |
void | IncrStatsRelease () |
void | IncrStatsOther () |
void | IncrStatsOffers () |
void | IncrStatsAcks () |
void | IncrStatsNacks () |
void | IncrStatsRelayReqs () |
void | IncrStatsRelayResps () |
void | IncrStatsErrors () |
void | IncrUnknownMsgDrops () |
void | IncrDhcpDisabledDrops () |
void | IncrIncorrectMac () |
const DhcpStats & | GetStats () const |
void | ClearStats () |
void | CreateLeaseDb (VmInterface *vmi) |
void | DeleteLeaseDb (VmInterface *vmi) |
DhcpLeaseDb * | GetLeaseDb (Interface *intrface) |
const LeaseManagerMap & | lease_manager () const |
![]() | |
Proto (Agent *agent, const char *task_name, PktHandler::PktModuleName mod, boost::asio::io_context &io) | |
virtual | ~Proto () |
virtual bool | Validate (PktInfo *msg) |
virtual bool | Enqueue (boost::shared_ptr< PktInfo > msg) |
virtual void | ProcessStats (PktStatsType::Type type) |
void | FreeBuffer (PktInfo *msg) |
bool | ProcessProto (boost::shared_ptr< PktInfo > msg_info) |
bool | RunProtoHandler (ProtoHandler *handler) |
void | set_trace (bool val) |
void | set_free_buffer (bool val) |
boost::asio::io_context & | get_io_service () const |
Agent * | agent () const |
const ProtoWorkQueue * | work_queue () const |
virtual void | TokenAvailable (TokenPool *pool) |
Static Public Attributes | |
static const uint32_t | kDhcpMaxPacketSize = 1024 |
static const uint32_t | kDhcpLeaseFileDeleteTimeout = 60 * 60 * 1000 |
Private Member Functions | |
void | ItfNotify (DBEntryBase *entry) |
void | VnNotify (DBEntryBase *entry) |
void | AsyncRead () |
void | ReadHandler (const boost::system::error_code &error, std::size_t len) |
std::string | GetLeaseFileName (const VmInterface *vmi) |
void | StartLeaseFileCleanupTimer () |
bool | LeaseFileCleanupExpiry (uint32_t seqno) |
DISALLOW_COPY_AND_ASSIGN (DhcpProto) | |
Private Attributes | |
bool | run_with_vrouter_ |
bool | dhcp_relay_mode_ |
Interface * | ip_fabric_interface_ |
uint32_t | ip_fabric_interface_index_ |
uint32_t | pkt_interface_index_ |
MacAddress | ip_fabric_interface_mac_ |
DBTableBase::ListenerId | iid_ |
DBTableBase::ListenerId | vnid_ |
DhcpStats | stats_ |
boost::asio::ip::udp::socket | dhcp_server_socket_ |
boost::asio::ip::udp::endpoint | remote_endpoint_ |
uint8_t * | dhcp_server_read_buf_ |
std::set< VmInterface * > | gw_vmi_list_ |
LeaseManagerMap | lease_manager_ |
uint32_t | gateway_delete_seqno_ |
Timer * | lease_file_cleanup_timer_ |
Additional Inherited Members | |
![]() | |
Agent * | agent_ |
PktHandler::PktModuleName | module_ |
bool | trace_ |
bool | free_buffer_ |
boost::asio::io_context & | io_ |
ProtoWorkQueue | work_queue_ |
Definition at line 23 of file dhcp_proto.h.
typedef std::map<Interface *, DhcpLeaseDb *> DhcpProto::LeaseManagerMap |
Definition at line 32 of file dhcp_proto.h.
typedef std::pair<Interface *, DhcpLeaseDb *> DhcpProto::LeaseManagerPair |
Definition at line 33 of file dhcp_proto.h.
Enumerator | |
---|---|
DHCP_VHOST_MSG |
Definition at line 28 of file dhcp_proto.h.
DhcpProto::DhcpProto | ( | Agent * | agent, |
boost::asio::io_context & | io, | ||
bool | run_with_vrouter | ||
) |
|
virtual |
Definition at line 60 of file dhcp_proto.cc.
|
virtual |
Implements Proto.
Definition at line 113 of file dhcp_proto.cc.
|
private |
|
inline |
void DhcpProto::CreateLeaseDb | ( | VmInterface * | vmi | ) |
void DhcpProto::DeleteLeaseDb | ( | VmInterface * | vmi | ) |
|
inline |
Definition at line 76 of file dhcp_proto.h.
|
private |
DhcpLeaseDb * DhcpProto::GetLeaseDb | ( | Interface * | intrface | ) |
Definition at line 226 of file dhcp_proto.cc.
|
private |
|
inline |
Definition at line 116 of file dhcp_proto.h.
|
inline |
Definition at line 114 of file dhcp_proto.h.
|
inline |
Definition at line 115 of file dhcp_proto.h.
|
inline |
Definition at line 108 of file dhcp_proto.h.
|
inline |
Definition at line 104 of file dhcp_proto.h.
|
inline |
Definition at line 101 of file dhcp_proto.h.
|
inline |
Definition at line 112 of file dhcp_proto.h.
|
inline |
Definition at line 103 of file dhcp_proto.h.
|
inline |
Definition at line 109 of file dhcp_proto.h.
|
inline |
Definition at line 107 of file dhcp_proto.h.
|
inline |
Definition at line 106 of file dhcp_proto.h.
|
inline |
Definition at line 110 of file dhcp_proto.h.
|
inline |
Definition at line 111 of file dhcp_proto.h.
|
inline |
Definition at line 105 of file dhcp_proto.h.
|
inline |
Definition at line 102 of file dhcp_proto.h.
|
inline |
Definition at line 113 of file dhcp_proto.h.
|
inline |
Definition at line 79 of file dhcp_proto.h.
|
inline |
Definition at line 81 of file dhcp_proto.h.
|
inline |
Definition at line 93 of file dhcp_proto.h.
|
inline |
Definition at line 99 of file dhcp_proto.h.
|
private |
|
inline |
Definition at line 122 of file dhcp_proto.h.
|
private |
|
inline |
Definition at line 87 of file dhcp_proto.h.
|
private |
void DhcpProto::SendDhcpIpc | ( | uint8_t * | dhcp, |
std::size_t | len | ||
) |
|
inline |
Definition at line 77 of file dhcp_proto.h.
|
inline |
Definition at line 80 of file dhcp_proto.h.
|
inline |
Definition at line 84 of file dhcp_proto.h.
|
inline |
Definition at line 96 of file dhcp_proto.h.
|
inline |
Definition at line 90 of file dhcp_proto.h.
void DhcpProto::Shutdown | ( | ) |
|
private |
|
private |
|
private |
Definition at line 134 of file dhcp_proto.h.
|
private |
Definition at line 145 of file dhcp_proto.h.
|
private |
Definition at line 143 of file dhcp_proto.h.
|
private |
Definition at line 149 of file dhcp_proto.h.
|
private |
Definition at line 147 of file dhcp_proto.h.
|
private |
Definition at line 139 of file dhcp_proto.h.
|
private |
Definition at line 135 of file dhcp_proto.h.
|
private |
Definition at line 136 of file dhcp_proto.h.
|
private |
Definition at line 138 of file dhcp_proto.h.
|
static |
Definition at line 26 of file dhcp_proto.h.
|
static |
Definition at line 25 of file dhcp_proto.h.
|
private |
Definition at line 150 of file dhcp_proto.h.
|
private |
Definition at line 148 of file dhcp_proto.h.
|
private |
Definition at line 137 of file dhcp_proto.h.
|
private |
Definition at line 144 of file dhcp_proto.h.
|
private |
Definition at line 133 of file dhcp_proto.h.
|
private |
Definition at line 141 of file dhcp_proto.h.
|
private |
Definition at line 140 of file dhcp_proto.h.