lwIP
2.0.2
Lightweight IP stack
|
Macros | |
#define | LWIP_HOOK_FILENAME "path/to/my/lwip_hooks.h" |
#define | LWIP_HOOK_TCP_ISN(local_ip, local_port, remote_ip, remote_port) |
#define | LWIP_HOOK_IP4_INPUT(pbuf, input_netif) |
#define | LWIP_HOOK_IP4_ROUTE() |
#define | LWIP_HOOK_IP4_ROUTE_SRC(dest, src) |
#define | LWIP_HOOK_ETHARP_GET_GW(netif, dest) |
#define | LWIP_HOOK_IP6_INPUT(pbuf, input_netif) |
#define | LWIP_HOOK_IP6_ROUTE(src, dest) |
#define | LWIP_HOOK_ND6_GET_GW(netif, dest) |
#define | LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr) |
#define | LWIP_HOOK_VLAN_SET(netif, p, src, dst, eth_type) |
#define | LWIP_HOOK_MEMP_AVAILABLE(memp_t_type) |
#define | LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif) |
Hooks are undefined by default, define them to a function if you need them.
#define LWIP_HOOK_ETHARP_GET_GW | ( | netif, | |
dest | |||
) |
LWIP_HOOK_ETHARP_GET_GW(netif, dest):
#define LWIP_HOOK_FILENAME "path/to/my/lwip_hooks.h" |
LWIP_HOOK_FILENAME: Custom filename to #include in files that provide hooks. Declare your hook function prototypes in there, you may also #include all headers providing data types that are need in this file.
#define LWIP_HOOK_IP4_INPUT | ( | pbuf, | |
input_netif | |||
) |
LWIP_HOOK_IP4_INPUT(pbuf, input_netif):
#define LWIP_HOOK_IP4_ROUTE | ( | ) |
#define LWIP_HOOK_IP4_ROUTE_SRC | ( | dest, | |
src | |||
) |
LWIP_HOOK_IP4_ROUTE_SRC(dest, src):
#define LWIP_HOOK_IP6_INPUT | ( | pbuf, | |
input_netif | |||
) |
LWIP_HOOK_IP6_INPUT(pbuf, input_netif):
#define LWIP_HOOK_IP6_ROUTE | ( | src, | |
dest | |||
) |
LWIP_HOOK_IP6_ROUTE(src, dest):
#define LWIP_HOOK_MEMP_AVAILABLE | ( | memp_t_type | ) |
LWIP_HOOK_MEMP_AVAILABLE(memp_t_type):
#define LWIP_HOOK_ND6_GET_GW | ( | netif, | |
dest | |||
) |
LWIP_HOOK_ND6_GET_GW(netif, dest):
#define LWIP_HOOK_TCP_ISN | ( | local_ip, | |
local_port, | |||
remote_ip, | |||
remote_port | |||
) |
LWIP_HOOK_TCP_ISN: Hook for generation of the Initial Sequence Number (ISN) for a new TCP connection. The default lwIP ISN generation algorithm is very basic and may allow for TCP spoofing attacks. This hook provides the means to implement the standardized ISN generation algorithm from RFC 6528 (see contrib/adons/tcp_isn), or any other desired algorithm as a replacement. Called from tcp_connect() and tcp_listen_input() when an ISN is needed for a new TCP connection, if TCP support (LWIP_TCP) is enabled.
Signature: u32_t my_hook_tcp_isn(const ip_addr_t* local_ip, u16_t local_port, const ip_addr_t* remote_ip, u16_t remote_port);
LWIP_HOOK_UNKNOWN_ETH_PROTOCOL(pbuf, netif): Called from ethernet_input() when an unknown eth type is encountered. Return ERR_OK if packet is accepted, any error code otherwise. Payload points to ethernet header!
LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr):
LWIP_HOOK_VLAN_SET: Hook can be used to set prio_vid field of vlan_hdr. If you need to store data on per-netif basis to implement this callback, see Client data handling. Called from ethernet_output() if VLAN support (ETHARP_SUPPORT_VLAN) is enabled.
Signature: s32_t my_hook_vlan_set(struct netif* netif, struct pbuf* pbuf, const struct eth_addr* src, const struct eth_addr* dst, u16_t eth_type);
Arguments:
Return values: