add packet type raw and pseudo

This commit is contained in:
luwenpeng
2024-11-13 14:43:38 +08:00
parent 8349a631e1
commit 492a7fb8ea
10 changed files with 65 additions and 52 deletions

View File

@@ -95,16 +95,6 @@ uint16_t packet_get_link_id(const struct packet *pkt)
return pkt->meta.link_id;
}
void packet_set_ctrl(struct packet *pkt, bool ctrl)
{
pkt->meta.is_ctrl = ctrl;
}
bool packet_is_ctrl(const struct packet *pkt)
{
return pkt->meta.is_ctrl;
}
void packet_set_claim(struct packet *pkt, bool claim)
{
pkt->meta.is_claim = claim;
@@ -125,6 +115,16 @@ enum packet_direction packet_get_direction(const struct packet *pkt)
return pkt->meta.direction;
}
enum packet_type packet_get_type(const struct packet *pkt)
{
return pkt->type;
}
void packet_set_type(struct packet *pkt, enum packet_type type)
{
pkt->type = type;
}
void packet_set_action(struct packet *pkt, enum packet_action action)
{
pkt->meta.action = action;