feature: add packet_manager API implementation

This commit is contained in:
luwenpeng
2024-09-13 18:03:05 +08:00
parent 173a6ced61
commit e53aeff891
6 changed files with 462 additions and 7 deletions

View File

@@ -91,16 +91,26 @@ uint16_t packet_get_link_id(const struct packet *pkt)
return pkt->meta.link_id;
}
void packet_set_ctrl(struct packet *pkt, uint8_t ctrl)
void packet_set_ctrl(struct packet *pkt, bool ctrl)
{
pkt->meta.is_ctrl = ctrl;
}
uint8_t packet_is_ctrl(const struct packet *pkt)
bool packet_is_ctrl(const struct packet *pkt)
{
return pkt->meta.is_ctrl;
}
void packet_set_stolen(struct packet *pkt, bool stolen)
{
pkt->meta.is_stolen = stolen;
}
bool packet_is_stolen(const struct packet *pkt)
{
return pkt->meta.is_stolen;
}
void packet_set_direction(struct packet *pkt, enum packet_direction dir)
{
pkt->meta.direction = dir;