Functions | |
UINT16 | IPv6Layer4ComputeChecksum (UINT8 *ptr_l4Hdr, PSEUDOV6 *ptr_pseudoHdr) |
void | IPv6IPAddressToString (IP6N address, char *strIPAddress) |
void | IPv6DisplayIPAddress (IP6N address) |
int | isValidHexDigit (int ch) |
int | GetHexValue (int ch) |
int | IPv6StringToIPAddress (char *StringIP, IP6N *address) |
UINT16 | IPv6CompareAddress (IP6N addr1, IP6N addr2) |
UINT16 | IPv6IsMulticast (IP6N address) |
UINT16 | IPv6IsLinkLocal (IP6N address) |
void | IPv6GetSubnetMaskFromBits (IP6N *SubnetMask, UINT16 bits) |
int | IPv6AddAddress (UINT16 dev_index, IP6N Address, UINT16 NetBits, UINT32 ValidLifetime, UINT32 PrefLifetime, UINT8 IsAnycast) |
int | IPv6DelAddress (UINT16 dev_index, IP6N Address) |
int | IPv6InterfaceInit (UINT16 dev_index, void(*DADStatus)(IP6N Address, UINT16 dev_index, UINT8 Status)) |
int | IPv6InterfaceDeInit (UINT16 dev_index) |
void | IPv6Init (void) |
int GetHexValue | ( | int | ch | ) |
Description
Utility function that converts a given ASCII character to its hexadecimal value.
[in] | ch | The character that needs to be converted to hex. |
Hex | equivalent - Success | |
-1 | - Error, the character is not a valid hexadecimal digit. |
int IPv6AddAddress | ( | UINT16 | dev_index, | |
IP6N | Address, | |||
UINT16 | NetBits, | |||
UINT32 | ValidLifetime, | |||
UINT32 | PrefLifetime, | |||
UINT8 | IsAnycast | |||
) |
Description
This function is used to add an IPv6 address to an interface. This function should not be used to add Link Local Addresses to the interface. Link Local Addresses are automatically added to the interface when the IPv6 stack is initialized on it.
[in] | dev_index | The device index on which the IPv6 address needs to be added. |
[in] | Address | The IPv6 Address which needs to be added. |
[in] | NetBits | The number of bits which make the Subnet-Mask. |
[in] | ValidLifetime | The Valid Lifetime of the address. Set to INFINITE_LT if the address is permanent |
[in] | PrefLifetime | The Preferred Lifetime of the address. Set to INFINITE_LT if the address is permanent. |
[in] | IsAnycast | Flag which indicates if the address to be added is ANYCAST or UNICAST. Set to 1 for ANYCAST. |
0 | - Success | |
<0 | - Error |
UINT16 IPv6CompareAddress | ( | IP6N | addr1, | |
IP6N | addr2 | |||
) |
Description
Utility Function used to compare the 2 IPv6 Addresses.
This is for *internal* NDK Stack Usage.
[in] | addr1 | The first IPv6 Address which is to be compared. |
[in] | addr2 | The second IPv6 Address which is to be compared. |
1 | - The IP Addresses match | |
0 | - The IP Addresses do not match |
int IPv6DelAddress | ( | UINT16 | dev_index, | |
IP6N | Address | |||
) |
Description
This function is used to delete an IPv6 address from an interface This function should not be used to delete Link Local Addresses from the interface. Link Local Addresses are automatically deleted from the interface when the IPv6 stack is de-initialized on it.
[in] | dev_index | The device index on which the IPv6 address needs to be deleted. |
[in] | Address | The IPv6 Address which needs to be deleted. |
0 | - Success | |
<0 | - Error |
void IPv6DisplayIPAddress | ( | IP6N | address | ) |
Description
Utility Function which prints the IPv6 address. The IP address passed has to be specified in network order (IP6N).
[in] | address | IPv6 Address to be displayed. |
Not | Applicable. |
void IPv6GetSubnetMaskFromBits | ( | IP6N * | SubnetMask, | |
UINT16 | bits | |||
) |
Description
Utility Function which gets the subnet mask given the number of bits.
For example: Subnet Mask = 0xFFFF:: if the bits is 16
This is for *internal* NDK Stack Usage.
[out] | SubnetMask | Pointer to the computed subnet mask in network order. |
[in] | bits | Number of bits in the subnet mask |
Not | Applicable. |
void IPv6Init | ( | void | ) |
Description
This function is used to initialize the IPv6 Module.
This is for *internal* NDK Stack Usage.
Not | Applicable. |
int IPv6InterfaceDeInit | ( | UINT16 | dev_index | ) |
Description
This function is used to deinitialize the IPv6 stack on the the specific device name. The function is available to System Developers and should only be called from within kernel mode.
[in] | dev_index | The device index on which the IPv6 stack is to be deinitialized. |
0 | - Success | |
<0 | - Error |
int IPv6InterfaceInit | ( | UINT16 | dev_index, | |
void(*)(IP6N Address, UINT16 dev_index, UINT8 Status) | DADStatus | |||
) |
Description
This function is used to initialize the IPv6 stack on the the specific device name. This is available to System Developers and should be invoked for the IPv6 stack to be operational on the specified interface. This can be called only from kernel mode thus System Developers should ensure that is called within the llEnter and llExit sections.
[in] | dev_index | The device index on which the IPv6 stack is to be initialized. |
[in] | DADStatus | This is the call back function which is invoked by the IPv6 state machine once the DAD process has been completed on an address. The Status argument indicates the result of the DAD operation. 1 indicates that the address was permanent and 0 indicates that the address is a duplicate. This is an optional parameter and can be passed as NULL. |
0 | - Success | |
<0 | - Error |
void IPv6IPAddressToString | ( | IP6N | address, | |
char * | strIPAddress | |||
) |
Description
Utility Function which converts the IPv6 address to string format.
[in] | address | The IPv6 Address in IP6N format. |
[out] | strIPAddress | The IPv6 Address in String Format. |
Not | Applicable. |
UINT16 IPv6IsLinkLocal | ( | IP6N | address | ) |
Description
Utility Function which determines if the IPv6 Address specified is a Link Local address or not?
This is for *internal* NDK Stack Usage.
[in] | address | IPv6 Address which needs to be verfied. |
1 | - The address passed is Link Local | |
0 | - The address passed is NOT Link Local |
UINT16 IPv6IsMulticast | ( | IP6N | address | ) |
Description
Utility Function which determines if the IPv6 Address specified is a Multicast address or not?
This is for *internal* NDK Stack Usage.
[in] | address | IPv6 Address which needs to be verfied. |
1 | - The address passed is MULTICAST | |
0 | - The address passed is NOT Multicast |
UINT16 IPv6Layer4ComputeChecksum | ( | UINT8 * | ptr_l4Hdr, | |
PSEUDOV6 * | ptr_pseudoHdr | |||
) |
Description
The function does the Layer4 Checksum computation.
[in] | ptr_l4Hdr | Pointer to the Layer4 Header. This could be TCP, UDP or ICMPv6. |
[in] | ptr_pseudoHdr | Pointer to the Pseudo Header. |
Returns | the computed checksum. |
int IPv6StringToIPAddress | ( | char * | StringIP, | |
IP6N * | address | |||
) |
Description
Utility Function which converts an IPv6 Address from CHAR Format to IP6N
[in] | StringIP | The IPv6 Address in String Format |
[out] | address | The IPv6 Address in IP6N format. |
0 | - Success | |
-1 | - Error |
int isValidHexDigit | ( | int | ch | ) |
Description
Utility Function that validates whether a given ASCII character is a valid hexadecimal digit.
[in] | ch | The character that needs to be validated |
1 | - Success, the character is a hexadecimal digit | |
0 | - Error, the character is not a valid hexadecimal digit. |