inc/stack/inc/route6if.h File Reference

Common structures and definitions used for the ROUTE6 Module. More...


Data Structures

struct  RT6_ENTRY
 The structure describes the ROUTE6 Entry. More...

Functions

_extern HANDLE Rt6Create (UINT32 flags, IP6N Addr, IP6N Mask, IP6N NextHop, UINT8 *mac_address, NETIF_DEVICE *ptr_device, UINT32 ValidLifetime)
_extern HANDLE Rt6Modify (HANDLE hRoute6, UINT32 flags, IP6N IPAddr, IP6N IPMask, IP6N NextHop, UINT8 *mac_address, NETIF_DEVICE *ptr_device, UINT32 ValidLifetime)
_extern void Rt6Update (HANDLE hRoute, UINT32 RxPacketType, UINT8 *mac_address, UINT32 Flags, UINT32 Lifetime)
_extern HANDLE Rt6Find (UINT32 Flags, IP6N IPAddress, NETIF_DEVICE *ptr_device)
_extern HANDLE Rt6FindDefaultRouter (IP6N RouterAddress, NETIF_DEVICE *ptr_device)
_extern void Rt6Free (HANDLE hRoute6)
_extern void Rt6FlushInterfaceRoutes (NETIF_DEVICE *ptr_device)
_extern HANDLE Rt6GetIF (HANDLE hRoute6)
_extern HANDLE Rt6GetLLI (HANDLE hRoute6)
_extern UINT32 Rt6GetMTU (HANDLE hRoute6)
_extern int Rt6IsLocalRoute (HANDLE hRoute)
_extern void Rt6IncRefCount (HANDLE hRoute6)
_extern int Rt6IsDefaultRoute (HANDLE hRoute6)
_extern void Rt6GetNetworkAddr (HANDLE hRoute6, IP6N *IPNet)
_extern RT6_ENTRYRt6GetTable (void)
_extern void Rt6CleanTable (RT6_ENTRY *ptr_list)


Detailed Description

Common structures and definitions used for the ROUTE6 Module.

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

Function Documentation

