src/dpdk/lib/librte_ip_frag/rte_ip_frag.h
static inline int
rte_ipv4_frag_pkt_is_fragmented(const struct rte_ipv4_hdr *hdr)
{
	uint16_t flag_offset, ip_flag, ip_ofs;

	flag_offset = rte_be_to_cpu_16(hdr->fragment_offset);
	ip_ofs = (uint16_t)(flag_offset & RTE_IPV4_HDR_OFFSET_MASK);
	ip_flag = (uint16_t)(flag_offset & RTE_IPV4_HDR_MF_FLAG);

	return ip_flag != 0 || ip_ofs  != 0;
}
/**
 * Check if the IPv4 packet is fragmented
 *
 * @param hdr
 *   IPv4 header of the packet
 * @return
 *   1 if fragmented, 0 if not fragmented
 */
Check if the IPv4 packet is fragmented
@param hdr
IPv4 header of the packet
@return
1 if fragmented, 0 if not fragmented
Check if the IPv4 packet is fragmented @param hdr IPv4 header of the packet @return 1 if fragmented 0 if not fragmented
static inline int
rte_ipv4_frag_pkt_is_fragmented(const struct rte_ipv4_hdr *hdr)
{
	uint16_t flag_offset, ip_flag, ip_ofs;
	flag_offset = rte_be_to_cpu_16(hdr->fragment_offset);
	ip_ofs = (uint16_t)(flag_offset & RTE_IPV4_HDR_OFFSET_MASK);
	ip_flag = (uint16_t)(flag_offset & RTE_IPV4_HDR_MF_FLAG);
	return ip_flag != 0 || ip_ofs  != 0;
}
static inline int rte_ipv4_frag_pkt_is_fragmented ( const struct rte_ipv4_hdr * hdr ) { uint16_t flag_offset , ip_flag , ip_ofs ; flag_offset = rte_be_to_cpu_16 ( hdr -> fragment_offset ) ; ip_ofs = ( uint16_t ) ( flag_offset & RTE_IPV4_HDR_OFFSET_MASK ) ; ip_flag = ( uint16_t ) ( flag_offset & RTE_IPV4_HDR_MF_FLAG ) ; return ip_flag != 0 || ip_ofs != 0 ; }
Check if the IPv4 packet is fragmented
 @param hdr
   IPv4 header of the packet
 @return
   1 if fragmented, 0 if not fragmented
Check if the IPv4 packet is fragmented @param hdr IPv4 header of the packet @return 1 if fragmented 0 if not fragmented