inc/stack/inc/bind6if.h File Reference

Common structures and definitions used by the BIND6 Object. More...


Data Structures

struct  BIND6_ENTRY
 The structure describes the BIND6 Object. More...

Functions

_extern HANDLE Bind6New (NETIF_DEVICE *ptr_device, IP6N Host, IP6N Mask, UINT32 ValidLT, UINT32 PrefLT, UINT8 IsAny)
_extern void Bind6Free (HANDLE hbind6Obj)
_extern int Bind6DADCheck (NETIF_DEVICE *ptr_device, IP6N TargetAddress)
_extern HANDLE Bind6FindByHost (NETIF_DEVICE *ptr_device, IP6N IP)
_extern HANDLE Bind6FindByNet (NETIF_DEVICE *ptr_device, IP6N IPNet)
_extern HANDLE Bind6FindByIF (NETIF_DEVICE *ptr_device)
_extern IP6N Bind6IF2IPHost (NETIF_DEVICE *ptr_device)
_extern UINT32 Bind6GetLifetime (HANDLE hbind6Obj)
_extern void Bind6SetLifetime (HANDLE hbind6Obj, UINT32 Lifetime)
_extern int Bind6GetLinkLocalAddress (NETIF_DEVICE *ptr_device, IP6N *IPAddress)
_extern int Bind6GetGlobalAddress (NETIF_DEVICE *ptr_device, IP6N IPNetworkAddr, IP6N *IPAddress)
_extern NETIF_DEVICE * Bind6GetInterfaceHandle (HANDLE hbind6Obj)
_extern BIND6_ENTRYBind6GetTable (void)
_extern void Bind6CleanTable (BIND6_ENTRY *ptr_list)


Detailed Description

Common structures and definitions used by the BIND6 Object.

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

Function Documentation

_extern void Bind6CleanTable ( BIND6_ENTRY ptr_list  ) 

Description
The function is called to clean the memory allocated by a previous call to Route6GetTable. The function cleans the replicated copy of the routing table. This function is available to system developers and can be called from outside kernel mode.

See also:
Bind6GetTable
Parameters:
[in] ptr_list This is the head of the duplicate list which will be cleaned up.
Return values:
Not Applicable

_extern int Bind6DADCheck ( NETIF_DEVICE *  ptr_device,
IP6N  TargetAddress 
)

Description
The function is called by the ICMP6 Module to check if the received address passes or fails the DAD Check.

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device The pointer to the network interface device on which the DAD needs to be stopped.
[in] TargetAddress The IP Address matching the Target Address in the NS/NA request.
Return values:
Success (No DAD Detected) - 0
Error (DAD Detected) - <0

_extern HANDLE Bind6FindByHost ( NETIF_DEVICE *  ptr_device,
IP6N  IP 
)

Description
Find a binding by searching IF handle with IP Host addr This is an external NDK Stack API and is available to other modules. In this we search only addresses which have passed the DAD Procedure since these are VALID.

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device Pointer to the NIMU Network Interface object which has to be searched for the IPv6 address.
[in] IP IPv6 Address to be searched for.
Return values:
Match - Handle to the BIND6_ENTRY Object
No Match - 0

_extern HANDLE Bind6FindByIF ( NETIF_DEVICE *  ptr_device  ) 

Description
The function searches the BIND6_ENTRY objects in the system for a specific interface.

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device The Network interface object whose BIND6_ENTRY Object we are interested in.
Return values:
Handle to the BIND6_ENTRY object

_extern HANDLE Bind6FindByNet ( NETIF_DEVICE *  ptr_device,
IP6N  IPNet 
)

Description
Find a binding by searching IF handle with IP Net addr This is an external NDK Stack API and is available to other modules. In this we search only addresses which have passed the DAD Procedure since these are VALID.

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device Pointer to the NIMU Network Interface object which has to be searched for the IPv6 address.
[in] IPNet IPv6 Network Address we are searching for.
Return values:
Match - Handle to the BIND6_ENTRY Object
No Match - 0

_extern void Bind6Free ( HANDLE  hbind6Obj  ) 

Description
The function is used to close an IPv6 binding.

This is for *internal* NDK Stack Usage.

