Lines Matching defs:hdr
148 struct packet_header *hdr;
155 hdr = p->tb[i].hdr_virt;
156 memset(hdr, 0, sizeof(*hdr));
157 memcpy(hdr->l2.dmac, &p->r_mac, 6);
158 memcpy(hdr->l2.smac, &p->l_mac, 6);
159 hdr->l2.type = htons(0x0800);
161 hdr->l3.ver_ihl = 5 | (4 << 4);
162 hdr->l3.ttl = 64;
163 hdr->l3.proto = 0x11;
164 hdr->l3.s_ip = htonl(p->l_ip);
165 hdr->l3.d_ip = htonl(p->r_ip);
167 hdr->l4.s_port = htons(p->l_port);
168 hdr->l4.d_port = htons(p->r_port);