inc/stack/inc/icmp6if.h File Reference

Common structures and definitions for ICMPv6. More...


Data Structures

struct  ICMPV6STATS
 The structure describes the ICMPv6 Statistics Block. More...

Functions

_extern void ICMPv6Init (void)
_extern int ICMPv6RxPacket (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
_extern int ICMPv6RecvNS (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
_extern int ICMPv6RecvNA (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
_extern int ICMPv6RecvRA (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
_extern int ICMPv6RecvRedirect (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
_extern int ICMPv6RecvRS (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
_extern int ICMPv6SendDstUnreachable (UINT8 Code, PBM_Pkt *pOrgPkt)
_extern int ICMPv6SendTimeExceeded (UINT8 Code, PBM_Pkt *pOrgPkt)
_extern int ICMPv6SendParameterProblem (UINT8 Code, PBM_Pkt *pOrgPkt, UINT32 Pointer)
_extern int ICMPv6SendNS (NETIF_DEVICE *ptr_device, IP6N DstAddress, IP6N SrcAddress, IP6N TargetAddress)
_extern int ICMPv6SendNA (NETIF_DEVICE *ptr_device, IP6N DstAddress, IP6N SrcAddress, IP6N TargetAddress, UINT8 Flags)
_extern int ICMPv6SendRS (NETIF_DEVICE *ptr_device, IP6N SrcAddress)


Detailed Description

Common structures and definitions for ICMPv6.

NOTE: (C) Copyright 2008, Texas Instruments, Inc.

Function Documentation

_extern void ICMPv6Init ( void   ) 

Description
The function is used to initialize the ICMPv6 Protocol stack.

This is for *internal* NDK Stack Usage.

Return values:
Not Applicable.

_extern int ICMPv6RecvNA ( PBM_Pkt *  pPkt,
IPV6HDR *  ptr_ipv6hdr 
)

Description
The function handles the ICMPv6 Neighbour Advertisment Message

Parameters:
[in] pPkt Pointer to the entire ICMPv6 Packet.
[in] ptr_ipv6hdr Pointer to the IPv6 Header.
See also:
RFC-2461 Section 7.1.2
Return values:
0 - Success
<0 - Error

_extern int ICMPv6RecvNS ( PBM_Pkt *  pPkt,
IPV6HDR *  ptr_ipv6hdr 
)

Description
The function handles the ICMPv6 Neighbour Solicitation Message

Parameters:
[in] pPkt Pointer to the entire ICMPv6 Packet.
[in] ptr_ipv6hdr Pointer to the IPv6 Header.
See also:
RFC-2461 Section 7.1.1, 7.2.3 & 7.2.4.
Return values:
0 - Success
<0 - Error

_extern int ICMPv6RecvRA ( PBM_Pkt *  pPkt,
IPV6HDR *  ptr_ipv6hdr 
)

Description
The function handles the ICMPv6 Router Advertisment Message

Parameters:
[in] pPkt Pointer to the entire ICMPv6 Packet.
[in] ptr_ipv6hdr Pointer to the IPv6 Header.
See also:
RFC-2461 Section 6.1
Return values:
0 - Success
<0 - Error

_extern int ICMPv6RecvRedirect ( PBM_Pkt *  pPkt,
IPV6HDR *  ptr_ipv6hdr 
)

Description
The function handles the ICMPv6 Redirect Message

Parameters:
[in] pPkt Pointer to the entire ICMPv6 Packet.
[in] ptr_ipv6hdr Pointer to the IPv6 Header.
See also:
RFC-2461 Section 8
Return values:
0 - Success
<0 - Error

_extern int ICMPv6RecvRS ( PBM_Pkt *  pPkt,
IPV6HDR *  ptr_ipv6hdr 
)

Description
The function handles the ICMPv6 Router Solicitation Message

Parameters:
[in] pPkt Pointer to the entire ICMPv6 Packet.
[in] ptr_ipv6hdr Pointer to the IPv6 Header.
See also:
RFC-2461 Section 6.1
Return values:
0 - Success
<0 - Error

_extern int ICMPv6RxPacket ( PBM_Pkt *  pPkt,
IPV6HDR *  ptr_ipv6hdr 
)

Description
The function handles the ICMPv6 Packets.

Parameters:
[in] pPkt Pointer to the entire ICMPv6 Packet.
[in] ptr_ipv6hdr Pointer to the IPv6 Header.
Return values:
Not Applicable.

_extern int ICMPv6SendDstUnreachable ( UINT8  Code,
PBM_Pkt *  pOrgPkt 
)

Description
The function sends a destination unreachable message. The function accepts Code as a parameter and can be used to send different messages.

Parameters:
[in] Code Code to be added to the ICMPv6 Destination Unreachable message Valid Values range from 0 - 4 as specified in RFC 2463.
[in] pOrgPkt The offending packet which causes the packet to be sent out.
Return values:
0 - Success
<0 - Error

_extern int ICMPv6SendNA ( NETIF_DEVICE *  ptr_device,
IP6N  DstAddress,
IP6N  SrcAddress,
IP6N  TargetAddress,
UINT8  Flags 
)

Description
The function is used to send out a Neighbor Advertisment.

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device The Network Interface object on which the packet is to be transmitted.
[in] DstAddress The destination address to which the NA packet is directed too.
[in] SrcAddress The Source address of the interface
[in] TargetAddress The Target address to which the NA message is being transmitted.
[in] Flags The value of the (R)eserved, (S)olicited and (O)verride flags.
Return values:
0 - Success
<0 - Error

_extern int ICMPv6SendNS ( NETIF_DEVICE *  ptr_device,
IP6N  DstAddress,
IP6N  SrcAddress,
IP6N  TargetAddress 
)

Description
The function is used to send out a Neighbor solicitation

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device The Network Interface object on which the packet is to be transmitted.
[in] DstAddress The destination address to which the NS packet is directed too. As per RFC 2461; this can either be the Solicted Node Multicast Address or the the target address.
[in] SrcAddress The Source address of the interface; this can either be UNSPECIFIED i.e. :: if the NS is being sent for DAD or it will be the address of the source interface.
[in] TargetAddress The Target address to which the NS message is being transmitted.
Return values:
0 - Success
<0 - Error

_extern int ICMPv6SendParameterProblem ( UINT8  Code,
PBM_Pkt *  pOrgPkt,
UINT32  Pointer 
)

Description
The function sends the Parameter Problem message. The function accepts Code as a parameter and can be used to send different messages.

Parameters:
[in] Code Code to be added to the ICMPv6 Time Exceeded message Valid Values range from 0 - 2 as specified in RFC 2463.
[in] pOrgPkt The offending packet which causes the packet to be sent out.
[in] Pointer Identifies the Code Offset within the packet where the error occurred.
Return values:
0 - Success
<0 - Error

_extern int ICMPv6SendRS ( NETIF_DEVICE *  ptr_device,
IP6N  SrcAddress 
)

Description
The function is used to send out a Router solicitation. All RS messages are sent to the ALL_ROUTER Destination Address.

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device The Network Interface object on which the packet is to be transmitted.
[in] SrcAddress The Source address of the interface; this could be set to the UNSPECIFIED address. If the Source address is UNSPECIFIED; the function does not append the SOURCE_LL Option to the RS packet.
Return values:
0 - Success
<0 - Error

_extern int ICMPv6SendTimeExceeded ( UINT8  Code,
PBM_Pkt *  pOrgPkt 
)

Description
The function sends a Time Exceeded message. The function accepts Code as a parameter and can be used to send different messages.

Parameters:
[in] Code Code to be added to the ICMPv6 Time Exceeded message Valid Values range from 0 - 1 as specified in RFC 2463.
[in] pOrgPkt The offending packet which causes the packet to be sent out.
Return values:
0 - Success
<0 - Error


Copyright 2009, Texas Instruments Incorporated