Lines Matching refs:packet
16 void FAST_FUNC d6_dump_packet(struct d6_packet *packet) in d6_dump_packet() argument
23 , packet->d6_xid32 in d6_dump_packet()
32 , struct d6_packet *packet, int fd) in d6_recv_kernel_packet() argument
36 memset(packet, 0, sizeof(*packet)); in d6_recv_kernel_packet()
37 bytes = safe_read(fd, packet, sizeof(*packet)); in d6_recv_kernel_packet()
49 d6_dump_packet(packet); in d6_recv_kernel_packet()
61 struct ip6_udp_d6_packet packet; in d6_send_raw_packet_from_client_data_ifindex() local
73 memset(&packet, 0, offsetof(struct ip6_udp_d6_packet, data)); in d6_send_raw_packet_from_client_data_ifindex()
74 packet.data = *d6_pkt; /* struct copy */ in d6_send_raw_packet_from_client_data_ifindex()
89 packet.ip6.ip6_vfc = (6 << 4); /* 4 bits version, top 4 bits of tclass */ in d6_send_raw_packet_from_client_data_ifindex()
91 packet.ip6.ip6_src = *src_ipv6; /* struct copy */ in d6_send_raw_packet_from_client_data_ifindex()
92 packet.ip6.ip6_dst = *dst_ipv6; /* struct copy */ in d6_send_raw_packet_from_client_data_ifindex()
93 packet.udp.source = htons(source_port); in d6_send_raw_packet_from_client_data_ifindex()
94 packet.udp.dest = htons(dest_port); in d6_send_raw_packet_from_client_data_ifindex()
96 packet.udp.len = htons(sizeof(struct udphdr) + d6_pkt_size); in d6_send_raw_packet_from_client_data_ifindex()
97 packet.ip6.ip6_plen = packet.udp.len; in d6_send_raw_packet_from_client_data_ifindex()
105 packet.ip6.ip6_hlim = IPPROTO_UDP; in d6_send_raw_packet_from_client_data_ifindex()
106 packet.udp.check = inet_cksum( in d6_send_raw_packet_from_client_data_ifindex()
107 (uint8_t *)&packet + 4, in d6_send_raw_packet_from_client_data_ifindex()
111 packet.ip6.ip6_hlim = 1; /* observed Windows machines to use hlim=1 */ in d6_send_raw_packet_from_client_data_ifindex()
112 packet.ip6.ip6_nxt = IPPROTO_UDP; in d6_send_raw_packet_from_client_data_ifindex()
115 result = sendto(fd, &packet, offsetof(struct ip6_udp_d6_packet, data) + d6_pkt_size, in d6_send_raw_packet_from_client_data_ifindex()