2024-10-06 20:08:22 -07:00
|
|
|
#pragma once
|
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
#include "ehs/Serializer.h"
|
2024-10-06 20:08:22 -07:00
|
|
|
|
|
|
|
namespace ehs
|
|
|
|
{
|
|
|
|
enum class EndDisp : UInt_8
|
|
|
|
{
|
|
|
|
ENDPOINT,
|
|
|
|
SERVICE
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class Status : UInt_8
|
|
|
|
{
|
|
|
|
ACTIVE,
|
|
|
|
PENDING,
|
|
|
|
IN_LOCAL_QUEUE,
|
|
|
|
IN_REMOTE_QUEUE,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Header
|
|
|
|
{
|
2024-10-06 22:54:29 -07:00
|
|
|
UInt_64 encHashId = 0;
|
2024-10-06 20:08:22 -07:00
|
|
|
UInt_64 id = 0;
|
|
|
|
UInt_64 fragments = 0;
|
|
|
|
UInt_64 fragment = 0;
|
|
|
|
bool ensure = false;
|
|
|
|
EndDisp disposition = EndDisp::ENDPOINT;
|
|
|
|
Char_8 token[64] = {};
|
|
|
|
UInt_64 system = 0;
|
|
|
|
UInt_64 op = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Packet
|
|
|
|
{
|
|
|
|
Header header;
|
|
|
|
Serializer<UInt_64> payload;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Insurance
|
|
|
|
{
|
|
|
|
Header header;
|
|
|
|
Serializer<UInt_64> payload;
|
|
|
|
float lastResend;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
#ifndef EHC_IPV4_PAYLOAD
|
|
|
|
#define EHC_IPV4_PAYLOAD (EHS_IPV4_UDP_PAYLOAD - (UInt_16)sizeof(Header))
|
2024-10-06 20:08:22 -07:00
|
|
|
#endif
|
|
|
|
|
2024-10-06 22:54:29 -07:00
|
|
|
#ifndef EHC_IPV6_PAYLOAD
|
|
|
|
#define EHC_IPV6_PAYLOAD (EHS_IPV6_UDP_PAYLOAD - (UInt_16)sizeof(Header))
|
2024-10-06 20:08:22 -07:00
|
|
|
#endif
|