Add pktref_create() helper
This commit is contained in:
parent
2ed2283a25
commit
cb1624b995
2 changed files with 14 additions and 0 deletions
12
src/packet.c
12
src/packet.c
|
@ -160,3 +160,15 @@ pkt_copy(th_pkt_t *pkt)
|
|||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
th_pktref_t *
|
||||
pktref_create(th_pkt_t *pkt)
|
||||
{
|
||||
th_pktref_t *pr = malloc(sizeof(th_pktref_t));
|
||||
pr->pr_pkt = pkt;
|
||||
return pr;
|
||||
}
|
||||
|
|
|
@ -74,4 +74,6 @@ th_pkt_t *pkt_merge_global(th_pkt_t *pkt);
|
|||
|
||||
th_pkt_t *pkt_copy(th_pkt_t *pkt);
|
||||
|
||||
th_pktref_t *pktref_create(th_pkt_t *pkt);
|
||||
|
||||
#endif /* PACKET_H_ */
|
||||
|
|
Loading…
Add table
Reference in a new issue