icmp.h File Reference

#include "net/arch.h"
#include "net/opt.h"
#include "net/pbuf.h"
#include "net/netif.h"

Go to the source code of this file.

Data Structures

struct  icmp_dur_hdr
struct  icmp_echo_hdr
struct  icmp_te_hdr

Defines

#define ICMP_ER   0
#define ICMP_DUR   3
#define ICMP_SQ   4
#define ICMP_RD   5
#define ICMP_ECHO   8
#define ICMP_TE   11
#define ICMP_PP   12
#define ICMP_TS   13
#define ICMP_TSR   14
#define ICMP_IRQ   15
#define ICMP_IR   16
#define ICMPH_TYPE(hdr)   (NTOHS((hdr)->_type_code) >> 8)
#define ICMPH_CODE(hdr)   (NTOHS((hdr)->_type_code) & 0xff)
#define ICMPH_TYPE_SET(hdr, type)   ((hdr)->_type_code = HTONS(ICMPH_CODE(hdr) | ((type) << 8)))
#define ICMPH_CODE_SET(hdr, code)   ((hdr)->_type_code = HTONS((code) | (ICMPH_TYPE(hdr) << 8)))

Enumerations

enum  icmp_dur_type {
  ICMP_DUR_NET = 0, ICMP_DUR_HOST = 1, ICMP_DUR_PROTO = 2, ICMP_DUR_PORT = 3,
  ICMP_DUR_FRAG = 4, ICMP_DUR_SR = 5
}
enum  icmp_te_type { ICMP_TE_TTL = 0, ICMP_TE_FRAG = 1 }

Functions

void icmp_input (struct pbuf *p, struct netif *inp)
void icmp_dest_unreach (struct pbuf *p, enum icmp_dur_type t)
void icmp_time_exceeded (struct pbuf *p, enum icmp_te_type t)

Variables

icmp_echo_hdr PACK_STRUCT_STRUCT


Define Documentation

#define ICMP_DUR   3
 

#define ICMP_ECHO   8
 

#define ICMP_ER   0
 

#define ICMP_IR   16
 

#define ICMP_IRQ   15
 

#define ICMP_PP   12
 

#define ICMP_RD   5
 

#define ICMP_SQ   4
 

#define ICMP_TE   11
 

#define ICMP_TS   13
 

#define ICMP_TSR   14
 

#define ICMPH_CODE hdr   )     (NTOHS((hdr)->_type_code) & 0xff)
 

#define ICMPH_CODE_SET hdr,
code   )     ((hdr)->_type_code = HTONS((code) | (ICMPH_TYPE(hdr) << 8)))
 

#define ICMPH_TYPE hdr   )     (NTOHS((hdr)->_type_code) >> 8)
 

#define ICMPH_TYPE_SET hdr,
type   )     ((hdr)->_type_code = HTONS(ICMPH_CODE(hdr) | ((type) << 8)))
 


Enumeration Type Documentation

enum icmp_dur_type
 

Enumeration values:
ICMP_DUR_NET 
ICMP_DUR_HOST 
ICMP_DUR_PROTO 
ICMP_DUR_PORT 
ICMP_DUR_FRAG 
ICMP_DUR_SR 

enum icmp_te_type
 

Enumeration values:
ICMP_TE_TTL 
ICMP_TE_FRAG 


Function Documentation

void icmp_dest_unreach struct pbuf p,
enum icmp_dur_type  t
 

void icmp_input struct pbuf p,
struct netif inp
 

void icmp_time_exceeded struct pbuf p,
enum icmp_te_type  t
 


Variable Documentation

struct icmp_te_hdr PACK_STRUCT_STRUCT
 


Generated on Sat May 8 09:28:20 2004 for Ubixos by doxygen 1.3.3