Lines Matching defs:hdr
89 struct packet_header *hdr;
93 hdr = p->tb[i].hdr_virt;
94 memset(hdr, 0, sizeof(*hdr));
95 memcpy(hdr->l2.dmac, &p->r_mac, 6);
96 memcpy(hdr->l2.smac, &p->l_mac, 6);
97 hdr->l2.type = htons(0x0800);
99 hdr->l3.ver_ihl = 5 | (4 << 4);
100 hdr->l3.ttl = 64;
101 hdr->l3.proto = 0x11;
102 hdr->l3.s_ip = htonl(p->l_ip);
103 hdr->l3.d_ip = htonl(p->r_ip);
105 hdr->l4.s_port = htons(p->l_port);
106 hdr->l4.d_port = htons(p->r_port);
334 struct packet_header *hdr = rb->hdr_virt;
342 memcpy(&p->r_mac, hdr->l2.smac, 6);
343 p->r_ip = ntohl(hdr->l3.s_ip);
344 p->r_port = ntohs(hdr->l4.s_port);