![]() |
Contiki-NG
|
NAT64 platform interface — socket-based. More...
Go to the source code of this file.
Data Structures | |
| struct | nat64_session |
| A NAT64 session binding an IoT node's IPv6 flow to an IPv4 socket. More... | |
Enumerations | |
| enum | nat64_session_proto |
| Transport protocol tracked by a NAT64 session. More... | |
| enum | nat64_tcp_state { NAT64_TCP_CONNECTING , NAT64_TCP_ESTABLISHED , NAT64_TCP_CLOSING } |
| TCP connection state within the NAT64 splice proxy. More... | |
Functions | |
| bool | nat64_platform_init (void) |
| Initialize the platform layer. | |
| bool | nat64_is_enabled (void) |
| Check whether the NAT64 gateway has been enabled at runtime. | |
| int | nat64_platform_udp_send (const uip_ip4addr_t *dst, uint16_t dstport, const uip_ip6addr_t *ip6_src, uint16_t srcport, const uint8_t *payload, uint16_t len) |
| Forward a UDP payload to an IPv4 server. | |
| struct nat64_session * | nat64_platform_tcp_connect (const uip_ip4addr_t *dst, uint16_t dstport, const uip_ip6addr_t *ip6_src, uint16_t srcport, uint32_t peer_isn) |
| Initiate a TCP connection to an IPv4 server. | |
| int | nat64_platform_tcp_send (struct nat64_session *s, const uint8_t *data, uint16_t len) |
| Send data on an established TCP session. | |
| void | nat64_platform_tcp_close (struct nat64_session *s) |
| Half-close a TCP session (send FIN). | |
| void | nat64_platform_tcp_destroy (struct nat64_session *s) |
| Fully tear down a TCP session. | |
| void | nat64_platform_tcp_abort (struct nat64_session *s) |
| Abort a TCP session by sending RST upstream. | |
| int | nat64_platform_icmp_send (const uip_ip4addr_t *dst, const uip_ip6addr_t *ip6_src, uint16_t identifier, const uint8_t *icmp_pkt, uint16_t icmp_len) |
| Forward an ICMPv4 Echo Request to an IPv4 destination. | |
NAT64 platform interface — socket-based.
Defines the session structure shared between the protocol-agnostic core and the platform layer, plus the small set of "send to IPv4" entry points the core invokes to forward packets out. The session struct is exposed (rather than opaque) so that nat64.c and nat64-tcp.c can read the address/port fields directly without accessor overhead, while the platform layer remains the sole owner of the file descriptor and connection state.
Definition in file nat64-platform.h.