Lines Matching refs:icmp_packet
35 struct icmp_packet_rr *icmp_packet,
119 if ((!buf) || (count < sizeof(struct icmp_packet)))
140 error = __copy_to_user(buf, &socket_packet->icmp_packet,
157 struct icmp_packet_rr icmp_packet;
160 size_t packet_len = sizeof(struct icmp_packet);
164 if (len < sizeof(struct icmp_packet)) {
180 if (__copy_from_user(&icmp_packet, buff, packet_len))
183 if (icmp_packet.packet_type != BAT_ICMP) {
190 if (icmp_packet.msg_type != ECHO_REQUEST) {
197 icmp_packet.uid = socket_client->index;
199 if (icmp_packet.version != COMPAT_VERSION) {
200 icmp_packet.msg_type = PARAMETER_PROBLEM;
201 icmp_packet.ttl = COMPAT_VERSION;
202 bat_socket_add_packet(socket_client, &icmp_packet, packet_len);
210 orig_node = ((struct orig_node *)hash_find(orig_hash, icmp_packet.dst));
229 memcpy(icmp_packet.orig,
233 memcpy(icmp_packet.rr, batman_if->net_dev->dev_addr, ETH_ALEN);
235 send_raw_packet((unsigned char *)&icmp_packet,
243 icmp_packet.msg_type = DESTINATION_UNREACHABLE;
244 bat_socket_add_packet(socket_client, &icmp_packet, packet_len);
289 struct icmp_packet_rr *icmp_packet,
301 memcpy(&socket_packet->icmp_packet, icmp_packet, icmp_len);
308 if (!socket_client_hash[icmp_packet->uid]) {
331 void bat_socket_receive_packet(struct icmp_packet_rr *icmp_packet,
334 struct socket_client *hash = socket_client_hash[icmp_packet->uid];
337 bat_socket_add_packet(hash, icmp_packet, icmp_len);