refactor: packet module (split to parse/build/layer/tunnel/utils)

This commit is contained in:
luwenpeng
2024-06-24 17:07:05 +08:00
parent d8963af5f8
commit 71422ebb36
36 changed files with 796 additions and 724 deletions

25
src/packet/packet_ldbc.h Normal file
View File

@@ -0,0 +1,25 @@
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
#include <stdint.h>
#include "stellar/packet.h"
enum load_balance
{
LDBC_HASH_OUTERMOST_INT_IP = 1,
LDBC_HASH_OUTERMOST_EXT_IP = 2,
LDBC_HASH_OUTERMOST_INT_EXT_IP = 3,
LDBC_HASH_INNERMOST_INT_IP = 4,
LDBC_HASH_INNERMOST_EXT_IP = 5,
};
uint64_t packet_ldbc_hash(const struct packet *pkt, enum load_balance ldbc, enum packet_direction direction);
#ifdef __cplusplus
}
#endif