Add stellar thread cycle
This commit is contained in:
@@ -102,6 +102,7 @@ static inline struct packet *packet_dup(const struct packet *pkt)
|
||||
return NULL;
|
||||
}
|
||||
memcpy(pkt_dup, pkt, sizeof(struct packet));
|
||||
pkt_dup->user_data = NULL;
|
||||
|
||||
if (pkt->data_len)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
unsigned char data[] = {0x45, 0x00, 0x00, 0x2c, 0xff, 0xff, 0x20, 0x00, 0x7f, 0x06, 0x4d, 0x8b, 0xc0, 0xa8, 0x24, 0x67, 0xc0, 0xa8, 0x28, 0x89};
|
||||
|
||||
TEST(IPV4_HELPERS, GET)
|
||||
TEST(IPV4_HELPERS, TEST)
|
||||
{
|
||||
const struct ip *hdr = (struct ip *)data;
|
||||
EXPECT_TRUE(ipv4_hdr_get_version(hdr) == 4);
|
||||
|
||||
@@ -74,7 +74,7 @@ unsigned char data[] = {
|
||||
0xd9, 0x03, 0x9f, 0x98, 0xec, 0x5f, 0xc6, 0x3c, 0x3b, 0x12, 0x47, 0x92, 0xa0, 0x12, 0xaa, 0xaa, 0xfe, 0x30, 0x00, 0x00, 0x02, 0x04, 0xff, 0xd7, 0x04, 0x02,
|
||||
0x08, 0x0a, 0xa4, 0xef, 0xa3, 0xcc, 0xa4, 0xef, 0xa3, 0xcc, 0x01, 0x03, 0x03, 0x07};
|
||||
|
||||
TEST(TCP_HELPERS, GET)
|
||||
TEST(TCP_HELPERS, TEST)
|
||||
{
|
||||
const struct tcphdr *hdr = (struct tcphdr *)data;
|
||||
EXPECT_TRUE(tcp_hdr_get_sport(hdr) == 55555);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
unsigned char data[] = {0x0f, 0xa1, 0x1f, 0x40, 0x00, 0x9b, 0x1e, 0x1e};
|
||||
|
||||
TEST(UDP_HELPERS, GET)
|
||||
TEST(UDP_HELPERS, TEST)
|
||||
{
|
||||
const struct udphdr *hdr = (struct udphdr *)data;
|
||||
EXPECT_TRUE(udp_hdr_get_sport(hdr) == 4001);
|
||||
|
||||
Reference in New Issue
Block a user