src/stack/icmpv6/icmpv6_ndisc.c File Reference

The file has functions which handle the Neighbour Discovery process as defined in the ICMPv6 Protocol. More...


Functions

int ICMPv6SendNS (NETIF_DEVICE *ptr_device, IP6N DstAddress, IP6N SrcAddress, IP6N TargetAddress)
int ICMPv6SendNA (NETIF_DEVICE *ptr_device, IP6N DstAddress, IP6N SrcAddress, IP6N TargetAddress, UINT8 Flags)
int ICMPv6RecvNS (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
int ICMPv6RecvNA (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
int ICMPv6RecvRA (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
int ICMPv6RecvRedirect (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
int ICMPv6RecvRS (PBM_Pkt *pPkt, IPV6HDR *ptr_ipv6hdr)
int ICMPv6SendRS (NETIF_DEVICE *ptr_device, IP6N SrcAddress)


Detailed Description

The file has functions which handle the Neighbour Discovery process as defined in the ICMPv6 Protocol.

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

Function Documentation

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

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

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

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

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

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

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

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


Copyright 2009, Texas Instruments Incorporated