- i = 0;
- while ((i < (nd_route_tbl_str_max_len - 1))
- && (token[i] != ',')) {
- nh_ipv6_str[i] = token[i];
- i++;
- }
- nh_ipv6_str[i] = '\0';
- my_inet_pton_ipv6(AF_INET6, nh_ipv6_str,
- &nh_ipv6);
- i++;
- j = 0;
- while ((j < (nd_route_tbl_str_max_len - 1))
- && (token[i + j] != ',')) {
- depth_str[j] = token[i + j];
- j++;
- }
- depth_str[j] = '\0';
- //converting string char to integer
- int s;
- for (s = 0; depth_str[s] != '\0'; ++s)
- depth = depth * 10 + depth_str[s] - '0';
-
- j++;
- k = 0;
- while ((k < (nd_route_tbl_str_max_len - 1))
- && (token[i + j + k] != ',')) {
- tx_port_str[k] = token[i + j + k];
- k++;
- }
- tx_port_str[k] = '\0';
- tx_port = strtoul(tx_port_str, NULL, 16); //atoi(tx_port_str);
+ i = 0;
+ while ((i < (nd_route_tbl_str_max_len - 1))
+ && (token[i] != ',')) {
+ dest_ipv6_str[i] = token[i];
+ i++;
+ }
+ dest_ipv6_str[i] = '\0';
+ my_inet_pton_ipv6(AF_INET6, dest_ipv6_str,
+ &dest_ipv6);
+
+ i++;
+ j = 0;
+ while ((j < (nd_route_tbl_str_max_len - 1))
+ && (token[i + j] != ',')) {
+ depth_str[j] = token[i + j];
+ j++;
+ }
+ depth_str[j] = '\0';
+ //converting string char to integer
+ int s;
+ for (s = 0; depth_str[s] != '\0'; ++s)
+ depth = depth * 10 + depth_str[s] - '0';
+
+ j++;
+ k = 0;
+ while ((k < (nd_route_tbl_str_max_len - 1))
+ && (token[i + j + k] != ',')) {
+ tx_port_str[k] = token[i + j + k];
+ k++;
+ }
+ tx_port_str[k] = '\0';
+ tx_port = strtoul(tx_port_str, NULL, 16); //atoi(tx_port_str);
+
+ k++;
+ l = 0;
+ while ((l < (nd_route_tbl_str_max_len - 1))
+ && (token[i + j + k + l] != ')')) {
+ nh_ipv6_str[l] = token[i + j + k + l];
+ l++;
+ }
+ nh_ipv6_str[l] = '\0';
+ my_inet_pton_ipv6(AF_INET6, nh_ipv6_str,
+ &nh_ipv6);