_extern void Rt6CleanTable ( RT6_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:
Route6GetTable
Parameters:
[in] ptr_list This is the head of the duplicate list which will be cleaned up.
Return values:
Not Applicable

_extern HANDLE Rt6Create ( UINT32  flags,
IP6N  IPAddr,
IP6N  IPMask,
IP6N  NextHop,
UINT8 *  mac_address,
NETIF_DEVICE *  ptr_device,
UINT32  ValidLifetime 
)

Description
The function creates a new routing entry.

Parameters:
[in] flags Specifies flags.
[in] IPAddr This is the IPv6 address for which the route is created.
[in] IPMask This is the IPv6 subnet mask.
[in] NextHop This is the Next Hop gateway associated with the route.
[in] mac_address This is the MAC Address associated with the ROUTE. This can be NULL.
[in] ptr_device This is the interface on which the route is created.
[in] ValidLifetime Timeout for which this route will remain valid. This is VALID only for CLONING Routes. Once the CLONING Route is timed out all HOST routes derived from this will also be removed. If this is INFINITE_LT then the routes are always active.
Return values:
Success - Handle to the new route
Error - 0

_extern HANDLE Rt6Find ( UINT32  Flags,
IP6N  IPAddress,
NETIF_DEVICE *  ptr_device 
)

Description
The function searches the routing table for a route to be used.

Parameters:
[in] Flags Flags associated with the routing entry. Specifies the SEARCH Parameters that can be used to find a ROUTING Entry. FLG_RTE_HOST -> Search ROUTE6 table for only HOST routes FLG_RTE_CLONING -> Search ROUTE6 table for only NETWORK routes 0 -> Search all ROUTES (Host & Network) but Network routes are not cloned. FLG_RTF_CLONE -> Invalid. FLG_RTE_GATEWAY -> Invalid. (Use the Rt6FindDefaultRouter API)
The flags should be SET to FLG_RTE_HOST | FLG_RTE_CLONING | FLG_RTE_GATEWAY | FLG_RTF_CLONE From the IPv6 Routing Lookup API; since this will search all Valid Routes and if the ROUTE is a CLONING Route then it will be CLONED (FLG_RTF_CLONE) too.
Parameters:
[in] IPAddress The IPv6 address for which we are trying to find a ROUTE.
[in] ptr_device Device on which the route exists. This can be NULL.
Return values:
Match - Handle to the routing 6 entry
No Match - 0

_extern HANDLE Rt6FindDefaultRouter ( IP6N  RouterAddress,
NETIF_DEVICE *  ptr_device 
)

Description
The function checks if the Router Address Matches an entry in the default Router List.

Parameters:
[in] RouterAddress The Default router address we are trying to find.
[in] ptr_device Device on which the default router is being searched. If specified as NULL; then the device is wildcarded and all default routes are searched.
Return values:
Match - Handle to the Default Router
No Match - 0

_extern void Rt6FlushInterfaceRoutes ( NETIF_DEVICE *  ptr_device  ) 

Description
The function cleans all routes on a specific interface

Parameters:
[in] ptr_device Pointer to the device for which all routes will be cleaned.
Return values:
Not Applicable.

_extern void Rt6Free ( HANDLE  hRoute6  ) 

Description
The function frees an existing routing entry.

Parameters:
[in] hRoute6 Route to be deleted.
Return values:
Not Applicable.

_extern HANDLE Rt6GetIF ( HANDLE  hRoute6  ) 

Description
The function gets the Interface handle associated with the Route6 object.

Parameters:
[in] hRoute6 The handle to the route6 object whose Interface handle we are interested in.
Return values:
Success - Handle to the Interface
Error - 0

_extern HANDLE Rt6GetLLI ( HANDLE  hRoute6  ) 

Description
The function returns the LLIv6 entry given the Route6 handle

Parameters:
[in] hRoute6 The handle to the route6 object whose LLIv6 handle we are interested in.
Return values:
Success - Handle to the LLIv6
Error - 0

_extern UINT32 Rt6GetMTU ( HANDLE  hRoute6  ) 

Description
The function gets the MTU associated with the Route6 object.

Parameters:
[in] hRoute6 The handle to the ROUTE6 Object whose MTU we are interested in.
Return values:
Success - MTU of the route.
Error - 0

_extern void Rt6GetNetworkAddr ( HANDLE  hRoute6,
IP6N *  IPNet 
)

Description
The function returns the Network Address associated with a route.

Parameters:
[in] hRoute6 The handle to the ROUTE6 Object.
[out] IPNet The handle to the Network Address to be returned.
Return values:
None 

_extern RT6_ENTRY* Rt6GetTable ( void   ) 

Description
The function replicates the IPv6 Routing Table and creates a duplicate copy which is then returned back to the callee. The replicated routing 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:
Route6CleanTable
Return values:
Head of the copy of the IPv6 Routing Table

_extern void Rt6IncRefCount ( HANDLE  hRoute6  ) 

Description
The function increments the reference count for a route6.

Parameters:
[in] hRoute6 The handle to the route6 object whose reference counter needs to be incremented.
Return values:
Success - Handle to the Interface
Error - 0

_extern int Rt6IsDefaultRoute ( HANDLE  hRoute6  ) 

Description
The function checks if the route specified is a default route?

Parameters:
[in] hRoute6 The handle to the ROUTE6 Object.
Return values:
Success - 1.
Error - 0

_extern int Rt6IsLocalRoute ( HANDLE  hRoute  ) 

Description
The function checks if the route specified is LOCAL or not?

Parameters:
[in] hRoute The handle to the ROUTE6 Object.
Return values:
Success - MTU of the route.
Error - 0

_extern HANDLE Rt6Modify ( HANDLE  hRoute6,
UINT32  flags,
IP6N  IPAddr,
IP6N  IPMask,
IP6N  NextHop,
UINT8 *  mac_address,
NETIF_DEVICE *  ptr_device,
UINT32  ValidLifetime 
)

Description
The function modifies an existing routing entry.

Parameters:
[in] hRoute6 Handle to the route which is to be modified.
[in] flags Specifies flags.
[in] IPAddr This is the IPv6 address for which the route is created.
[in] IPMask This is the IPv6 subnet mask.
[in] NextHop This is the Next Hop gateway associated with the route.
[in] mac_address This is the MAC Address associated with the ROUTE. This can be NULL.
[in] ptr_device This is the interface on which the route is created.
[in] ValidLifetime Timeout for which this route will remain valid. This is VALID only for CLONING Routes. Once the CLONING Route is timed out all HOST routes derived from this will also be removed. If this is INFINITE_LT then the routes are always active.
Return values:
Success - Handle to the modified route
Error - 0

_extern void Rt6Update ( HANDLE  hRoute,
UINT32  RxPacketType,
UINT8 *  mac_address,
UINT32  Flags,
UINT32  Lifetime 
)

Description
The function is used to update the ROUTE6 and corresponding LLI6 Entry. This is called whenever a Neighbor Discovery Packet is received and the Target Address is meant for us.

Parameters:
[in] hRoute Handle to the route we need to update.
[in] RxPacketType Type of NDISC Packet received.
[in] mac_address MAC Address information if present from the NDISC Packet.
[in] Flags The flags field in the Received NA Header. Its set to 0 for all other packets.
[in] Lifetime New Lifetime value to be updated with valid only for RA. Else ignored in this function.
Return values:
Not Applicable


Copyright 2009, Texas Instruments Incorporated