---
name: "rte_ipv6_get_next_ext"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_ip6.h"
---

# rte\_ipv6\_get\_next\_ext(3)

Part of [rte\_ip6.h(3)](/rte_ip6.h/3.md).

## NAME

rte\_ip6.h

## SYNOPSIS

`#include <stdint.h>`\
 `#include <string.h>`\
 `#include <sys/socket.h>`\
 `#include <sys/types.h>`\
 `#include <netinet/in.h>`\
 `#include <arpa/inet.h>`\
 `#include <netinet/ip6.h>`\
 `#include <rte_byteorder.h>`\
 `#include <rte_cksum.h>`\
 `#include <rte_ether.h>`\
 `#include <rte_mbuf.h>`\

### Data Structures

struct **rte\_ipv6\_addr**\

### Macros

\#define **RTE\_IPV6\_ADDR\_SIZE**   16\
 \#define **RTE\_IPV6\_MAX\_DEPTH**   (**RTE\_IPV6\_ADDR\_SIZE** \* CHAR\_BIT)\
 \#define **RTE\_IPV6\_U16\_SPLIT**(x)\
 \#define **RTE\_IPV6**(a,  b,  c,  d,  e,  f,  g,  h)\
 \#define **RTE\_IPV6\_ADDR\_FMT**   	'%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x'\
 \#define **RTE\_IPV6\_ADDR\_SPLIT**(ip)\
 \#define **RTE\_IPV6\_MASK\_FULL**   	**RTE\_IPV6**(0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff)\
 \#define **RTE\_IPV6\_ADDR\_UNSPEC**   **RTE\_IPV6**(0, 0, 0, 0, 0, 0, 0, 0)\
 \#define **RTE\_IPV6\_ADDR\_LOOPBACK**   **RTE\_IPV6**(0, 0, 0, 0, 0, 0, 0, 1)\
 \#define **RTE\_IPV6\_MIN\_MTU**   1280\
 \#define **RTE\_IPV6\_EHDR\_MF\_SHIFT**   0\

**Well known multicast addresses**\

\#define **RTE\_IPV6\_ADDR\_ALLNODES\_IFACE\_LOCAL**   **RTE\_IPV6**(0xff01, 0, 0, 0, 0, 0, 0, 1)\
 \#define **RTE\_IPV6\_ADDR\_ALLNODES\_LINK\_LOCAL**   **RTE\_IPV6**(0xff02, 0, 0, 0, 0, 0, 0, 1)\
 \#define **RTE\_IPV6\_ADDR\_ALLROUTERS\_IFACE\_LOCAL**   **RTE\_IPV6**(0xff01, 0, 0, 0, 0, 0, 0, 2)\
 \#define **RTE\_IPV6\_ADDR\_ALLROUTERS\_LINK\_LOCAL**   **RTE\_IPV6**(0xff02, 0, 0, 0, 0, 0, 0, 2)\
 \#define **RTE\_IPV6\_ADDR\_ALLROUTERS\_SITE\_LOCAL**   **RTE\_IPV6**(0xff05, 0, 0, 0, 0, 0, 0, 2)\

### Enumerations

enum **rte\_ipv6\_mc\_scope** { **RTE\_IPV6\_MC\_SCOPE\_NONE** = 0x00, **RTE\_IPV6\_MC\_SCOPE\_IFACELOCAL** = 0x01, **RTE\_IPV6\_MC\_SCOPE\_LINKLOCAL** = 0x02, **RTE\_IPV6\_MC\_SCOPE\_SITELOCAL** = 0x05, **RTE\_IPV6\_MC\_SCOPE\_ORGLOCAL** = 0x08, **RTE\_IPV6\_MC\_SCOPE\_GLOBAL** = 0x0e }\

### Functions

