Microchip® Advanced Software Framework

uip-icmp6.c File Reference

    ICMPv6 echo request and error messages (RFC 4443)
Author
Julien Abeille jabei.nosp@m.lle@.nosp@m.cisco.nosp@m..com
Mathilde Durvy mdurv.nosp@m.y@ci.nosp@m.sco.c.nosp@m.om
#include <string.h>
#include "net/ip/uip.h"
#include "uip-ds6.h"
#include "uip-icmp6.h"
#include "contiki-default-conf.h"

Macros

#define _DEBUG_   0
 
#define PRINT6ADDR(addr)
 
#define PRINTF(...)
 
#define UIP_EXT_BUF   ((struct uip_ext_hdr *)&uip_buf[uip_l2_l3_hdr_len])
 
#define UIP_FIRST_EXT_BUF   ((struct uip_ext_hdr *)&uip_buf[UIP_LLIPH_LEN])
 
#define UIP_ICMP6_ERROR_BUF   ((struct uip_icmp6_error *)&uip_buf[uip_l2_l3_icmp_hdr_len])
 
#define UIP_ICMP_BUF   ((struct uip_icmp_hdr *)&uip_buf[uip_l2_l3_hdr_len])
 
#define UIP_IP_BUF   ((struct uip_ip_hdr *)&uip_buf[UIP_LLH_LEN])
 

Functions

static void echo_reply_input (void)
 
static void echo_request_input (void)
 
static uip_icmp6_input_handler_tinput_handler_lookup (uint8_t type, uint8_t icode)
 
 LIST (echo_reply_callback_list)
 
 LIST (input_handler_list)
 
 UIP_ICMP6_HANDLER (echo_request_handler, ICMP6_ECHO_REQUEST, UIP_ICMP6_HANDLER_CODE_ANY, echo_request_input)
 
 UIP_ICMP6_HANDLER (echo_reply_handler, ICMP6_ECHO_REPLY, UIP_ICMP6_HANDLER_CODE_ANY, echo_reply_input)
 
ICMPv6 RFC4443 Message processing and sending
uint8_t uip_icmp6_input (uint8_t type, uint8_t icode)
 Handle an incoming ICMPv6 message. More...
 
void uip_icmp6_register_input_handler (uip_icmp6_input_handler_t *handler)
 Register a handler which can handle a specific ICMPv6 message type. More...
 
void uip_icmp6_error_output (uint8_t type, uint8_t code, uint32_t param)
 Send an icmpv6 error message. More...
 
void uip_icmp6_send (const uip_ipaddr_t *dest, int type, int code, int payload_len)
 Send an icmpv6 message. More...
 
void uip_icmp6_echo_reply_callback_add (struct uip_icmp6_echo_reply_notification *n, uip_icmp6_echo_reply_callback_t c)
 Add a callback function for ping replies. More...
 
void uip_icmp6_echo_reply_callback_rm (struct uip_icmp6_echo_reply_notification *n)
 Remove a callback function for ping replies. More...
 
void uip_icmp6_init (void)
 Initialise the uIP ICMPv6 core. More...
 

Variables

static uip_ipaddr_t tmp_ipaddr
 temporary IP address More...