RTE_TABLE_ACTION_NAT_CONFIG(3)

πŸ’– NAME πŸ’–

rte_table_action_nat_config β€” bestie, this is the little struct that tells the NAT action how to do its thing ✨

It lives in the DPDK Library Functions Manual, and no cap, it's exactly what you need when you're setting up network address translation and you want it configured your way πŸ’…


✨ SYNOPSIS ✨

#include <rte_table_action.h>

πŸŽ€ Data Fields πŸŽ€

  • int source_nat
  • uint8_t proto

🌸 DETAILED DESCRIPTION 🌸

This is the RTE_TABLE_ACTION_NAT NAT action configuration β€” and the important bit? It's per table action profile, okay? So every profile gets its own vibe 🫢

It's defined at line 576 of the file rte_table_action.h. Yes, literally right there. Go look πŸ‘€

πŸ’… FIELD DOCUMENTATION πŸ’…

int source_nat

Okay so this one is basically a switch and it matters πŸ”₯

  • When it's non-zero, the IP source address and the L4 protocol source port get translated.
  • When it's zero, it's the IP destination address and the L4 protocol destination port that get translated instead.

So like… source vs destination. Pick your fighter ⭐

Definition at line 581 of file rte_table_action.h.

uint8_t proto

This is your Layer 4 protocol, bestie β€” for example TCP (0x06) or UDP (0x11) 🌈

Why does it even matter? Because every layer 4 protocol computes the checksum field differently and drops it at a different header offset. So yeah, the proto you name here is not decoration β€” the math literally depends on it 😭

Definition at line 587 of file rte_table_action.h.

πŸ¦‹ AUTHOR πŸ¦‹

Generated automatically by Doxygen for DPDK from the source code. Not a human typing this out with vibes β€” a machine did it. Iconic behaviour, honestly πŸ‘‘


And that's the whole page, bestie πŸŽ€ it's DPDK Version 25.11.3, straight from the Library Functions Manual, mwah πŸ’‹ go translate some addresses, you've got this πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from