static bool **rte\_ipv6\_addr\_eq** (const struct **rte\_ipv6\_addr** \*a, const struct **rte\_ipv6\_addr** \*b)\
 static void **rte\_ipv6\_addr\_mask** (struct **rte\_ipv6\_addr** \*ip, uint8\_t depth)\
 static bool **rte\_ipv6\_addr\_eq\_prefix** (const struct **rte\_ipv6\_addr** \*a, const struct **rte\_ipv6\_addr** \*b, uint8\_t depth)\
 static uint8\_t **rte\_ipv6\_mask\_depth** (const struct **rte\_ipv6\_addr** \*mask)\
 static bool **rte\_ipv6\_addr\_is\_unspec** (const struct **rte\_ipv6\_addr** \*ip)\
 static bool **rte\_ipv6\_addr\_is\_loopback** (const struct **rte\_ipv6\_addr** \*ip)\
 static bool **rte\_ipv6\_addr\_is\_linklocal** (const struct **rte\_ipv6\_addr** \*ip)\
 static bool **rte\_ipv6\_addr\_is\_sitelocal** (const struct **rte\_ipv6\_addr** \*ip)\
 static bool **rte\_ipv6\_addr\_is\_v4compat** (const struct **rte\_ipv6\_addr** \*ip)\
 static bool **rte\_ipv6\_addr\_is\_v4mapped** (const struct **rte\_ipv6\_addr** \*ip)\
 static bool **rte\_ipv6\_addr\_is\_mcast** (const struct **rte\_ipv6\_addr** \*ip)\
 static enum **rte\_ipv6\_mc\_scope** **rte\_ipv6\_mc\_scope** (const struct **rte\_ipv6\_addr** \*ip)\
 static void **rte\_ipv6\_solnode\_from\_addr** (struct **rte\_ipv6\_addr** \*sol, const struct **rte\_ipv6\_addr** \*ip)\
 static void **rte\_ether\_mcast\_from\_ipv6** (struct rte\_ether\_addr \*mac, const struct **rte\_ipv6\_addr** \*ip)\
 struct **\_\_rte\_aligned** (2) rte\_ipv6\_hdr\
 static int **rte\_ipv6\_check\_version** (const struct rte\_ipv6\_hdr \*ip)\
 static uint16\_t **rte\_ipv6\_phdr\_cksum** (const struct rte\_ipv6\_hdr \*ipv6\_hdr, uint64\_t ol\_flags)\
 static uint16\_t **rte\_ipv6\_udptcp\_cksum** (const struct rte\_ipv6\_hdr \*ipv6\_hdr, const void \*l4\_hdr)\
 static uint16\_t **rte\_ipv6\_udptcp\_cksum\_mbuf** (const struct **rte\_mbuf** \*m, const struct rte\_ipv6\_hdr \*ipv6\_hdr, uint16\_t l4\_off)\
 static int **rte\_ipv6\_udptcp\_cksum\_verify** (const struct rte\_ipv6\_hdr \*ipv6\_hdr, const void \*l4\_hdr)\
 static int **rte\_ipv6\_udptcp\_cksum\_mbuf\_verify** (const struct **rte\_mbuf** \*m, const struct rte\_ipv6\_hdr \*ipv6\_hdr, uint16\_t l4\_off)\
 static int **rte\_ipv6\_get\_next\_ext** (const uint8\_t \*p, int proto, size\_t \*ext\_len)\

## Detailed Description

IPv6-related defines

Definition in file **rte\_ip6.h**.

## Macro Definition Documentation

### #define RTE\_IPV6\_ADDR\_SIZE 16

Maximum IPv6 address size in bytes.

Definition at line **43** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_MAX\_DEPTH (RTE\_IPV6\_ADDR\_SIZE \* CHAR\_BIT)

Maximum IPv6 address size in bits.

Definition at line **48** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_U16\_SPLIT(x)

**Value:**.PP

```
    (uint8_t)((uint16_t)(x) & UINT16_C(0xff)), \
    (uint8_t)(((uint16_t)(x) >> 8) & UINT16_C(0xff))
```

Split a literal 16 bit unsigned integer into two bytes separated by a comma according to the platform endianness.

**Parameters**

*x* A `uint16_t` literal value.

**Returns**

Two `uint8_t` literals separated by a coma.

Definition at line **162** of file **rte\_ip6.h**.

### #define RTE\_IPV6(a, b, c, d, e, f, g, h)

**Value:**.PP

