OpenSDN source code
|
#include <diag_pkt_handler.h>
Public Member Functions | |
DiagPktHandler (Agent *agent, boost::shared_ptr< PktInfo > info, boost::asio::io_context &io) | |
virtual bool | Run () |
void | SetReply () |
void | SetDiagChkSum () |
void | SetDiagChkSumV6 () |
void | Reply () |
void | SendOverlayResponse () |
const std::string & | GetAddress () const |
uint8_t * | GetData () |
bool | IsDone () const |
void | set_done (bool done) |
void | TcpHdr (in_addr_t, uint16_t, in_addr_t, uint16_t, bool, uint32_t, uint16_t) |
void | TcpHdr (uint16_t len, const uint8_t *src, uint16_t sport, const uint8_t *dest, uint16_t dport, bool is_syn, uint32_t seq_no, uint8_t next_hdr) |
![]() | |
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 |
Agent * | agent () const |
uint32_t | GetVrfIndex () const |
uint32_t | GetInterfaceIndex () const |
uint16_t | GetLength () const |
uint32_t | GetCmdParam () const |
PktInfo * | pkt_info () const |
uint32_t | EncapHeaderLen () const |
Static Public Attributes | |
static const uint8_t | icmp_payload_len = 128 |
Private Member Functions | |
bool | IsTraceRoutePacket () |
bool | IsOverlayPingPacket () |
void | SetReturnCode (OverlayOamPktData *oamdata) |
bool | HandleTraceRoutePacket () |
void | SendTimeExceededPacket () |
void | SendTimeExceededV6Packet () |
bool | HandleTraceRouteResponse () |
bool | ParseIcmpData (const uint8_t *data, uint16_t data_len, uint16_t *key, bool is_v4) |
uint16_t | TcpCsum (in_addr_t, in_addr_t, uint16_t, tcphdr *) |
void | Swap () |
void | TunnelHdrSwap () |
void | SwapL4 () |
void | Swapv6L4 () |
void | SwapIpHdr () |
void | SwapIp6Hdr () |
void | SwapEthHdr () |
void | BuildReply () |
void | SegmentHealthCheckReply () |
Private Attributes | |
bool | done_ |
DiagTable * | diag_table_ |
std::string | address_ |
Additional Inherited Members | |
![]() | |
Agent * | agent_ |
boost::shared_ptr< PktInfo > | pkt_info_ |
boost::asio::io_context & | io_ |
Definition at line 30 of file diag_pkt_handler.h.
|
inline |
Definition at line 33 of file diag_pkt_handler.h.
|
private |
Definition at line 59 of file diag_pkt_handler.cc.
|
inline |
Definition at line 43 of file diag_pkt_handler.h.
|
inline |
Definition at line 44 of file diag_pkt_handler.h.
|
private |
Definition at line 95 of file diag_pkt_handler.cc.
|
private |
|
inline |
Definition at line 47 of file diag_pkt_handler.h.
|
private |
Definition at line 89 of file diag_pkt_handler.cc.
|
private |
Definition at line 81 of file diag_pkt_handler.cc.
|
private |
Definition at line 283 of file diag_pkt_handler.cc.
void DiagPktHandler::Reply | ( | ) |
Definition at line 65 of file diag_pkt_handler.cc.
|
virtual |
Implements ProtoHandler.
Definition at line 361 of file diag_pkt_handler.cc.
|
private |
Definition at line 71 of file diag_pkt_handler.cc.
void DiagPktHandler::SendOverlayResponse | ( | ) |
|
private |
|
private |
|
inline |
Definition at line 48 of file diag_pkt_handler.h.
void DiagPktHandler::SetDiagChkSum | ( | ) |
Definition at line 31 of file diag_pkt_handler.cc.
void DiagPktHandler::SetDiagChkSumV6 | ( | ) |
void DiagPktHandler::SetReply | ( | ) |
Definition at line 26 of file diag_pkt_handler.cc.
|
private |
|
private |
Definition at line 552 of file diag_pkt_handler.cc.
|
private |
Definition at line 547 of file diag_pkt_handler.cc.
|
private |
Definition at line 538 of file diag_pkt_handler.cc.
|
private |
Definition at line 531 of file diag_pkt_handler.cc.
|
private |
Definition at line 493 of file diag_pkt_handler.cc.
|
private |
Definition at line 516 of file diag_pkt_handler.cc.
|
private |
Definition at line 485 of file diag_pkt_handler.cc.
void DiagPktHandler::TcpHdr | ( | in_addr_t | src, |
uint16_t | sport, | ||
in_addr_t | dst, | ||
uint16_t | dport, | ||
bool | is_syn, | ||
uint32_t | seq_no, | ||
uint16_t | len | ||
) |
Definition at line 439 of file diag_pkt_handler.cc.
void DiagPktHandler::TcpHdr | ( | uint16_t | len, |
const uint8_t * | src, | ||
uint16_t | sport, | ||
const uint8_t * | dest, | ||
uint16_t | dport, | ||
bool | is_syn, | ||
uint32_t | seq_no, | ||
uint8_t | next_hdr | ||
) |
Definition at line 462 of file diag_pkt_handler.cc.
|
private |
Definition at line 626 of file diag_pkt_handler.cc.
|
private |
Definition at line 76 of file diag_pkt_handler.h.
|
private |
Definition at line 75 of file diag_pkt_handler.h.
|
private |
Definition at line 74 of file diag_pkt_handler.h.
|
static |
Definition at line 32 of file diag_pkt_handler.h.