Add pktref_create() helper

This commit is contained in:
Andreas Öman 2010-06-16 21:07:13 +00:00
parent 2ed2283a25
commit cb1624b995
2 changed files with 14 additions and 0 deletions

View file

@ -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;
}

View file

@ -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_ */