15 svc->destination_ip().to_string(), IPPROTO_ICMP, 0, 0,
"",
16 ((svc->service()->timeout() * 1000) +
17 (svc->service()->timeout_usecs()/1000)),
18 svc->service()->max_retries(),
19 diag_table), service_(svc), state_(SUCCESS) {
23 "SegmentHCDelayTimeoutHandler",
78 uint8_t *msg = pkt_info->packet_buffer()->data();
88 pkt_info->UpdateHeaderPtr();
102 len +=
sizeof(
struct ip);
103 pkt_handler->
IpHdr(len, ntohl(
sip_.to_v4().to_ulong()),
104 ntohl(
dip_.to_v4().to_ulong()),
106 len +=
sizeof(ether_header);
109 uint32_t service_mode = (
static_cast<VmInterface *
>(interface.get()))->service_mode();
110 bool l3_mode =
false;
120 dest_mac = (
static_cast<VmInterface *
>(interface.get()))->vm_mac();
123 if ((static_cast<VmInterface *>(interface.get()))->is_left_si()) {
151 CMD_PARAM_PACKET_CTRL, CMD_PARAM_1_DIAG,
184 std::string data = (
state_ ==
SUCCESS) ?
"success" :
"failure";
InterfaceRef interface() const
uint32_t GetMaxAttempts()
void UpdateService(HealthCheckInstanceService *service)
static const int kBufferSize
virtual void HandleReply(DiagPktHandler *handler)
DiagProto * diag_proto() const
HealthCheckService * service() const
void IncrementDiagStats(uint32_t itf_id, DiagStatsType type)
void RequestTimedOut(uint32_t seqno)
static const std::string kDiagData
void set_len(uint32_t len)
static const MacAddress & left_si_mac()
void FillDiagHeader(AgentDiagPktData *data) const
int GetTaskId(const std::string &name)
int EthHdr(const MacAddress &src, const MacAddress &dest, const uint16_t proto)
static TaskScheduler * GetInstance()
HealthCheckInstanceService * service_
EventManager * event_manager() const
void Send(uint32_t itf, uint32_t vrf, uint16_t, PktHandler::PktModuleName)
int GetTimeout(const HealthCheckInstanceService *svc) const
int GetDelay(const HealthCheckInstanceService *svc) const
SegmentHealthCheckPkt(HealthCheckInstanceService *service, DiagTable *diag_table)
PktInfo * pkt_info() const
static Timer * CreateTimer(boost::asio::io_context &service, const std::string &name, int task_id=Timer::GetTimerTaskId(), int task_instance=Timer::GetTimerInstanceId(), bool delete_on_completion=false)
static const MacAddress & right_si_mac()
bool Start(int time, Handler handler, ErrorHandler error_handler=NULL)
uint32_t max_retries() const
virtual ~SegmentHealthCheckPkt()
boost::intrusive_ptr< Interface > InterfaceRef
uint64_t delay_usecs() const
void OnRead(const std::string &data)
void Notify(Status status)
void IpHdr(uint16_t len, in_addr_t src, in_addr_t dest, uint8_t protocol, uint16_t id, uint8_t ttl)
static bool DeleteTimer(Timer *Timer)
uint64_t timeout_usecs() const
virtual void SendRequest()