```
    {{ \
        RTE_IPV6_U16_SPLIT(a), \
        RTE_IPV6_U16_SPLIT(b), \
        RTE_IPV6_U16_SPLIT(c), \
        RTE_IPV6_U16_SPLIT(d), \
        RTE_IPV6_U16_SPLIT(e), \
        RTE_IPV6_U16_SPLIT(f), \
        RTE_IPV6_U16_SPLIT(g), \
        RTE_IPV6_U16_SPLIT(h) \
    }}
```

Shorthand to define a literal IPv6 address based on 16bit unsigned integers.

**Parameters**

*a,b,c,d,e,f,g,h* `uint8_t` literals that will be passed to **RTE\_IPV6\_U16\_SPLIT(x)**.

**Returns**

A literal **rte\_ipv6\_addr** value suitable for static initialization.

Definition at line **179** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_FMT '%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x'

printf() format element for **rte\_ipv6\_addr** structures. To be used along with **RTE\_IPV6\_ADDR\_SPLIT(ip)**.

Definition at line **195** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_SPLIT(ip)

**Value:**.PP

```
    ((uint8_t)(ip)->a[0]), \
    ((uint8_t)(ip)->a[1]), \
    ((uint8_t)(ip)->a[2]), \
    ((uint8_t)(ip)->a[3]), \
    ((uint8_t)(ip)->a[4]), \
    ((uint8_t)(ip)->a[5]), \
    ((uint8_t)(ip)->a[6]), \
    ((uint8_t)(ip)->a[7]), \
    ((uint8_t)(ip)->a[8]), \
    ((uint8_t)(ip)->a[9]), \
    ((uint8_t)(ip)->a[10]), \
    ((uint8_t)(ip)->a[11]), \
    ((uint8_t)(ip)->a[12]), \
    ((uint8_t)(ip)->a[13]), \
    ((uint8_t)(ip)->a[14]), \
    ((uint8_t)(ip)->a[15])
```

For use with **RTE\_IPV6\_ADDR\_FMT**. E.g.:

```
printf(RTE_IPV6_ADDR_FMT "\n", RTE_IPV6_ADDR_SPLIT(&ip));
```

**Parameters**

*ip* A struct **rte\_ipv6\_addr** pointer.

**Returns**

A set of 16 `uint8_t` values separated by comas for use in printf().

Definition at line **210** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_MASK\_FULL RTE\_IPV6(0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff)

Full IPv6 mask. NB: this is not a valid/routable IPv6 address.

Definition at line **229** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_UNSPEC RTE\_IPV6(0, 0, 0, 0, 0, 0, 0, 0)

Unspecified IPv6 address as defined in RFC 4291, section 2.5.2.

Definition at line **233** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_LOOPBACK RTE\_IPV6(0, 0, 0, 0, 0, 0, 0, 1)

Loopback IPv6 address as defined in RFC 4291, section 2.5.3.

Definition at line **251** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_ALLNODES\_IFACE\_LOCAL RTE\_IPV6(0xff01, 0, 0, 0, 0, 0, 0, 1)

Interface-local all-nodes multicast address as defined in RFC 4291, section 2.7.1.

Definition at line **383** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_ALLNODES\_LINK\_LOCAL RTE\_IPV6(0xff02, 0, 0, 0, 0, 0, 0, 1)

Link-local all-nodes multicast address as defined in RFC 4291, section 2.7.1.

Definition at line **385** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_ALLROUTERS\_IFACE\_LOCAL RTE\_IPV6(0xff01, 0, 0, 0, 0, 0, 0, 2)

Interface-local all-routers multicast address as defined in RFC 4291, section 2.7.1.

Definition at line **387** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_ALLROUTERS\_LINK\_LOCAL RTE\_IPV6(0xff02, 0, 0, 0, 0, 0, 0, 2)

Link-local all-routers multicast address as defined in RFC 4291, section 2.7.1.

Definition at line **389** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_ADDR\_ALLROUTERS\_SITE\_LOCAL RTE\_IPV6(0xff05, 0, 0, 0, 0, 0, 0, 2)

Site-local all-routers multicast address as defined in RFC 4291, section 2.7.1.

Definition at line **391** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_MIN\_MTU 1280

Minimum MTU for IPv6, see RFC 8200.

Definition at line **542** of file **rte\_ip6.h**.

### #define RTE\_IPV6\_EHDR\_MF\_SHIFT 0

IPv6 fragment extension header.

Definition at line **746** of file **rte\_ip6.h**.

## Enumeration Type Documentation

### enum rte\_ipv6\_mc\_scope

IPv6 multicast scope values as defined in RFC 4291, section 2.7.

**Enumerator**

- *RTE\_IPV6\_MC\_SCOPE\_NONE*

  *Invalid multicast scope.*

- *RTE\_IPV6\_MC\_SCOPE\_IFACELOCAL*

  *Interface-local multicast scope.*

- *RTE\_IPV6\_MC\_SCOPE\_LINKLOCAL*

  *Link-local multicast scope.*

- *RTE\_IPV6\_MC\_SCOPE\_SITELOCAL*

  *Site-local multicast scope.*

- *RTE\_IPV6\_MC\_SCOPE\_ORGLOCAL*

  *Organizational-local multicast scope.*

- *RTE\_IPV6\_MC\_SCOPE\_GLOBAL*

  *Global multicast scope.*

*Definition at line* **348** *of file* **rte\_ip6.h***.*

## Function Documentation

### static bool rte\_ipv6\_addr\_eq (const struct rte\_ipv6\_addr \* a, const struct rte\_ipv6\_addr \* b)` [inline]`, ` [static]`

*Check if two IPv6 Addresses are equal.*

**Parameters**

*a The first address.* \
 *b The second address.*

**Returns**

*true if both addresses are identical.*

*Definition at line* **68** *of file* **rte\_ip6.h***.*

### static void rte\_ipv6\_addr\_mask (struct rte\_ipv6\_addr \* ip, uint8\_t depth)` [inline]`, ` [static]`

*Mask an IPv6 address using the specified depth.*

*Leave untouched one bit per unit in the depth variable and set the rest to 0.*

**Parameters**

*ip The address to mask.* \
 *depth All bits starting from this bit number will be set to zero.*

*Definition at line* **84** *of file* **rte\_ip6.h***.*

### static bool rte\_ipv6\_addr\_eq\_prefix (const struct rte\_ipv6\_addr \* a, const struct rte\_ipv6\_addr \* b, uint8\_t depth)` [inline]`, ` [static]`

*Check if two IPv6 addresses belong to the same network prefix.*

**Parameters**

*a The first address or network.* \
 *b The second address or network.* \
 *depth The network prefix length.*

**Returns**

`true` *if the first* `depth` *bits of both addresses are identical.*

*Definition at line* **109** *of file* **rte\_ip6.h***.*

### static uint8\_t rte\_ipv6\_mask\_depth (const struct rte\_ipv6\_addr \* mask)` [inline]`, ` [static]`

*Get the depth of a given IPv6 address mask.*

**Parameters**

*mask The address mask.*

**Returns**

*The number of consecutive bits set to 1 starting from the beginning of the mask.*

*Definition at line* **132** *of file* **rte\_ip6.h***.*

### static bool rte\_ipv6\_addr\_is\_unspec (const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Check if an IPv6 address is unspecified as defined in RFC 4291, section 2.5.2.*

**Parameters**

*ip The address to check.*

**Returns**

`true` *if the address is the unspecified address (all zeroes).*

*Definition at line* **244** *of file* **rte\_ip6.h***.*

### static bool rte\_ipv6\_addr\_is\_loopback (const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Check if an IPv6 address is the loopback address as defined in RFC 4291, section 2.5.3.*

**Parameters**

*ip The address to check.*

**Returns**

`true` *if the address is the loopback address (all zeroes except the last bit).*

*Definition at line* **263** *of file* **rte\_ip6.h***.*

### static bool rte\_ipv6\_addr\_is\_linklocal (const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Check if an IPv6 address is link-local as defined in RFC 4291, section 2.5.6.*

**Parameters**

*ip The address to check.*

**Returns**

`true` *if the address is a link-local address.*

*Definition at line* **278** *of file* **rte\_ip6.h***.*

### static bool rte\_ipv6\_addr\_is\_sitelocal (const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Check if an IPv6 address is site-local as defined in RFC 4291, section 2.5.7.*

**Parameters**

*ip The address to check.*

**Returns**

`true` *if the address is a site-local address.*

*Definition at line* **292** *of file* **rte\_ip6.h***.*

### static bool rte\_ipv6\_addr\_is\_v4compat (const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Check if an IPv6 address is an IPv4-compatible address as defined in RFC 4291, section 2.5.5.1.*

**Parameters**

*ip The address to check.*

**Returns**

`true` *if the address is an IPv4-compatible address.*

*Definition at line* **307** *of file* **rte\_ip6.h***.*

### static bool rte\_ipv6\_addr\_is\_v4mapped (const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Check if an IPv6 address is an IPv4-mapped address as defined in RFC 4291, section 2.5.5.2.*

**Parameters**

*ip The address to check.*

**Returns**

`true` *if the address is an IPv4-mapped address.*

*Definition at line* **325** *of file* **rte\_ip6.h***.*

### static bool rte\_ipv6\_addr\_is\_mcast (const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Check if an IPv6 address is multicast as defined in RFC 4291, section 2.7.*

**Parameters**

*ip The address to check.*

**Returns**

`true` *if the address is multicast.*

*Definition at line* **340** *of file* **rte\_ip6.h***.*

### static enum rte\_ipv6\_mc\_scope rte\_ipv6\_mc\_scope (const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Extract the IPv6 multicast scope value as defined in RFC 4291, section 2.7.*

**Parameters**

*ip The address from which to get the multicast scope.*

**Returns**

*The multicast scope of the address, or* **RTE\_IPV6\_MC\_SCOPE\_NONE** *if the address is not multicast.*

*Definition at line* **373** *of file* **rte\_ip6.h***.*

### static void rte\_ipv6\_solnode\_from\_addr (struct rte\_ipv6\_addr \* sol, const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Convert a unicast or anycast IPv6 address to a solicited-node multicast address as defined in RFC 4291, section 2.7.1.*

**Parameters**

*sol The IPv6 solicited-node multicast address to generate.* \
 *ip A unicast or anycast address.*

*Definition at line* **434** *of file* **rte\_ip6.h***.*

### static void rte\_ether\_mcast\_from\_ipv6 (struct rte\_ether\_addr \* mac, const struct rte\_ipv6\_addr \* ip)` [inline]`, ` [static]`

*Generate a multicast Ethernet address from a multicast IPv6 address as defined in RFC 2464, section 7.*

**Parameters**

*mac The multicast Ethernet address to generate.* \
 *ip A multicast IPv6 address.*

*Definition at line* **456** *of file* **rte\_ip6.h***.*

### struct \_\_rte\_aligned (2)

*IPv6 Header*

*IPv6 Routing Extension Header \< IP version, traffic class & flow label.*

*\< Flow label*

*\< ECN*

*\< Differentiated services*

*\< Version*

*\< IP payload size, including ext. headers*

*\< Protocol, next header.*

*\< Hop limits.*

*\< IP address of source host.*

*\< IP address of destination host(s).*

*\< Protocol, next header.*

*\< Header length.*

*\< Extension header type.*

*\< Valid segments number.*

*\< Packet control data per type.*

*\< The last\_entry field of SRH*

*\< Packet flag.*

*\< Packet tag.*

*\< Next header type*

*\< Reserved*

*\< All fragmentation data*

*\< Packet ID*

*Definition at line* **456** *of file* **rte\_ip6.h***.*

### static int rte\_ipv6\_check\_version (const struct rte\_ipv6\_hdr \* ip)` [inline]`, ` [static]`

*Check that the IPv6 header version field is valid according to RFC 8200 section 3.*

**Parameters**

*ip The IPv6 header.*

**Returns**

`0` *if the version field is valid.* `-EINVAL` *otherwise.*

*Definition at line* **502** *of file* **rte\_ip6.h***.*

### static uint16\_t rte\_ipv6\_phdr\_cksum (const struct rte\_ipv6\_hdr \* ipv6\_hdr, uint64\_t ol\_flags)` [inline]`, ` [static]`

*Process the pseudo-header checksum of an IPv6 header.*

*Depending on the ol\_flags, the pseudo-header checksum expected by the drivers is not the same. For instance, when TSO is enabled, the IPv6 payload length must not be included in the packet.*

