STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Data Structures | Macros | Functions | Variables
ip.h File Reference
#include "lwip/opt.h"
#include "lwip/def.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"
#include "lwip/err.h"
#include "lwip/netif.h"
#include "lwip/ip4.h"
#include "lwip/ip6.h"

Go to the source code of this file.

Data Structures

struct  ip_pcb
 
struct  ip_globals
 

Macros

#define IP_PROTO_ICMP   1
 
#define IP_PROTO_IGMP   2
 
#define IP_PROTO_UDP   17
 
#define IP_PROTO_UDPLITE   136
 
#define IP_PROTO_TCP   6
 
#define IP_HDR_GET_VERSION(ptr)    ((*(u8_t*)(ptr)) >> 4)
 
#define IP_HDRINCL   NULL
 
#define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX(p)   LWIP_ASSERT("p->ref == 1", (p)->ref == 1)
 
#define IP_PCB_ADDRHINT
 
#define IP_PCB_ISIPV6_MEMBER
 
#define IP_PCB_IPVER_EQ(pcb1, pcb2)    1
 
#define IP_PCB_IPVER_INPUT_MATCH(pcb)   1
 
#define PCB_ISIPV6(pcb)    LWIP_IPV6
 
#define IP_PCB
 
#define SOF_REUSEADDR   0x04U /* allow local address reuse */
 
#define SOF_KEEPALIVE   0x08U /* keep connections alive */
 
#define SOF_BROADCAST   0x20U /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */
 
#define SOF_INHERITED   (SOF_REUSEADDR|SOF_KEEPALIVE)
 
#define ip_current_netif()    (ip_data.current_netif)
 
#define ip_current_input_netif()   (ip_data.current_input_netif)
 
#define ip_current_header_tot_len()   (ip_data.current_ip_header_tot_len)
 
#define ip_current_src_addr()    (&ip_data.current_iphdr_src)
 
#define ip_current_dest_addr()   (&ip_data.current_iphdr_dest)
 
#define ip_current_src_addr()    (&ip_data.current_iphdr_src)
 
#define ip_current_dest_addr()    (&ip_data.current_iphdr_dest)
 
#define ip_get_option(pcb, opt)    ((pcb)->so_options & (opt))
 
#define ip_set_option(pcb, opt)    ((pcb)->so_options |= (opt))
 
#define ip_reset_option(pcb, opt)   ((pcb)->so_options &= ~(opt))
 
#define ip_route_get_local_ip(isipv6, src, dest, netif, ipaddr)
 

Functions

err_t ip_input (struct pbuf *p, struct netif *inp)
 

Variables

struct ip_globals ip_data
 

Macro Definition Documentation

#define ip_current_dest_addr ( )    (&ip_data.current_iphdr_dest)

Destination IP address of current_header

Union destination address of current_header

Definition at line 238 of file ip.h.

#define ip_current_dest_addr ( )    (&ip_data.current_iphdr_dest)

Destination IP address of current_header

Union destination address of current_header

Definition at line 238 of file ip.h.

#define ip_current_header_tot_len ( )    (ip_data.current_ip_header_tot_len)

Total header length of ip(6)_current_header() (i.e. after this, the UDP/TCP header starts)

Definition at line 160 of file ip.h.

#define ip_current_input_netif ( )    (ip_data.current_input_netif)

Get the interface that received the current packet. This function must only be called from a receive callback (udp_recv, raw_recv, tcp_accept). It will return NULL otherwise.

Definition at line 158 of file ip.h.

#define ip_current_netif ( )    (ip_data.current_netif)

Get the interface that accepted the current packet. This may or may not be the receiving netif, depending on your netif/network setup. This function must only be called from a receive callback (udp_recv, raw_recv, tcp_accept). It will return NULL otherwise.

Definition at line 154 of file ip.h.

#define ip_current_src_addr ( )    (&ip_data.current_iphdr_src)

Source IP address of current_header

Union source address of current_header

Definition at line 236 of file ip.h.

#define ip_current_src_addr ( )    (&ip_data.current_iphdr_src)

Source IP address of current_header

Union source address of current_header

Definition at line 236 of file ip.h.

#define ip_get_option (   pcb,
  opt 
)    ((pcb)->so_options & (opt))

Gets an IP pcb option (SOF_* flags)

Definition at line 241 of file ip.h.

#define IP_HDR_GET_VERSION (   ptr)    ((*(u8_t*)(ptr)) >> 4)

This operates on a void* by loading the first byte

Definition at line 56 of file ip.h.

#define IP_HDRINCL   NULL

Definition at line 64 of file ip.h.

#define IP_PCB
Value:
/* ip addresses in network byte order */ \
ip_addr_t local_ip; \
ip_addr_t remote_ip; \
/* Socket options */ \
u8_t so_options; \
/* Type Of Service */ \
u8_t tos; \
/* Time To Live */ \
u8_t ttl \
/* link layer address resolution hint */ \
IP_PCB_ADDRHINT
#define IP_PCB_ISIPV6_MEMBER
Definition: ip.h:86

Definition at line 96 of file ip.h.

#define IP_PCB_ADDRHINT

Definition at line 75 of file ip.h.

#define IP_PCB_IPVER_EQ (   pcb1,
  pcb2 
)    1

Definition at line 87 of file ip.h.

#define IP_PCB_IPVER_INPUT_MATCH (   pcb)    1

Definition at line 88 of file ip.h.

#define IP_PCB_ISIPV6_MEMBER

Definition at line 86 of file ip.h.

#define IP_PROTO_ICMP   1

Definition at line 49 of file ip.h.

#define IP_PROTO_IGMP   2

Definition at line 50 of file ip.h.

#define IP_PROTO_TCP   6

Definition at line 53 of file ip.h.

#define IP_PROTO_UDP   17

Definition at line 51 of file ip.h.

#define IP_PROTO_UDPLITE   136

Definition at line 52 of file ip.h.

#define ip_reset_option (   pcb,
  opt 
)    ((pcb)->so_options &= ~(opt))

Resets an IP pcb option (SOF_* flags)

Definition at line 245 of file ip.h.

#define ip_route_get_local_ip (   isipv6,
  src,
  dest,
  netif,
  ipaddr 
)
Value:
do { \
(netif) = ip_route(isipv6, src, dest); \
(ipaddr) = ip_netif_get_local_ip(isipv6, netif, dest); \
}while(0)
Definition: netif.h:182

Definition at line 302 of file ip.h.

#define ip_set_option (   pcb,
  opt 
)    ((pcb)->so_options |= (opt))

Sets an IP pcb option (SOF_* flags)

Definition at line 243 of file ip.h.

#define LWIP_IP_CHECK_PBUF_REF_COUNT_FOR_TX (   p)    LWIP_ASSERT("p->ref == 1", (p)->ref == 1)

pbufs passed to IP must have a ref-count of 1 as their payload pointer gets altered as the packet is passed down the stack

Definition at line 69 of file ip.h.

#define PCB_ISIPV6 (   pcb)    LWIP_IPV6

Definition at line 89 of file ip.h.

#define SOF_BROADCAST   0x20U /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */

Definition at line 120 of file ip.h.

#define SOF_INHERITED   (SOF_REUSEADDR|SOF_KEEPALIVE)

Definition at line 123 of file ip.h.

#define SOF_KEEPALIVE   0x08U /* keep connections alive */

Definition at line 119 of file ip.h.

#define SOF_REUSEADDR   0x04U /* allow local address reuse */

Definition at line 118 of file ip.h.

Function Documentation

err_t ip_input ( struct pbuf p,
struct netif inp 
)

Variable Documentation

struct ip_globals ip_data