Data Structures | Defines

sw-host/ip.h File Reference

(r4864/r225)

#include "ether.h"
Include dependency graph for ip.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ip_header
struct  icmp_header

Defines

#define IP_ADDR_LEN   4
#define IP_VERSION_4   4
#define IP_HEADER_LENGTH   5
#define IP_TTL   5
#define IP_PROTO_ICMP   1
#define IP_PROTO_TCP   6
#define IP_PROTO_UDP   17
#define IP_DSCP_LOWEST_PRIORITY   0
#define IP_DSCP_HIGHEST_PRIORITY   184
#define IP_FLAGS   2
#define IP_HEADER_OFFSET   ETHER_PAYLOAD_OFFSET
#define IP_PAYLOAD_OFFSET   IP_HEADER_OFFSET + sizeof(struct ip_header)
#define MAX_IP_PAYLOAD   MAX_ETHER_PAYLOAD - sizeof(struct ip_header)
#define ICMP_TYPE_PING_REQUEST   0x8
#define ICMP_TYPE_PING_REPLY   0x0
#define ICMP_HEADER_OFFSET   IP_PAYLOAD_OFFSET
#define cpy_ip_addr(dest, src)   ( *( (Xuint32*)dest ) = *( (Xuint32*)src ) )
#define ip_addr_equal(addr1, addr2)   ( *((Xuint32*)addr1) == *((Xuint32*)addr2) )

Define Documentation

#define cpy_ip_addr (   dest,
  src 
)    ( *( (Xuint32*)dest ) = *( (Xuint32*)src ) )

Definition at line 74 of file ip.h.

#define ICMP_HEADER_OFFSET   IP_PAYLOAD_OFFSET

Definition at line 72 of file ip.h.

#define ICMP_TYPE_PING_REPLY   0x0

Definition at line 55 of file ip.h.

#define ICMP_TYPE_PING_REQUEST   0x8

Definition at line 54 of file ip.h.

#define ip_addr_equal (   addr1,
  addr2 
)    ( *((Xuint32*)addr1) == *((Xuint32*)addr2) )

Definition at line 75 of file ip.h.

#define IP_ADDR_LEN   4

Definition at line 6 of file ip.h.

#define IP_DSCP_HIGHEST_PRIORITY   184

Definition at line 26 of file ip.h.

#define IP_DSCP_LOWEST_PRIORITY   0

Definition at line 25 of file ip.h.

#define IP_FLAGS   2

Definition at line 28 of file ip.h.

#define IP_HEADER_LENGTH   5

Definition at line 8 of file ip.h.

#define IP_HEADER_OFFSET   ETHER_PAYLOAD_OFFSET

Definition at line 50 of file ip.h.

#define IP_PAYLOAD_OFFSET   IP_HEADER_OFFSET + sizeof(struct ip_header)

Definition at line 51 of file ip.h.

#define IP_PROTO_ICMP   1

Definition at line 14 of file ip.h.

#define IP_PROTO_TCP   6

Definition at line 15 of file ip.h.

#define IP_PROTO_UDP   17

Definition at line 16 of file ip.h.

#define IP_TTL   5

Definition at line 13 of file ip.h.

#define IP_VERSION_4   4

Definition at line 7 of file ip.h.

#define MAX_IP_PAYLOAD   MAX_ETHER_PAYLOAD - sizeof(struct ip_header)

Definition at line 52 of file ip.h.