OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ArpHandler Class Reference

#include <arp_handler.h>

Inheritance diagram for ArpHandler:
Collaboration diagram for ArpHandler:

Public Member Functions

 ArpHandler (Agent *agent, boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
 
virtual ~ArpHandler ()
 
bool Run ()
 
void SendArp (uint16_t op, const MacAddress &smac, in_addr_t sip, const MacAddress &tmac, const MacAddress &dmac, in_addr_t tip, uint32_t itf, uint32_t vrf)
 
void SendArpRequestByPlen (const VmInterface *vm_interface, const MacAddress &smac, const ArpPathPreferenceState *data, const Ip4Address &tpa)
 
- Public Member Functions inherited from ProtoHandler
 ProtoHandler (Agent *agent, boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
 
virtual ~ProtoHandler ()
 
void Send (uint32_t itf, uint32_t vrf, uint16_t, PktHandler::PktModuleName)
 
void Send (uint32_t itf, uint32_t vrf, uint16_t cmd, uint32_t param1, uint32_t param2, PktHandler::PktModuleName mod)
 
int EthHdr (const MacAddress &src, const MacAddress &dest, const uint16_t proto)
 
int EthHdr (char *buff, uint16_t len, const MacAddress &src, const MacAddress &dest, const uint16_t proto, uint16_t vlan_id)
 
int EthHdr (char *buff, uint16_t len, const Interface *interface, const MacAddress &src, const MacAddress &dest, const uint16_t proto)
 
int EthHdr (char *buff, uint16_t len, uint32_t ifindex, const MacAddress &src, const MacAddress &dest, const uint16_t proto)
 
void VlanHdr (uint8_t *ptr, uint16_t tci)
 
void IpHdr (uint16_t len, in_addr_t src, in_addr_t dest, uint8_t protocol, uint16_t id, uint8_t ttl)
 
uint16_t IpHdr (char *buff, uint16_t buf_len, uint16_t len, in_addr_t src, in_addr_t dest, uint8_t protocol, uint16_t id, uint8_t ttl)
 
void Ip6Hdr (ip6_hdr *ip, uint16_t plen, uint8_t next_header, uint8_t hlim, uint8_t *src, uint8_t *dest)
 
void UdpHdr (uint16_t len, in_addr_t src, uint16_t src_port, in_addr_t dest, uint16_t dest_port)
 
void UdpHdr (udphdr *hdr, uint16_t len, const uint8_t *src, uint16_t src_port, const uint8_t *dest, uint16_t dest_port, uint8_t next_hdr)
 
void UdpHdr (uint16_t len, const uint8_t *src, uint16_t src_port, const uint8_t *dest, uint16_t dest_port, uint8_t next_hdr)
 
uint16_t UdpHdr (udphdr *udp, uint16_t buf_len, uint16_t len, in_addr_t src, uint16_t src_port, in_addr_t dest, uint16_t dest_port)
 
uint16_t IcmpHdr (char *buff, uint16_t buf_len, uint8_t type, uint8_t code, uint16_t word1, uint16_t word2)
 
void IcmpChecksum (char *buff, uint16_t buf_len)
 
void IgmpChecksum (char *buff, uint16_t buf_len)
 
uint32_t Sum (uint16_t *, std::size_t, uint32_t) const
 
uint16_t Csum (uint16_t *, std::size_t, uint32_t) const
 
uint16_t UdpCsum (in_addr_t, in_addr_t, std::size_t, udphdr *) const
 
uint16_t Ipv6Csum (const uint8_t *src, const uint8_t *dest, uint16_t plen, uint8_t next_hdr, uint16_t *hdr) const
 
uint16_t Icmpv6Csum (const uint8_t *src, const uint8_t *dest, icmp6_hdr *icmp, uint16_t plen) const
 
Agentagent () const
 
uint32_t GetVrfIndex () const
 
uint32_t GetInterfaceIndex () const
 
uint16_t GetLength () const
 
uint32_t GetCmdParam () const
 
PktInfopkt_info () const
 
uint32_t EncapHeaderLen () const
 

Static Public Attributes

static const uint16_t kMaxArpProbes = 256
 

Private Member Functions

uint32_t MaxArpProbeAddresses () const
 
bool HandlePacket ()
 
bool HandleMessage ()
 
void EntryDelete (ArpKey &key)
 
uint16_t ArpHdr (const MacAddress &smac, in_addr_t sip, const MacAddress &tmac, in_addr_t tip, uint16_t op)
 
 DISALLOW_COPY_AND_ASSIGN (ArpHandler)
 

Private Attributes

ether_arp * arp_
 
in_addr_t arp_tpa_
 
tbb::atomic< uint32_t > refcount_
 

Friends

void intrusive_ptr_add_ref (const ArpHandler *p)
 
void intrusive_ptr_release (const ArpHandler *p)
 

Additional Inherited Members

- Protected Attributes inherited from ProtoHandler
Agentagent_
 
boost::shared_ptr< PktInfopkt_info_
 
boost::asio::io_context & io_
 

Detailed Description

Definition at line 16 of file arp_handler.h.

Constructor & Destructor Documentation

ArpHandler::ArpHandler ( Agent agent,
boost::shared_ptr< PktInfo info,
boost::asio::io_context &  io 
)

Definition at line 18 of file arp_handler.cc.

ArpHandler::~ArpHandler ( )
virtual

Definition at line 24 of file arp_handler.cc.

Member Function Documentation

uint16_t ArpHandler::ArpHdr ( const MacAddress smac,
in_addr_t  sip,
const MacAddress tmac,
in_addr_t  tip,
uint16_t  op 
)
private

Definition at line 353 of file arp_handler.cc.

Here is the call graph for this function:

ArpHandler::DISALLOW_COPY_AND_ASSIGN ( ArpHandler  )
private
void ArpHandler::EntryDelete ( ArpKey key)
private

Definition at line 344 of file arp_handler.cc.

Here is the call graph for this function:

bool ArpHandler::HandleMessage ( )
private

Definition at line 254 of file arp_handler.cc.

Here is the call graph for this function:

bool ArpHandler::HandlePacket ( )
private

Definition at line 50 of file arp_handler.cc.

Here is the call graph for this function:

uint32_t ArpHandler::MaxArpProbeAddresses ( ) const
private

Definition at line 452 of file arp_handler.cc.

Here is the call graph for this function:

bool ArpHandler::Run ( void  )
virtual

Implements ProtoHandler.

Definition at line 27 of file arp_handler.cc.

Here is the call graph for this function:

void ArpHandler::SendArp ( uint16_t  op,
const MacAddress smac,
in_addr_t  sip,
const MacAddress tmac,
const MacAddress dmac,
in_addr_t  tip,
uint32_t  itf,
uint32_t  vrf 
)

Definition at line 369 of file arp_handler.cc.

Here is the call graph for this function:

void ArpHandler::SendArpRequestByPlen ( const VmInterface vm_interface,
const MacAddress smac,
const ArpPathPreferenceState data,
const Ip4Address tpa 
)

Definition at line 392 of file arp_handler.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

void intrusive_ptr_add_ref ( const ArpHandler p)
friend

Definition at line 458 of file arp_handler.cc.

void intrusive_ptr_release ( const ArpHandler p)
friend

Definition at line 462 of file arp_handler.cc.

Member Data Documentation

ether_arp* ArpHandler::arp_
private

Definition at line 42 of file arp_handler.h.

in_addr_t ArpHandler::arp_tpa_
private

Definition at line 43 of file arp_handler.h.

const uint16_t ArpHandler::kMaxArpProbes = 256
static

Definition at line 18 of file arp_handler.h.

tbb::atomic<uint32_t> ArpHandler::refcount_
mutableprivate

Definition at line 44 of file arp_handler.h.


The documentation for this class was generated from the following files: