main index

section index




/*-------------------------------------------------------------*/
/* ICMP4 types. Comments starting with "NI" are not implemented */
typedef enum {
  NETWIB_ICMP4TYPE_ECHOREP = 0,       /* echo reply */
  NETWIB_ICMP4TYPE_DESTUNREACH = 3,   /* destination unreachable */
  NETWIB_ICMP4TYPE_SRCQUENCH = 4,     /* source quench */
  NETWIB_ICMP4TYPE_REDIRECT = 5,      /* redirect */
  NETWIB_ICMP4TYPE_ALTHOSTAD = 6,     /* NI www.iana.org */
  NETWIB_ICMP4TYPE_ECHOREQ = 8,       /* echo request */
  NETWIB_ICMP4TYPE_ROUTERADVERT = 9,  /* NI rfc 1256 */
  NETWIB_ICMP4TYPE_ROUTERSELECT = 10, /* NI rfc 1256 */
  NETWIB_ICMP4TYPE_TIMEEXCEED = 11,   /* time exceeded */
  NETWIB_ICMP4TYPE_PARAPROB = 12,     /* parameter problem */
  NETWIB_ICMP4TYPE_TIMESTAMPREQ = 13, /* timestamp request */
  NETWIB_ICMP4TYPE_TIMESTAMPREP = 14, /* timestamp reply */
  NETWIB_ICMP4TYPE_INFOREQ = 15,      /* information request */
  NETWIB_ICMP4TYPE_INFOREP = 16,      /* information reply */
  NETWIB_ICMP4TYPE_ADMASKREQ = 17,    /* NI rfc 950 */
  NETWIB_ICMP4TYPE_ADMASKREP = 18,    /* NI rfc 950 */
  NETWIB_ICMP4TYPE_TRACEROUTE = 30,   /* NI rfc 1393 */
  NETWIB_ICMP4TYPE_DATACONVERR = 31,  /* NI rfc 1474 */
  NETWIB_ICMP4TYPE_MOBHOSTREDIR = 32, /* NI www.iana.org */
  NETWIB_ICMP4TYPE_IPV6WHEREYOU = 33, /* NI www.iana.org */
  NETWIB_ICMP4TYPE_IPV6IAMHERE = 34,  /* NI www.iana.org */
  NETWIB_ICMP4TYPE_MOBREGREQ = 35,    /* NI www.iana.org */
  NETWIB_ICMP4TYPE_MOBREGREP = 36,    /* NI www.iana.org */
  NETWIB_ICMP4TYPE_SKIP = 39,         /* NI www.iana.org */
  NETWIB_ICMP4TYPE_PHOTURIS = 40      /* NI www.iana.org */
} netwib_icmp4type;

/*-------------------------------------------------------------*/
/***************************************************************
 * We define an ICMP4 code like this. Really, it should be one *
 * of :                                                        *
 *  - netwib_icmp4code_destunreach                             *
 *  - netwib_icmp4code_timeexceed                              *
 *  - netwib_icmp4code_paraprob                                *
 *  - netwib_icmp4code_redirect                                *
 ***************************************************************/
typedef netwib_uint32 netwib_icmp4code;

/*-------------------------------------------------------------*/
/* Name : netwib_buf_append_icmp4type
   Description :
     Print the text corresponding to icmp type.
   Input parameter(s) :
     type : icmp4 type
   Input/output parameter(s) :
     *pbuf : netwib_buf receiving data
   Output parameter(s) :
   Normal return values :
     NETWIB_ERR_OK : ok
*/
netwib_err netwib_buf_append_icmp4type(netwib_icmp4type type,
                                       netwib_buf *pbuf);

/*-------------------------------------------------------------*/
/* Name : netwib_buf_append_icmp4code
   Description :
     Print the text corresponding to icmp code.
   Input parameter(s) :
     type : icmp4 type
     code : icmp4 code
   Input/output parameter(s) :
     *pbuf : netwib_buf receiving data
   Output parameter(s) :
   Normal return values :
     NETWIB_ERR_OK : ok
*/
netwib_err netwib_buf_append_icmp4code(netwib_icmp4type type,
                                       netwib_icmp4code code,
                                       netwib_buf *pbuf);




main index

section index