INET Framework for OMNeT++/OMNEST
lwip_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"

Classes

struct  inet::tcp::ip_pcb
 
struct  inet::tcp::ip_hdr
 

Namespaces

 inet
 Copyright (c) 2005 Jan Ringo�, www.ringos.cz.
 
 inet::tcp
 

Macros

#define IP_OPTIONS_SEND   LWIP_IGMP
 Currently, the function ip_output_if_opt() is only used with IGMP. More...
 
#define IP_HLEN   ((addr->addr.getType() == L3Address::IPv6) ? 40 : (addr->addr.getType() == L3Address::IPv4) ? 20 : throw cRuntimeError("Unknown address type"))
 
#define IP_PROTO_ICMP   1
 
#define IP_PROTO_UDP   17
 
#define IP_PROTO_UDPLITE   136
 
#define IP_PROTO_TCP   6
 
#define IP_HDRINCL   nullptr
 
#define IP_PCB_ADDRHINT
 
#define IP_PCB
 
#define SOF_DEBUG   (u16_t)0x0001U /* turn on debugging info recording */
 
#define SOF_ACCEPTCONN   (u16_t)0x0002U /* socket has had listen() */
 
#define SOF_REUSEADDR   (u16_t)0x0004U /* allow local address reuse */
 
#define SOF_KEEPALIVE   (u16_t)0x0008U /* keep connections alive */
 
#define SOF_DONTROUTE   (u16_t)0x0010U /* just use interface addresses */
 
#define SOF_BROADCAST   (u16_t)0x0020U /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */
 
#define SOF_USELOOPBACK   (u16_t)0x0040U /* bypass hardware when possible */
 
#define SOF_LINGER   (u16_t)0x0080U /* linger on close if data present */
 
#define SOF_OOBINLINE   (u16_t)0x0100U /* leave received OOB data in line */
 
#define SOF_REUSEPORT   (u16_t)0x0200U /* allow local address & port reuse */
 
#define IP_RF   0x8000 /* reserved fragment flag */
 
#define IP_DF   0x4000 /* dont fragment flag */
 
#define IP_MF   0x2000 /* more fragments flag */
 
#define IP_OFFMASK   0x1fff /* mask for fragmenting bits */
 
#define IPH_HL(hdr)   ((hdr)->_hl)
 
#define IPH_LEN(hdr)   ((hdr)->_len)
 
#define IPH_CHKSUM(hdr)   ((hdr)->_chksum)
 
#define IPH_LEN_SET(hdr, len)   (hdr)->_len = (len)
 
#define IPH_CHKSUM_SET(hdr, chksum)   (hdr)->_chksum = (chksum)
 
#define ip_init()   /* Compatibility define, not init needed. */
 
#define ip_current_netif()   (current_netif)
 Get the interface that received the current packet. More...
 
#define ip_current_header()   (current_header)
 Get the IP header of the current packet. More...
 
#define ip_debug_print(p)
 

Functions

struct netif * inet::tcp::ip_route (struct ip_addr *dest)
 
err_t inet::tcp::ip_input (struct pbuf *p, struct netif *inp)
 
err_t inet::tcp::ip_output (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t ttl, u8_t tos, u8_t proto)
 
err_t inet::tcp::ip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif)
 

Variables

struct netif * inet::tcp::current_netif
 The interface that provided the packet for the current callback invocation. More...
 
const struct ip_hdrinet::tcp::current_header
 Header of the input packet currently being processed. More...
 

Macro Definition Documentation

#define ip_current_header ( )    (current_header)

Get the IP header of the current packet.

This function must only be called from a receive callback (udp_recv, raw_recv, tcp_accept). It will return nullptr otherwise.

#define ip_current_netif ( )    (current_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 nullptr otherwise.

#define ip_debug_print (   p)
#define IP_DF   0x4000 /* dont fragment flag */
#define IP_HDRINCL   nullptr
#define IP_HLEN   ((addr->addr.getType() == L3Address::IPv6) ? 40 : (addr->addr.getType() == L3Address::IPv4) ? 20 : throw cRuntimeError("Unknown address type"))
#define ip_init (   void)    /* Compatibility define, not init needed. */
#define IP_MF   0x2000 /* more fragments flag */
#define IP_OFFMASK   0x1fff /* mask for fragmenting bits */
#define IP_OPTIONS_SEND   LWIP_IGMP

Currently, the function ip_output_if_opt() is only used with IGMP.

#define IP_PCB
Value:
/* ip addresses in network byte order */ \
struct ip_addr local_ip; \
struct ip_addr remote_ip; \
/* Socket options */ \
u16_t so_options; \
/* Type Of Service */ \
/* Time To Live */ \
/* link layer address resolution hint */ \
uint8_t u8_t
Definition: cc.h:31
Definition: ip_addr.h.txt:47
uint8_t tos
Definition: TCP_NSC.cc:83
uint16_t u16_t
Definition: cc.h:35
#define IP_PCB_ADDRHINT
Definition: lwip_ip.h:74
uint8_t ttl
Definition: TCP_NSC.cc:87
#define IP_PCB_ADDRHINT
#define IP_PROTO_ICMP   1
#define IP_PROTO_TCP   6
#define IP_PROTO_UDP   17
#define IP_PROTO_UDPLITE   136
#define IP_RF   0x8000 /* reserved fragment flag */
#define IPH_CHKSUM (   hdr)    ((hdr)->_chksum)
#define IPH_CHKSUM_SET (   hdr,
  chksum 
)    (hdr)->_chksum = (chksum)
#define IPH_HL (   hdr)    ((hdr)->_hl)
#define IPH_LEN (   hdr)    ((hdr)->_len)
#define IPH_LEN_SET (   hdr,
  len 
)    (hdr)->_len = (len)
#define SOF_ACCEPTCONN   (u16_t)0x0002U /* socket has had listen() */
#define SOF_BROADCAST   (u16_t)0x0020U /* permit to send and to receive broadcast messages (see IP_SOF_BROADCAST option) */
#define SOF_DEBUG   (u16_t)0x0001U /* turn on debugging info recording */
#define SOF_DONTROUTE   (u16_t)0x0010U /* just use interface addresses */
#define SOF_KEEPALIVE   (u16_t)0x0008U /* keep connections alive */
#define SOF_LINGER   (u16_t)0x0080U /* linger on close if data present */
#define SOF_OOBINLINE   (u16_t)0x0100U /* leave received OOB data in line */
#define SOF_REUSEADDR   (u16_t)0x0004U /* allow local address reuse */
#define SOF_REUSEPORT   (u16_t)0x0200U /* allow local address & port reuse */
#define SOF_USELOOPBACK   (u16_t)0x0040U /* bypass hardware when possible */