---
name: "rte_node_ip4_api.h"
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_node_ip4_api.h"
---

# rte\_node\_ip4\_api.h(3)

## NAME

rte\_node\_ip4\_api.h

## SYNOPSIS

`#include <rte_common.h>`\
 `#include <rte_compat.h>`\
 `#include <rte_graph.h>`\

### Data Structures

struct **rte\_node\_ip4\_reassembly\_cfg**\

### Enumerations

enum **rte\_node\_ip4\_lookup\_next** { **RTE\_NODE\_IP4\_LOOKUP\_NEXT\_REWRITE**, **RTE\_NODE\_IP4\_LOOKUP\_NEXT\_IP4\_LOCAL**, **RTE\_NODE\_IP4\_LOOKUP\_NEXT\_PKT\_DROP** }\
 enum **rte\_node\_ip4\_local\_next** { **RTE\_NODE\_IP4\_LOCAL\_NEXT\_UDP4\_INPUT**, **RTE\_NODE\_IP4\_LOCAL\_NEXT\_PKT\_DROP** }\
 enum **rte\_node\_ip4\_reassembly\_next** { **RTE\_NODE\_IP4\_REASSEMBLY\_NEXT\_PKT\_DROP** }\

### Functions

int **rte\_node\_ip4\_route\_add** (uint32\_t ip, uint8\_t depth, uint16\_t next\_hop, enum **rte\_node\_ip4\_lookup\_next** next\_node)\
 int **rte\_node\_ip4\_rewrite\_add** (uint16\_t next\_hop, uint8\_t \*rewrite\_data, uint8\_t rewrite\_len, uint16\_t dst\_port)\
 \_\_rte\_experimental int **rte\_node\_ip4\_reassembly\_configure** (struct **rte\_node\_ip4\_reassembly\_cfg** \*cfg, uint16\_t cnt)\

## Detailed Description

**Warning**

**EXPERIMENTAL:** All functions in this file may be changed or removed without prior notice.

This API allows to do control path functions of ip4\_\* nodes like ip4\_lookup, ip4\_rewrite.

Definition in file **rte\_node\_ip4\_api.h**.

## Enumeration Type Documentation

### enum rte\_node\_ip4\_lookup\_next

IP4 lookup next nodes.

**Enumerator**

- *RTE\_NODE\_IP4\_LOOKUP\_NEXT\_REWRITE*

  *Rewrite node.*

- *RTE\_NODE\_IP4\_LOOKUP\_NEXT\_PKT\_DROP*

  *IP Local node. Number of next nodes of lookup node.*

*Definition at line* **30** *of file* **rte\_node\_ip4\_api.h***.*

### enum rte\_node\_ip4\_local\_next

*IP4 Local next nodes.*

**Enumerator**

- *RTE\_NODE\_IP4\_LOCAL\_NEXT\_UDP4\_INPUT*

  *ip4 Local node.*

- *RTE\_NODE\_IP4\_LOCAL\_NEXT\_PKT\_DROP*

  *Packet drop node.*

*Definition at line* **42** *of file* **rte\_node\_ip4\_api.h***.*

### enum rte\_node\_ip4\_reassembly\_next

*IP4 reassembly next nodes.*

**Enumerator**

- *RTE\_NODE\_IP4\_REASSEMBLY\_NEXT\_PKT\_DROP*

  *Packet drop node.*

*Definition at line* **52** *of file* **rte\_node\_ip4\_api.h***.*

## Function Documentation

### int rte\_node\_ip4\_route\_add (uint32\_t ip, uint8\_t depth, uint16\_t next\_hop, enum rte\_node\_ip4\_lookup\_next next\_node)

*Add ipv4 route to lookup table.*

**Parameters**

*ip IP address of route to be added.* \
 *depth Depth of the rule to be added.* \
 *next\_hop Next hop id of the rule result to be added.* \
 *next\_node Next node to redirect traffic to.*

**Returns**

*0 on success, negative otherwise.*

### int rte\_node\_ip4\_rewrite\_add (uint16\_t next\_hop, uint8\_t \* rewrite\_data, uint8\_t rewrite\_len, uint16\_t dst\_port)

*Add a next hop's rewrite data.*

**Parameters**

*next\_hop Next hop id to add rewrite data to.* \
 *rewrite\_data Rewrite data.* \
 *rewrite\_len Length of rewrite data.* \
 *dst\_port Destination port to redirect traffic to.*

**Returns**

*0 on success, negative otherwise.*

### \_\_rte\_experimental int rte\_node\_ip4\_reassembly\_configure (struct rte\_node\_ip4\_reassembly\_cfg \* cfg, uint16\_t cnt)

*Add reassembly node configuration data.*

**Parameters**

*cfg Pointer to the configuration structure.* \
 *cnt Number of configuration structures passed.*

**Returns**

*0 on success, negative otherwise.*

## Author

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