RetroArch
Classes | Macros | Enumerations | Functions | Variables
icmp.h File Reference
#include "lwip/arch.h"
#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"
#include "lwip/netif.h"
Include dependency graph for icmp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  icmp_echo_hdr
 
struct  icmp_dur_hdr
 
struct  icmp_te_hdr
 

Macros

#define ICMP_ER   0 /* echo reply */
 
#define ICMP_DUR   3 /* destination unreachable */
 
#define ICMP_SQ   4 /* source quench */
 
#define ICMP_RD   5 /* redirect */
 
#define ICMP_ECHO   8 /* echo */
 
#define ICMP_TE   11 /* time exceeded */
 
#define ICMP_PP   12 /* parameter problem */
 
#define ICMP_TS   13 /* timestamp */
 
#define ICMP_TSR   14 /* timestamp reply */
 
#define ICMP_IRQ   15 /* information request */
 
#define ICMP_IR   16 /* information reply */
 
#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

PACK_STRUCT_BEGIN struct icmp_echo_hdr PACK_STRUCT_STRUCT
 

Macro Definition Documentation

◆ ICMP_DUR

#define ICMP_DUR   3 /* destination unreachable */

◆ ICMP_ECHO

#define ICMP_ECHO   8 /* echo */

◆ ICMP_ER

#define ICMP_ER   0 /* echo reply */

◆ ICMP_IR

#define ICMP_IR   16 /* information reply */

◆ ICMP_IRQ

#define ICMP_IRQ   15 /* information request */

◆ ICMP_PP

#define ICMP_PP   12 /* parameter problem */

◆ ICMP_RD

#define ICMP_RD   5 /* redirect */

◆ ICMP_SQ

#define ICMP_SQ   4 /* source quench */

◆ ICMP_TE

#define ICMP_TE   11 /* time exceeded */

◆ ICMP_TS

#define ICMP_TS   13 /* timestamp */

◆ ICMP_TSR

#define ICMP_TSR   14 /* timestamp reply */

◆ ICMPH_CODE

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

◆ ICMPH_CODE_SET

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

◆ ICMPH_TYPE

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

◆ ICMPH_TYPE_SET

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

Enumeration Type Documentation

◆ icmp_dur_type

Enumerator
ICMP_DUR_NET 
ICMP_DUR_HOST 
ICMP_DUR_PROTO 
ICMP_DUR_PORT 
ICMP_DUR_FRAG 
ICMP_DUR_SR 

◆ icmp_te_type

Enumerator
ICMP_TE_TTL 
ICMP_TE_FRAG 

Function Documentation

◆ icmp_dest_unreach()

void icmp_dest_unreach ( struct pbuf p,
enum icmp_dur_type  t 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ icmp_input()

void icmp_input ( struct pbuf p,
struct netif inp 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ icmp_time_exceeded()

void icmp_time_exceeded ( struct pbuf p,
enum icmp_te_type  t 
)

Variable Documentation

◆ PACK_STRUCT_STRUCT

PACK_STRUCT_END PACK_STRUCT_BEGIN struct icmp_te_hdr PACK_STRUCT_STRUCT