Lines Matching defs:packet
61 /* Register our packet type */
252 * batadv_nc_packet_free() - frees nc packet
253 * @nc_packet: the nc packet to free
254 * @dropped: whether the packet is freed because is dropped
570 * batadv_nc_send_packet() - send non-coded packet and free nc_packet struct
571 * @nc_packet: the nc packet to send
583 * @nc_path: the nc path the packet belongs to
584 * @nc_packet: the nc packet to be checked
587 * timeout. If so, the packet is no longer kept and the entry deleted from the
609 /* purge nc packet */
620 * batadv_nc_fwd_flush() - Checks the timestamp of the given nc packet.
622 * @nc_path: the nc path the packet belongs to
623 * @nc_packet: the nc packet to be checked
625 * Checks whether the given nc packet has hit its forward timeout. If so, the
626 * packet is no longer delayed, immediately sent and the entry deleted from the
647 /* Send packet */
658 * batadv_nc_process_nc_paths() - traverse given nc packet pool and free timed
662 * @process_fn: Function called to process given nc packet. Should return true
663 * to encourage this function to proceed with the next packet.
749 * @ogm_packet: incoming ogm packet also used for the checks
787 * @orig_node: orig node originating the ogm packet
788 * @orig_neigh_node: neighboring orig node from which we received the ogm packet
829 * @orig_node: orig node originating the ogm packet
830 * @orig_neigh_node: neighboring orig node from which we received the ogm packet
892 * @orig_node: orig node originating the ogm packet
893 * @orig_neigh_node: neighboring orig node from which we received the ogm packet
895 * @ogm_packet: incoming ogm packet
1011 /* randomize the estimated packet loss (max TQ - estimated TQ) */
1033 * batadv_nc_code_packets() - code a received unicast_packet with an nc packet
1038 * @nc_packet: structure containing the packet to the skb can be coded with
1039 * @neigh_node: next hop to forward packet to
1134 /* coding_len is used when decoding the packet shorter packet */
1149 /* Info about first unicast packet */
1155 /* Info about second unicast packet */
1210 /* Send the coded packet and return true */
1227 * Whenever we network code a packet we have to check whether we received it in
1229 * some neighbors may also have received (overheard) the packet in the network
1231 * neighboring nodes was able to decode the packet, therefore we can only
1232 * re-code the packet if the source of the previous encoded packet is involved.
1233 * Since the source encoded the packet we can be certain it has all necessary
1236 * Return: true if coding of a decoded packet is allowed.
1247 * out_nc_node to retrieve a buffered packet that can be used for coding.
1322 * Return: an nc packet if a suitable coding packet was found, NULL otherwise.
1377 /* Set the mac header as if we actually sent the packet uncoded */
1385 /* Add the packet to the decoding packet pool */
1397 * @neigh_node: next hop to forward packet to
1402 * neighbor of our next hop that potentially sent a packet which our next hop
1405 * Return: true if the skb was consumed (encoded packet sent) or false otherwise
1444 /* out of mem ? Coding failed - we have to free the buffered packet
1456 * @neigh_node: next hop to forward packet to
1457 * @packet_id: checksum to identify packet
1459 * Return: true if the packet was buffered or false in case of an error.
1479 /* Add coding packet to list */
1488 * batadv_nc_skb_forward() - try to code a packet or add it to the coding packet
1491 * @neigh_node: next hop to forward packet to
1493 * Return: true if the skb was consumed (encoded packet sent) or false otherwise
1500 struct batadv_unicast_packet *packet;
1512 packet = (struct batadv_unicast_packet *)payload;
1513 if (packet->packet_type != BATADV_UNICAST)
1530 packet_id = batadv_skb_crc32(skb, payload + sizeof(*packet));
1553 struct batadv_unicast_packet *packet;
1563 /* Check for supported packet type */
1565 packet = (struct batadv_unicast_packet *)payload;
1566 if (packet->packet_type != BATADV_UNICAST)
1590 packet_id = batadv_skb_crc32(skb, payload + sizeof(*packet));
1606 * batadv_nc_skb_store_sniffed_unicast() - check if a received unicast packet
1632 * Return: pointer to decoded unicast packet if the packet was decoded or NULL
1672 /* If we are the second destination the packet was overheard,
1694 * extract the missing packet from the received coded packet
1700 /* Resize decoded skb if decoded with larger packet */
1707 /* Create decoded unicast packet */
1721 * find the data needed to decode the coded packet
1723 * @ethhdr: pointer to the ethernet header inside the coded packet
1724 * @coded: coded packet we try to find decode data for
1726 * Return: pointer to nc packet if the needed data was found or NULL otherwise.
1743 /* Select the correct packet id based on the location of our mac-addr */
1779 "No decoding packet found for %u\n", packet_id);
1785 * batadv_nc_recv_coded_packet() - try to decode coded packet and enqueue the
1786 * resulting unicast packet
1787 * @skb: incoming coded packet
1788 * @recv_if: pointer to interface this packet was received on
1790 * Return: NET_RX_SUCCESS if the packet has been consumed or NET_RX_DROP
1837 /* Decode the packet */
1844 /* Mark packet as decoded to do correct recoding when forwarding */