65 #ifndef DEVICE_IP_INTERFACE_IPV6ADDRESS_H_
66 #define DEVICE_IP_INTERFACE_IPV6ADDRESS_H_
72 #include "hostIf_tr69ReqHandler.h"
73 #include "hostIf_utils.h"
74 #include "hostIf_updateHandler.h"
83 static GHashTable *ifHash;
84 static GMutex *m_mutex;
87 char nameOfInterface[IF_NAMESIZE];
91 bool bCalledIPAddress;
94 bool backupIPv6AddressEnable;
95 char backupIPv6AddressStatus[BUFF_LENGTH_16];
96 char backupIPv6AddressIPAddress[BUFF_LENGTH_64];
97 char backupIPv6AddressOrigin[BUFF_LENGTH_32];
99 bool backupIPv6PrefixEnable;
100 char backupIPv6PrefixStatus[BUFF_LENGTH_16];
101 char backupIPv6PrefixPrefix[BUFF_LENGTH_64];
102 char backupIPv6PrefixOrigin[BUFF_LENGTH_32];
104 static const char* PREFERRED;
105 static const char* DEPRECATED;
106 static const char* INVALID;
107 static const char* INACCESSIBLE;
108 static const char* UNKNOWN;
109 static const char* TENTATIVE;
110 static const char* DUPLICATE;
111 static const char* OPTIMISTIC;
113 static const char* AUTOCONFIGURED;
114 static const char* DHCPv6;
115 static const char* WELLKNOWN;
116 static const char* STATIC;
117 static const char* PREFIXDELEGATION;
118 static const char* ROUTERADVERTISEMENT;
119 static const char* CHILD;
120 static const char* INAPPLICABLE;
125 int getIPv6AddressAndMask (
int instance,
struct in6_addr& in6_address,
struct in6_addr& in6_mask);
126 int getIPv6Prefix (
int instance,
struct in6_addr& in6_prefix_address,
unsigned int& prefix_length);
132 void convert_lifetime_to_string (
long int t,
char* lifetime);
134 int setIp(
int interfaceNo,
char *value);
135 int removeIp(
int interfaceNo,
char *value);
136 void refreshInterfaceName ();
137 int get_IPv6Prefix_Origin (
int instance,
char* origin);
138 int get_IPv6Prefix_StaticType (
int instance,
char* staticType);
139 int get_IPv6Prefix_ParentPrefix (
int instance,
char* parentPrefix);
140 int get_IPv6Prefix_ChildPrefixBits (
int instance,
char* childPrefixBits);
145 static GList* getAllInstances();
147 static void closeAllInstances();
149 int handleGetMsg (
const char* pSubSetting,
int subInstanceNumber,
HOSTIF_MsgData_t* stMsgData,
bool isAddress);
150 int handleSetMsg (
const char* pSubSetting,
int subInstanceNumber,
HOSTIF_MsgData_t* stMsgData,
bool isAddress);
156 int get_IPv6Address_IPAddressStatus (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
164 int get_IPv6Address_Prefix (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
165 int get_IPv6Address_PreferredLifetime (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
166 int get_IPv6Address_ValidLifetime (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
167 int get_IPv6Address_Anycast (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
169 int get_IPv6Prefix_Enable (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
170 int get_IPv6Prefix_Status (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
171 int get_IPv6Prefix_PrefixStatus (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
172 int get_IPv6Prefix_Alias (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
173 int get_IPv6Prefix_Prefix (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
174 int get_IPv6Prefix_Origin (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
175 int get_IPv6Prefix_StaticType (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
176 int get_IPv6Prefix_ParentPrefix (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
177 int get_IPv6Prefix_ChildPrefixBits (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
178 int get_IPv6Prefix_OnLink (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
179 int get_IPv6Prefix_Autonomous (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
180 int get_IPv6Prefix_PreferredLifetime (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
181 int get_IPv6Prefix_ValidLifetime (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo,
bool *pChanged = NULL);
269 int set_IPv6Address_Prefix (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
270 int set_IPv6Address_PreferredLifetime (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
271 int set_IPv6Address_ValidLifetime (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
272 int set_IPv6Address_Anycast (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
278 int set_IPv6Prefix_StaticType (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
279 int set_IPv6Prefix_ParentPrefix (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
280 int set_IPv6Prefix_ChildPrefixBits (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
282 int set_IPv6Prefix_Autonomous (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
283 int set_IPv6Prefix_PreferredLifetime (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);
284 int set_IPv6Prefix_ValidLifetime (
HOSTIF_MsgData_t *stMsgData,
int subInstanceNo);