*When ol\_flags is 0, it computes the standard pseudo-header checksum.*

**Parameters**

*ipv6\_hdr The pointer to the contiguous IPv6 header.* \
 *ol\_flags The ol\_flags of the associated mbuf.*

**Returns**

*The non-complemented checksum to set in the L4 header.*

*Definition at line* **561** *of file* **rte\_ip6.h***.*

### static uint16\_t rte\_ipv6\_udptcp\_cksum (const struct rte\_ipv6\_hdr \* ipv6\_hdr, const void \* l4\_hdr)` [inline]`, ` [static]`

*Process the IPv6 UDP or TCP checksum.*

*The IPv6 header must not be followed by extension headers. The layer 4 checksum must be set to 0 in the L4 header by the caller.*

**Parameters**

*ipv6\_hdr The pointer to the contiguous IPv6 header.* \
 *l4\_hdr The pointer to the beginning of the L4 header.*

**Returns**

*The complemented checksum to set in the L4 header.*

*Definition at line* **615** *of file* **rte\_ip6.h***.*

### static uint16\_t rte\_ipv6\_udptcp\_cksum\_mbuf (const struct rte\_mbuf \* m, const struct rte\_ipv6\_hdr \* ipv6\_hdr, uint16\_t l4\_off)` [inline]`, ` [static]`

*Process the IPv6 UDP or TCP checksum of a packet.*

*The IPv6 header must not be followed by extension headers. The layer 4 checksum must be set to 0 in the L4 header by the caller.*

**Parameters**

*m The pointer to the mbuf.* \
 *ipv6\_hdr The pointer to the contiguous IPv6 header.* \
 *l4\_off The offset in bytes to start L4 checksum.*

**Returns**

*The complemented checksum to set in the L4 header.*

*Definition at line* **672** *of file* **rte\_ip6.h***.*

### static int rte\_ipv6\_udptcp\_cksum\_verify (const struct rte\_ipv6\_hdr \* ipv6\_hdr, const void \* l4\_hdr)` [inline]`, ` [static]`

*Validate the IPv6 UDP or TCP checksum.*

*In case of UDP, the caller must first check if udp\_hdr-\>dgram\_cksum is 0: this is either invalid or means no checksum in some situations. See 8.1 (Upper-Layer Checksums) in RFC 8200.*

**Parameters**

*ipv6\_hdr The pointer to the contiguous IPv6 header.* \
 *l4\_hdr The pointer to the beginning of the L4 header.*

**Returns**

*Return 0 if the checksum is correct, else -1.*

*Definition at line* **705** *of file* **rte\_ip6.h***.*

### static int rte\_ipv6\_udptcp\_cksum\_mbuf\_verify (const struct rte\_mbuf \* m, const struct rte\_ipv6\_hdr \* ipv6\_hdr, uint16\_t l4\_off)` [inline]`, ` [static]`

*Validate the IPv6 UDP or TCP checksum of a packet.*

*In case of UDP, the caller must first check if udp\_hdr-\>dgram\_cksum is 0: this is either invalid or means no checksum in some situations. See 8.1 (Upper-Layer Checksums) in RFC 8200.*

**Parameters**

*m The pointer to the mbuf.* \
 *ipv6\_hdr The pointer to the contiguous IPv6 header.* \
 *l4\_off The offset in bytes to start L4 checksum.*

**Returns**

*Return 0 if the checksum is correct, else -1.*

*Definition at line* **733** *of file* **rte\_ip6.h***.*

### static int rte\_ipv6\_get\_next\_ext (const uint8\_t \* p, int proto, size\_t \* ext\_len)` [inline]`, ` [static]`

*Parse next IPv6 header extension*

*This function checks if proto number is an IPv6 extensions and parses its data if so, providing information on next header and extension length.*

**Parameters**

*p Pointer to an extension raw data.* \
 *proto Protocol number extracted from the 'next header' field from the IPv6 header or the previous extension.* \
 *ext\_len Extension data length.*

**Returns**

*next protocol number if proto is an IPv6 extension, -EINVAL otherwise*

*Definition at line* **787** *of file* **rte\_ip6.h***.*

## Author

*Generated automatically by Doxygen for DPDK from the source code.*