Parameters:
[in] hbind6Obj The BIND6_ENTRY Object which is to be freed up.
Return values:
Not Applicable.

_extern int Bind6GetGlobalAddress ( NETIF_DEVICE *  ptr_device,
IP6N  IPNetworkAddr,
IP6N *  IPAddress 
)

Description
The function searches the BIND6 object and returns a GLOBAL Address for the device. An Error Condition conveys the fact either IPv6 has not been initialized on this interface or there is no GLOBAL Address configured on the interface

Parameters:
[in] ptr_device The Network interface object whose LINK LOCAL Address is required.
[in] IPNetworkAddr The Network Mask of the IP Address that needs to be retuned.
[out] IPAddress The GLOBAL IP Address is returned
Return values:
Success - 0
Error - -1

_extern NETIF_DEVICE* Bind6GetInterfaceHandle ( HANDLE  hbind6Obj  ) 

Description
The function returns the interface handle given the BIND6_ENTRY object.

This is for *internal* NDK Stack Usage.

Parameters:
[in] hbind6Obj The BIND6_ENTRY Object whose interface handle we need.
Return values:
Success - Handle of the interface
Error - 0

_extern UINT32 Bind6GetLifetime ( HANDLE  hbind6Obj  ) 

Description
The function returns the Lifetime matching the BIND6_ENTRY object.

This is for *internal* NDK Stack Usage.

Parameters:
[in] hbind6Obj Handle to the BIND6_ENTRY object whose lifetime we need to get
Return values:
Lifetime value associated with the BIND6_ENTRY object.

_extern int Bind6GetLinkLocalAddress ( NETIF_DEVICE *  ptr_device,
IP6N *  IPAddress 
)

Description
The function searches the BIND6 object and returns a LINK LOCAL Address for the device. An Error Condition conveys the fact that there IPv6 has not been initialized on this interface.

Parameters:
[in] ptr_device The Network interface object whose LINK LOCAL Address is required.
[out] IPAddress The Link Local IP Address is returned
Return values:
Success - 0
Error - -1

_extern BIND6_ENTRY* Bind6GetTable ( void   ) 

Description
The function replicates the BIND6 Table and creates a duplicate copy which is then returned back to the callee. The replicated BIND table list needs to be cleaned by the callee. This function is available to system developers and can be called from outside kernel mode.

See also:
Bind6CleanTable
Return values:
Head of the copy of the BIND6

_extern IP6N Bind6IF2IPHost ( NETIF_DEVICE *  ptr_device  ) 

Description
The function returns the IPv6 address matching the BIND6_ENTRY object.

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device The Network interface object whose IPv6 Address we are interested in.
Return values:
Success - The IPv6 Address matching the interface
Error - IPV6_UNSPECIFIED_ADDRESS (::)

_extern HANDLE Bind6New ( NETIF_DEVICE *  ptr_device,
IP6N  IPHost,
IP6N  IPMask,
UINT32  ValidLifetime,
UINT32  PreferredLifetime,
UINT8  IsAnycast 
)

Description
This function is used to create a new BIND6_ENTRY Object with the specified properties.

This is for *internal* NDK Stack Usage.

Parameters:
[in] ptr_device Pointer to the NIMU Network Interface object on which the BIND6_ENTRY object is to be created.
[in] IPHost IPv6 Address
[in] IPMask IPv6 Mask
[in] ValidLifetime Valid Lifetime for which the address remains VALID
[in] PreferredLifetime Preferred Lifetime for which the address remains VALID
[in] IsAnycast Flag set to 1 if the address is an ANYCAST Address; else set to 0.
Return values:
Success - Handle to the new BIND6_ENTRY Object
Error - 0

_extern void Bind6SetLifetime ( HANDLE  hbind6Obj,
UINT32  Lifetime 
)

Description
The function sets the Lifetime matching the BIND6_ENTRY object.

This is for *internal* NDK Stack Usage.

Parameters:
[in] hbind6Obj Handle to the BIND6_ENTRY object whose lifetime we need to get
[in] Lifetime New Lifetime value to be associated.
Return values:
Not Applicable.


Copyright 2009, Texas Instruments Incorporated