return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
- if (profile_info->ProfileInfo.Pdp.PSModemPath[0] != '/' ||
- strlen(profile_info->ProfileInfo.Pdp.PSModemPath) < 2) {
+ if (profile_info->profile_info.pdp.ps_modem_path[0] != '/' ||
+ strlen(profile_info->profile_info.pdp.ps_modem_path) < 2) {
CONNECTION_LOG(CONNECTION_ERROR, "Modem object path is NULL"); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
rv = net_add_profile(conn_handle->network_info_handle,
- profile_info->ProfileInfo.Pdp.ServiceType, profile_info);
+ profile_info->profile_info.pdp.service_type, profile_info);
if (rv == NET_ERR_ACCESS_DENIED) {
CONNECTION_LOG(CONNECTION_ERROR, "Access denied"); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
- rv = net_delete_profile(conn_handle->network_info_handle, profile_info->ProfileName);
+ rv = net_delete_profile(conn_handle->network_info_handle, profile_info->profile_name);
if (rv == NET_ERR_ACCESS_DENIED) {
CONNECTION_LOG(CONNECTION_ERROR, "Access denied"); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
}
rv = net_modify_profile(conn_handle->network_info_handle,
- profile_info->ProfileName, (net_profile_info_t*)profile);
+ profile_info->profile_name, (net_profile_info_t*)profile);
if (rv == NET_ERR_ACCESS_DENIED) {
CONNECTION_LOG(CONNECTION_ERROR, "Access denied"); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
{
switch (profile_info->profile_type) {
case NET_DEVICE_CELLULAR:
- return &profile_info->ProfileInfo.Pdp.net_info;
+ return &profile_info->profile_info.pdp.net_info;
case NET_DEVICE_WIFI:
- return &profile_info->ProfileInfo.Wlan.net_info;
+ return &profile_info->profile_info.wlan.net_info;
case NET_DEVICE_ETHERNET:
- return &profile_info->ProfileInfo.Ethernet.net_info; //LCOV_EXCL_LINE
+ return &profile_info->profile_info.ethernet.net_info; //LCOV_EXCL_LINE
case NET_DEVICE_BLUETOOTH:
- return &profile_info->ProfileInfo.Bluetooth.net_info;
+ return &profile_info->profile_info.bluetooth.net_info;
case NET_DEVICE_MESH:
- return &profile_info->ProfileInfo.Mesh.net_info;
+ return &profile_info->profile_info.mesh.net_info;
case NET_DEVICE_DEFAULT:
case NET_DEVICE_USB:
case NET_DEVICE_UNKNOWN:
char *ipstr = NULL;
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4) {
- ipaddr = (unsigned char *)&ip_addr->Data.Ipv4.s_addr;
+ ipaddr = (unsigned char *)&ip_addr->data.Ipv4.s_addr;
ipstr = g_try_malloc0(INET_ADDRSTRLEN);
if (ipstr == NULL)
return NULL;
inet_ntop(AF_INET, ipaddr, ipstr, INET_ADDRSTRLEN);
} else {
//LCOV_EXCL_START
- ipaddr = (unsigned char *)&ip_addr->Data.Ipv6.s6_addr;
+ ipaddr = (unsigned char *)&ip_addr->data.Ipv6.s6_addr;
ipstr = g_try_malloc0(INET6_ADDRSTRLEN);
if (ipstr == NULL)
return NULL;
connection_profile_h profile = NULL;
profile_info->profile_type = NET_DEVICE_CELLULAR;
- profile_info->ProfileState = NET_STATE_TYPE_IDLE;
- profile_info->ProfileInfo.Pdp.PdnType = NET_PDN_TYPE_UNKNOWN;
- profile_info->ProfileInfo.Pdp.RoamPdnType = NET_PDN_TYPE_UNKNOWN;
- profile_info->ProfileInfo.Pdp.net_info.IpConfigType = NET_IP_CONFIG_TYPE_OFF;
- profile_info->ProfileInfo.Pdp.net_info.ProxyMethod = NET_PROXY_TYPE_DIRECT;
- g_strlcpy(profile_info->ProfileInfo.Pdp.Keyword, keyword, NET_PDP_APN_LEN_MAX);
+ profile_info->profile_state = NET_STATE_TYPE_IDLE;
+ profile_info->profile_info.pdp.pdn_type = NET_PDN_TYPE_UNKNOWN;
+ profile_info->profile_info.pdp.roam_pdn_type = NET_PDN_TYPE_UNKNOWN;
+ profile_info->profile_info.pdp.net_info.ip_config_type = NET_IP_CONFIG_TYPE_OFF;
+ profile_info->profile_info.pdp.net_info.proxy_method = NET_PROXY_TYPE_DIRECT;
+ g_strlcpy(profile_info->profile_info.pdp.keyword, keyword, NET_PDP_APN_LEN_MAX);
if (vconf_get_int(VCONF_TELEPHONY_DEFAULT_DATA_SERVICE,
&default_subscriber_id) != 0)
}
interface_name = interface_list->data;
- g_strlcpy(profile_info->ProfileName, interface_name, NET_PROFILE_NAME_LEN_MAX);
- g_strlcpy(profile_info->ProfileInfo.Wlan.net_info.ProfileName,
+ g_strlcpy(profile_info->profile_name, interface_name, NET_PROFILE_NAME_LEN_MAX);
+ g_strlcpy(profile_info->profile_info.wlan.net_info.profile_name,
interface_name, NET_PROFILE_NAME_LEN_MAX);
profile_info->profile_type = NET_DEVICE_WIFI;
- profile_info->ProfileState = NET_STATE_TYPE_IDLE;
- profile_info->ProfileInfo.Wlan.net_info.IpConfigType = NET_IP_CONFIG_TYPE_OFF;
- profile_info->ProfileInfo.Wlan.net_info.ProxyMethod = NET_PROXY_TYPE_DIRECT;
- profile_info->ProfileInfo.Wlan.wlan_mode = NETPM_WLAN_CONNMODE_AUTO;
- profile_info->ProfileInfo.Wlan.security_info.sec_mode = WLAN_SEC_MODE_NONE;
- profile_info->ProfileInfo.Wlan.security_info.enc_mode = WLAN_ENC_MODE_NONE;
+ profile_info->profile_state = NET_STATE_TYPE_IDLE;
+ profile_info->profile_info.wlan.net_info.ip_config_type = NET_IP_CONFIG_TYPE_OFF;
+ profile_info->profile_info.wlan.net_info.proxy_method = NET_PROXY_TYPE_DIRECT;
+ profile_info->profile_info.wlan.wlan_mode = NETPM_WLAN_CONNMODE_AUTO;
+ profile_info->profile_info.wlan.security_info.sec_mode = WLAN_SEC_MODE_NONE;
+ profile_info->profile_info.wlan.security_info.enc_mode = WLAN_ENC_MODE_NONE;
g_slist_free_full(interface_list, g_free);
return CONNECTION_ERROR_NONE;
net_profile_info_t *profile_info = profile;
- char *prof_id = strrchr(profile_info->ProfileName, '/');
+ char *prof_id = strrchr(profile_info->profile_name, '/');
if (prof_id == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
switch (profile_info->profile_type) {
case NET_DEVICE_CELLULAR:
- *profile_name = g_strdup(profile_info->ProfileInfo.Pdp.Keyword);
+ *profile_name = g_strdup(profile_info->profile_info.pdp.keyword);
break;
case NET_DEVICE_WIFI:
- *profile_name = g_strdup(profile_info->ProfileInfo.Wlan.essid);
+ *profile_name = g_strdup(profile_info->profile_info.wlan.essid);
break;
case NET_DEVICE_ETHERNET:
- *profile_name = g_strdup(profile_info->ProfileInfo.Ethernet.net_info.DevName); //LCOV_EXCL_LINE
+ *profile_name = g_strdup(profile_info->profile_info.ethernet.net_info.dev_name); //LCOV_EXCL_LINE
break; //LCOV_EXCL_LINE
case NET_DEVICE_BLUETOOTH: {
- char *bt_name = strrchr(profile_info->ProfileName, '/');
+ char *bt_name = strrchr(profile_info->profile_name, '/');
if (bt_name == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
*profile_name = g_strdup(bt_name);
} break;
case NET_DEVICE_MESH:
- *profile_name = g_strdup(profile_info->ProfileInfo.Mesh.essid);
+ *profile_name = g_strdup(profile_info->profile_info.mesh.essid);
break;
default:
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
- *interface_name = g_strdup(net_info->DevName);
+ *interface_name = g_strdup(net_info->dev_name);
if (*interface_name == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
net_profile_info_t profile_info_local;
net_profile_info_t *profile_info = profile;
- rv = net_get_profile_info(NULL, profile_info->ProfileName, &profile_info_local);
+ rv = net_get_profile_info(NULL, profile_info->profile_name, &profile_info_local);
if (rv == NET_ERR_ACCESS_DENIED) {
CONNECTION_LOG(CONNECTION_ERROR, "Access denied"); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
}
net_profile_info_t *profile_info = profile;
- *state = _profile_convert_to_cp_state(profile_info->ProfileState);
+ *state = _profile_convert_to_cp_state(profile_info->profile_state);
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
}
net_profile_info_t *profile_info = profile;
- if (profile_info->ProfileState == NET_STATE_TYPE_ONLINE)
+ if (profile_info->profile_state == NET_STATE_TYPE_ONLINE)
*state = CONNECTION_INTERNET_STATE_ONLINE;
else
*state = CONNECTION_INTERNET_STATE_OFFLINE;
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4)
- profile_type = net_info->IpConfigType;
+ profile_type = net_info->ip_config_type;
else
- profile_type = net_info->IpConfigType6;
+ profile_type = net_info->ip_config_type6;
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4) {
switch (profile_type) {
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4) {
- *ip_address = __profile_convert_ip_to_string(&net_info->IpAddr,
+ *ip_address = __profile_convert_ip_to_string(&net_info->ip_addr,
address_family);
} else {
- if (net_get_preferred_ipv6_address(net_info->ProfileName, ip_address) != NET_ERR_NONE) {
+ if (net_get_preferred_ipv6_address(net_info->profile_name, ip_address) != NET_ERR_NONE) {
CONNECTION_LOG(CONNECTION_ERROR, "Failed to get preferred ipv6 address"); //LCOV_EXCL_LINE
- *ip_address = __profile_convert_ip_to_string(&net_info->IpAddr6, //LCOV_EXCL_LINE
+ *ip_address = __profile_convert_ip_to_string(&net_info->ip_addr6, //LCOV_EXCL_LINE
address_family);
}
}
return CONNECTION_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
- *subnet_mask = __profile_convert_ip_to_string(&net_info->SubnetMask,
+ *subnet_mask = __profile_convert_ip_to_string(&net_info->subnet_mask,
address_family);
if (*subnet_mask == NULL) {
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV6)
*gateway_address = __profile_convert_ip_to_string(
- &net_info->GatewayAddr6, address_family);
+ &net_info->gateway_addr6, address_family);
else
*gateway_address = __profile_convert_ip_to_string(
- &net_info->GatewayAddr, address_family);
+ &net_info->gateway_addr, address_family);
if (*gateway_address == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
}
CONNECTION_LOG(CONNECTION_INFO, "IP Config %d, DHCP Server Address %s",
- net_info->IpConfigType, (net_info->BServerAddr ? "TRUE" : "FALSE"));
+ net_info->ip_config_type, (net_info->b_server_addr ? "TRUE" : "FALSE"));
- *dhcp_server = __profile_convert_ip_to_string(&net_info->ServerAddr,
+ *dhcp_server = __profile_convert_ip_to_string(&net_info->server_addr,
address_family);
if (*dhcp_server == NULL) {
}
CONNECTION_LOG(CONNECTION_INFO, "Lease duration : %d",
- net_info->DHCPLeaseDuration);
+ net_info->dhcp_lease_duration);
- *dhcp_lease_duration = net_info->DHCPLeaseDuration;
+ *dhcp_lease_duration = net_info->dhcp_lease_duration;
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4)
- *dns_address = __profile_convert_ip_to_string(&net_info->DnsAddr[order-1],
+ *dns_address = __profile_convert_ip_to_string(&net_info->dns_addr[order-1],
address_family);
else if (address_family == CONNECTION_ADDRESS_FAMILY_IPV6) //LCOV_EXCL_LINE
- *dns_address = __profile_convert_ip_to_string(&net_info->DnsAddr6[order-1], //LCOV_EXCL_LINE
+ *dns_address = __profile_convert_ip_to_string(&net_info->dns_addr6[order-1], //LCOV_EXCL_LINE
address_family);
if (*dns_address == NULL) {
}
//LCOV_EXCL_STOP
- switch (net_info->ProxyMethod) {
+ switch (net_info->proxy_method) {
//LCOV_EXCL_START
case NET_PROXY_TYPE_DIRECT:
*type = CONNECTION_PROXY_TYPE_DIRECT;
return CONNECTION_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
- *proxy_address = g_strdup(net_info->ProxyAddr);
+ *proxy_address = g_strdup(net_info->proxy_addr);
if (*proxy_address == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4)
- profile_type = &net_info->IpConfigType ;
+ profile_type = &net_info->ip_config_type ;
else
- profile_type = &net_info->IpConfigType6 ;
+ profile_type = &net_info->ip_config_type6 ;
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4) {
switch (type) {
//LCOV_EXCL_START
case CONNECTION_IP_CONFIG_TYPE_STATIC:
*profile_type = NET_IP_CONFIG_TYPE_STATIC;
- net_info->IpAddr.Data.Ipv4.s_addr = 0;
- net_info->SubnetMask.Data.Ipv4.s_addr = 0;
- net_info->GatewayAddr.Data.Ipv4.s_addr = 0 ;
+ net_info->ip_addr.data.Ipv4.s_addr = 0;
+ net_info->subnet_mask.data.Ipv4.s_addr = 0;
+ net_info->gateway_addr.data.Ipv4.s_addr = 0 ;
break;
case CONNECTION_IP_CONFIG_TYPE_DYNAMIC:
break;
case CONNECTION_IP_CONFIG_TYPE_FIXED:
- net_info->IpConfigType = NET_IP_CONFIG_TYPE_FIXED;
+ net_info->ip_config_type = NET_IP_CONFIG_TYPE_FIXED;
break;
case CONNECTION_IP_CONFIG_TYPE_NONE:
switch (type) {
case CONNECTION_IP_CONFIG_TYPE_STATIC:
*profile_type = NET_IP_CONFIG_TYPE_STATIC;
- inet_pton(AF_INET6, "::", &net_info->IpAddr6.Data.Ipv6);
- net_info->PrefixLen6 = 0 ;
+ inet_pton(AF_INET6, "::", &net_info->ip_addr6.data.Ipv6);
+ net_info->prefix_len6 = 0 ;
inet_pton(AF_INET6, "::",
- &net_info->GatewayAddr6.Data.Ipv6);
+ &net_info->gateway_addr6.data.Ipv6);
break;
case CONNECTION_IP_CONFIG_TYPE_AUTO:
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV6) {
//LCOV_EXCL_START
if (ip_address == NULL)
- inet_pton(AF_INET6, "::", &net_info->IpAddr6.Data.Ipv6);
- else if (inet_pton(AF_INET6, ip_address, &net_info->IpAddr6.Data.Ipv6) < 1) {
+ inet_pton(AF_INET6, "::", &net_info->ip_addr6.data.Ipv6);
+ else if (inet_pton(AF_INET6, ip_address, &net_info->ip_addr6.data.Ipv6) < 1) {
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
//LCOV_EXCL_STOP
} else {
if (ip_address == NULL)
- net_info->IpAddr.Data.Ipv4.s_addr = 0;
- else if (inet_pton(AF_INET, ip_address, &net_info->IpAddr.Data.Ipv4) < 1) {
+ net_info->ip_addr.data.Ipv4.s_addr = 0;
+ else if (inet_pton(AF_INET, ip_address, &net_info->ip_addr.data.Ipv4) < 1) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
}
if (subnet_mask == NULL)
- net_info->SubnetMask.Data.Ipv4.s_addr = 0;
- else if (inet_pton(AF_INET, subnet_mask , &net_info->SubnetMask.Data.Ipv4) < 1) {
+ net_info->subnet_mask.data.Ipv4.s_addr = 0;
+ else if (inet_pton(AF_INET, subnet_mask , &net_info->subnet_mask.data.Ipv4) < 1) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
- net_info->PrefixLen = __profile_convert_netmask_to_prefix_len(subnet_mask);
- if (net_info->PrefixLen <= 0 || net_info->PrefixLen > 31) {
- CONNECTION_LOG(CONNECTION_ERROR, "Invalid Prefix length: %d", net_info->PrefixLen); //LCOV_EXCL_LINE
+ net_info->prefix_len = __profile_convert_netmask_to_prefix_len(subnet_mask);
+ if (net_info->prefix_len <= 0 || net_info->prefix_len > 31) {
+ CONNECTION_LOG(CONNECTION_ERROR, "Invalid Prefix length: %d", net_info->prefix_len); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV6) {
//LCOV_EXCL_START
if (gateway_address == NULL)
- inet_pton(AF_INET6, "::", &net_info->GatewayAddr6.Data.Ipv6);
- else if (inet_pton(AF_INET6, gateway_address, &net_info->GatewayAddr6.Data.Ipv6) < 1) {
+ inet_pton(AF_INET6, "::", &net_info->gateway_addr6.data.Ipv6);
+ else if (inet_pton(AF_INET6, gateway_address, &net_info->gateway_addr6.data.Ipv6) < 1) {
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
//LCOV_EXCL_STOP
} else {
if (gateway_address == NULL)
- net_info->GatewayAddr.Data.Ipv4.s_addr = 0;
- else if (inet_pton(AF_INET, gateway_address, &(net_info->GatewayAddr.Data.Ipv4)) < 1) {
+ net_info->gateway_addr.data.Ipv4.s_addr = 0;
+ else if (inet_pton(AF_INET, gateway_address, &(net_info->gateway_addr.data.Ipv4)) < 1) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV6) {
//LCOV_EXCL_START
- net_info->DnsAddr6[order-1].Type = NET_ADDR_IPV6;
+ net_info->dns_addr6[order-1].Type = NET_ADDR_IPV6;
if (dns_address == NULL)
- inet_pton(AF_INET6, "::", &net_info->DnsAddr6[order-1].Data.Ipv6);
- else if (inet_pton(AF_INET6, dns_address, &net_info->DnsAddr6[order-1].Data.Ipv6) < 1) {
+ inet_pton(AF_INET6, "::", &net_info->dns_addr6[order-1].data.Ipv6);
+ else if (inet_pton(AF_INET6, dns_address, &net_info->dns_addr6[order-1].data.Ipv6) < 1) {
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if (net_info->DnsCount6 < order)
- net_info->DnsCount6 = order;
+ if (net_info->dns_count6 < order)
+ net_info->dns_count6 = order;
//LCOV_EXCL_STOP
} else {
- net_info->DnsAddr[order-1].Type = NET_ADDR_IPV4;
+ net_info->dns_addr[order-1].Type = NET_ADDR_IPV4;
if (dns_address == NULL)
- net_info->DnsAddr[order-1].Data.Ipv4.s_addr = 0;
- else if (inet_pton(AF_INET, dns_address, &(net_info->DnsAddr[order-1].Data.Ipv4)) < 1) {
+ net_info->dns_addr[order-1].data.Ipv4.s_addr = 0;
+ else if (inet_pton(AF_INET, dns_address, &(net_info->dns_addr[order-1].data.Ipv4)) < 1) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
- if (net_info->DnsCount < order)
- net_info->DnsCount = order;
+ if (net_info->dns_count < order)
+ net_info->dns_count = order;
}
CONN_UNLOCK;
switch (type) {
//LCOV_EXCL_START
case CONNECTION_PROXY_TYPE_DIRECT:
- net_info->ProxyMethod = NET_PROXY_TYPE_DIRECT;
+ net_info->proxy_method = NET_PROXY_TYPE_DIRECT;
break;
case CONNECTION_PROXY_TYPE_AUTO:
- net_info->ProxyMethod = NET_PROXY_TYPE_AUTO;
+ net_info->proxy_method = NET_PROXY_TYPE_AUTO;
break;
case CONNECTION_PROXY_TYPE_MANUAL:
- net_info->ProxyMethod = NET_PROXY_TYPE_MANUAL;
+ net_info->proxy_method = NET_PROXY_TYPE_MANUAL;
break;
default:
CONN_UNLOCK;
}
if (proxy_address == NULL)
- net_info->ProxyAddr[0] = '\0';
+ net_info->proxy_addr[0] = '\0';
else
- g_strlcpy(net_info->ProxyAddr, proxy_address, NET_PROXY_LEN_MAX);
+ g_strlcpy(net_info->proxy_addr, proxy_address, NET_PROXY_LEN_MAX);
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
}
if (profile_info->profile_type == NET_DEVICE_WIFI)
- *essid = g_strdup(profile_info->ProfileInfo.Wlan.essid);
+ *essid = g_strdup(profile_info->profile_info.wlan.essid);
else
- *essid = g_strdup(profile_info->ProfileInfo.Mesh.essid);
+ *essid = g_strdup(profile_info->profile_info.mesh.essid);
if (*essid == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
}
if (profile_info->profile_type == NET_DEVICE_WIFI)
- *bssid = g_strdup(profile_info->ProfileInfo.Wlan.bssid);
+ *bssid = g_strdup(profile_info->profile_info.wlan.bssid);
else
- *bssid = g_strdup(profile_info->ProfileInfo.Mesh.bssid);
+ *bssid = g_strdup(profile_info->profile_info.mesh.bssid);
if (*bssid == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
}
if (profile_info->profile_type == NET_DEVICE_WIFI)
- *rssi = (int)profile_info->ProfileInfo.Wlan.Strength;
+ *rssi = (int)profile_info->profile_info.wlan.strength;
else
- *rssi = (int)profile_info->ProfileInfo.Mesh.Strength;
+ *rssi = (int)profile_info->profile_info.mesh.strength;
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
}
if (profile_info->profile_type == NET_DEVICE_WIFI)
- *frequency = (int)profile_info->ProfileInfo.Wlan.frequency;
+ *frequency = (int)profile_info->profile_info.wlan.frequency;
else
- *frequency = (int)profile_info->ProfileInfo.Mesh.frequency;
+ *frequency = (int)profile_info->profile_info.mesh.frequency;
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- *max_speed = profile_info->ProfileInfo.Wlan.max_rate;
+ *max_speed = profile_info->profile_info.wlan.max_rate;
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
}
if (profile_info->profile_type == NET_DEVICE_WIFI)
- sec_mode = profile_info->ProfileInfo.Wlan.security_info.sec_mode;
+ sec_mode = profile_info->profile_info.wlan.security_info.sec_mode;
else
- sec_mode = profile_info->ProfileInfo.Mesh.security_info.sec_mode;
+ sec_mode = profile_info->profile_info.mesh.security_info.sec_mode;
switch (sec_mode) {
//LCOV_EXCL_START
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- switch (profile_info->ProfileInfo.Wlan.security_info.enc_mode) {
+ switch (profile_info->profile_info.wlan.security_info.enc_mode) {
//LCOV_EXCL_START
case WLAN_ENC_MODE_NONE:
*type = CONNECTION_WIFI_ENCRYPTION_TYPE_NONE;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if (profile_info->Favourite) {
+ if (profile_info->favourite) {
*required = false; //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_NONE; //LCOV_EXCL_LINE
}
if (profile_info->profile_type == NET_DEVICE_WIFI)
- sec_mode = profile_info->ProfileInfo.Wlan.security_info.sec_mode;
+ sec_mode = profile_info->profile_info.wlan.security_info.sec_mode;
else
- sec_mode = profile_info->ProfileInfo.Mesh.security_info.sec_mode;
+ sec_mode = profile_info->profile_info.mesh.security_info.sec_mode;
switch (sec_mode) {
//LCOV_EXCL_START
}
if (profile_info->profile_type == NET_DEVICE_WIFI)
- g_strlcpy(profile_info->ProfileInfo.Wlan.security_info.authentication.psk.pskKey,
+ g_strlcpy(profile_info->profile_info.wlan.security_info.authentication.psk.psk_key,
passphrase, NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);
else
- g_strlcpy(profile_info->ProfileInfo.Mesh.security_info.authentication.sae.saeKey,
+ g_strlcpy(profile_info->profile_info.mesh.security_info.authentication.sae.sae_key,
passphrase, NETPM_WLAN_MAX_PSK_PASSPHRASE_LEN);
CONN_UNLOCK;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if (profile_info->ProfileInfo.Wlan.security_info.wps_support)
+ if (profile_info->profile_info.wlan.security_info.wps_support)
*supported = true;
else
*supported = false;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- *type = _profile_convert_to_connection_cellular_service_type(profile_info->ProfileInfo.Pdp.ServiceType);
+ *type = _profile_convert_to_connection_cellular_service_type(profile_info->profile_info.pdp.service_type);
if (*type == CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN) {
CONNECTION_LOG(CONNECTION_ERROR, "Invalid service type Passed"); //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
}
- *apn = g_strdup(profile_info->ProfileInfo.Pdp.Apn);
+ *apn = g_strdup(profile_info->profile_info.pdp.apn);
if (*apn == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- switch (profile_info->ProfileInfo.Pdp.AuthInfo.AuthType) {
+ switch (profile_info->profile_info.pdp.auth_info.auth_type) {
//LCOV_EXCL_START
case NET_PDP_AUTH_NONE:
*type = CONNECTION_CELLULAR_AUTH_TYPE_NONE;
//LCOV_EXCL_STOP
}
- *user_name = g_strdup(profile_info->ProfileInfo.Pdp.AuthInfo.UserName);
+ *user_name = g_strdup(profile_info->profile_info.pdp.auth_info.user_name);
if (*user_name == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
}
- *password = g_strdup(profile_info->ProfileInfo.Pdp.AuthInfo.Password);
+ *password = g_strdup(profile_info->profile_info.pdp.auth_info.password);
if (*password == NULL) {
g_free(*user_name); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- *home_url = g_strdup(profile_info->ProfileInfo.Pdp.HomeURL);
+ *home_url = g_strdup(profile_info->profile_info.pdp.home_url);
if (*home_url == NULL) {
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- switch (profile_info->ProfileInfo.Pdp.PdnType) {
+ switch (profile_info->profile_info.pdp.pdn_type) {
//LCOV_EXCL_START
case NET_PDN_TYPE_UNKNOWN:
*type = CONNECTION_CELLULAR_PDN_TYPE_UNKNOWN;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- switch (profile_info->ProfileInfo.Pdp.RoamPdnType) {
+ switch (profile_info->profile_info.pdp.roam_pdn_type) {
//LCOV_EXCL_START
case NET_PDN_TYPE_UNKNOWN:
*type = CONNECTION_CELLULAR_PDN_TYPE_UNKNOWN;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if (profile_info->ProfileInfo.Pdp.Roaming)
+ if (profile_info->profile_info.pdp.roaming)
*is_roaming = true;
else
*is_roaming = false;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if (profile_info->ProfileInfo.Pdp.Hidden)
+ if (profile_info->profile_info.pdp.hidden)
*is_hidden = true;
else
*is_hidden = false;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if (profile_info->ProfileInfo.Pdp.Editable)
+ if (profile_info->profile_info.pdp.editable)
*is_editable = true;
else
*is_editable = false;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- if (profile_info->ProfileInfo.Pdp.DefaultConn)
+ if (profile_info->profile_info.pdp.default_conn)
*is_default = true;
else
*is_default = false;
switch (service_type) {
//LCOV_EXCL_START
case CONNECTION_CELLULAR_SERVICE_TYPE_INTERNET:
- profile_info->ProfileInfo.Pdp.ServiceType = NET_SERVICE_INTERNET;
+ profile_info->profile_info.pdp.service_type = NET_SERVICE_INTERNET;
break;
case CONNECTION_CELLULAR_SERVICE_TYPE_MMS:
- profile_info->ProfileInfo.Pdp.ServiceType = NET_SERVICE_MMS;
+ profile_info->profile_info.pdp.service_type = NET_SERVICE_MMS;
break;
case CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_INTERNET:
- profile_info->ProfileInfo.Pdp.ServiceType = NET_SERVICE_PREPAID_INTERNET;
+ profile_info->profile_info.pdp.service_type = NET_SERVICE_PREPAID_INTERNET;
break;
case CONNECTION_CELLULAR_SERVICE_TYPE_PREPAID_MMS:
- profile_info->ProfileInfo.Pdp.ServiceType = NET_SERVICE_PREPAID_MMS;
+ profile_info->profile_info.pdp.service_type = NET_SERVICE_PREPAID_MMS;
break;
case CONNECTION_CELLULAR_SERVICE_TYPE_TETHERING:
- profile_info->ProfileInfo.Pdp.ServiceType = NET_SERVICE_TETHERING;
+ profile_info->profile_info.pdp.service_type = NET_SERVICE_TETHERING;
break;
case CONNECTION_CELLULAR_SERVICE_TYPE_APPLICATION:
- profile_info->ProfileInfo.Pdp.ServiceType = NET_SERVICE_APPLICATION;
+ profile_info->profile_info.pdp.service_type = NET_SERVICE_APPLICATION;
break;
case CONNECTION_CELLULAR_SERVICE_TYPE_UNKNOWN:
default:
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- g_strlcpy(profile_info->ProfileInfo.Pdp.Apn, apn, NET_PDP_APN_LEN_MAX+1);
+ g_strlcpy(profile_info->profile_info.pdp.apn, apn, NET_PDP_APN_LEN_MAX+1);
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
switch (type) {
//LCOV_EXCL_START
case CONNECTION_CELLULAR_AUTH_TYPE_NONE:
- profile_info->ProfileInfo.Pdp.AuthInfo.AuthType = NET_PDP_AUTH_NONE;
+ profile_info->profile_info.pdp.auth_info.auth_type = NET_PDP_AUTH_NONE;
break;
case CONNECTION_CELLULAR_AUTH_TYPE_PAP:
- profile_info->ProfileInfo.Pdp.AuthInfo.AuthType = NET_PDP_AUTH_PAP;
+ profile_info->profile_info.pdp.auth_info.auth_type = NET_PDP_AUTH_PAP;
break;
case CONNECTION_CELLULAR_AUTH_TYPE_CHAP:
- profile_info->ProfileInfo.Pdp.AuthInfo.AuthType = NET_PDP_AUTH_CHAP;
+ profile_info->profile_info.pdp.auth_info.auth_type = NET_PDP_AUTH_CHAP;
break;
default:
CONN_UNLOCK;
//LCOV_EXCL_STOP
}
- g_strlcpy(profile_info->ProfileInfo.Pdp.AuthInfo.UserName, user_name, NET_PDP_AUTH_USERNAME_LEN_MAX+1);
- g_strlcpy(profile_info->ProfileInfo.Pdp.AuthInfo.Password, password, NET_PDP_AUTH_PASSWORD_LEN_MAX+1);
+ g_strlcpy(profile_info->profile_info.pdp.auth_info.user_name, user_name, NET_PDP_AUTH_USERNAME_LEN_MAX+1);
+ g_strlcpy(profile_info->profile_info.pdp.auth_info.password, password, NET_PDP_AUTH_PASSWORD_LEN_MAX+1);
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
return CONNECTION_ERROR_INVALID_PARAMETER;
}
- g_strlcpy(profile_info->ProfileInfo.Pdp.HomeURL, home_url, NET_HOME_URL_LEN_MAX);
+ g_strlcpy(profile_info->profile_info.pdp.home_url, home_url, NET_HOME_URL_LEN_MAX);
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
switch (type) {
//LCOV_EXCL_START
case CONNECTION_CELLULAR_PDN_TYPE_IPV4:
- profile_info->ProfileInfo.Pdp.PdnType = NET_PDN_TYPE_IPV4;
+ profile_info->profile_info.pdp.pdn_type = NET_PDN_TYPE_IPV4;
break;
case CONNECTION_CELLULAR_PDN_TYPE_IPV6:
- profile_info->ProfileInfo.Pdp.PdnType = NET_PDN_TYPE_IPV6;
+ profile_info->profile_info.pdp.pdn_type = NET_PDN_TYPE_IPV6;
break;
case CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6:
- profile_info->ProfileInfo.Pdp.PdnType = NET_PDN_TYPE_IPV4_IPV6;
+ profile_info->profile_info.pdp.pdn_type = NET_PDN_TYPE_IPV4_IPV6;
CONNECTION_LOG(CONNECTION_WARN, "DEPRECATION WARNINIG: CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6 " \
"from next release. Use CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 instead");
break;
case CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6:
- profile_info->ProfileInfo.Pdp.PdnType = NET_PDN_TYPE_IPV4_IPV6;
+ profile_info->profile_info.pdp.pdn_type = NET_PDN_TYPE_IPV4_IPV6;
break;
default:
CONN_UNLOCK;
switch (type) {
//LCOV_EXCL_START
case CONNECTION_CELLULAR_PDN_TYPE_IPV4:
- profile_info->ProfileInfo.Pdp.RoamPdnType = NET_PDN_TYPE_IPV4;
+ profile_info->profile_info.pdp.roam_pdn_type = NET_PDN_TYPE_IPV4;
break;
case CONNECTION_CELLULAR_PDN_TYPE_IPV6:
- profile_info->ProfileInfo.Pdp.RoamPdnType = NET_PDN_TYPE_IPV6;
+ profile_info->profile_info.pdp.roam_pdn_type = NET_PDN_TYPE_IPV6;
break;
case CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6:
- profile_info->ProfileInfo.Pdp.RoamPdnType = NET_PDN_TYPE_IPV4_IPV6;
+ profile_info->profile_info.pdp.roam_pdn_type = NET_PDN_TYPE_IPV4_IPV6;
CONNECTION_LOG(CONNECTION_WARN, "DEPRECATION WARNINIG: CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPv6 " \
"from next release. Use CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6 instead");
break;
case CONNECTION_CELLULAR_PDN_TYPE_IPV4_IPV6:
- profile_info->ProfileInfo.Pdp.RoamPdnType = NET_PDN_TYPE_IPV4_IPV6;
+ profile_info->profile_info.pdp.roam_pdn_type = NET_PDN_TYPE_IPV4_IPV6;
break;
default:
CONN_UNLOCK;
}
net_profile_info_t *profile_info = profile;
- *state = _profile_convert_to_cp_state(profile_info->ProfileState6);
+ *state = _profile_convert_to_cp_state(profile_info->profile_state6);
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4) {
- profileType = &net_info->DnsConfigType;
- net_info->DnsAddr[0].Data.Ipv4.s_addr = 0;
- net_info->DnsAddr[1].Data.Ipv4.s_addr = 0;
+ profileType = &net_info->dns_config_type;
+ net_info->dns_addr[0].data.Ipv4.s_addr = 0;
+ net_info->dns_addr[1].data.Ipv4.s_addr = 0;
*profileType = type;
} else {
- profileType6 = &net_info->DnsConfigType6;
- inet_pton(AF_INET6, "::", &net_info->DnsAddr6[0].Data.Ipv6);
- inet_pton(AF_INET6, "::", &net_info->DnsAddr6[1].Data.Ipv6);
+ profileType6 = &net_info->dns_config_type6;
+ inet_pton(AF_INET6, "::", &net_info->dns_addr6[0].data.Ipv6);
+ inet_pton(AF_INET6, "::", &net_info->dns_addr6[1].data.Ipv6);
*profileType6 = type;
}
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4)
- profileType = net_info->DnsConfigType;
+ profileType = net_info->dns_config_type;
else
- profileType = net_info->DnsConfigType6;
+ profileType = net_info->dns_config_type6;
switch (profileType) {
case NET_DNS_CONFIG_TYPE_STATIC:
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4) {
- net_info->PrefixLen = prefix_len;
- net_info->SubnetMask.Data.Ipv4.s_addr = __profile_convert_prefix_len_to_netmask(prefix_len);
+ net_info->prefix_len = prefix_len;
+ net_info->subnet_mask.data.Ipv4.s_addr = __profile_convert_prefix_len_to_netmask(prefix_len);
} else
- net_info->PrefixLen6 = prefix_len;
+ net_info->prefix_len6 = prefix_len;
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
}
if (address_family == CONNECTION_ADDRESS_FAMILY_IPV4)
- *prefix_len = net_info->PrefixLen;
+ *prefix_len = net_info->prefix_len;
else if (address_family == CONNECTION_ADDRESS_FAMILY_IPV6)
- *prefix_len = net_info->PrefixLen6;
+ *prefix_len = net_info->prefix_len6;
CONN_UNLOCK;
return CONNECTION_ERROR_NONE;
goto out;
}
- int ret = _connection_libnet_ethernet_eap_enabled(net_info->ProfileName, enabled);
+ int ret = _connection_libnet_ethernet_eap_enabled(net_info->profile_name, enabled);
if (ret != CONNECTION_ERROR_NONE) {
CONNECTION_LOG(CONNECTION_ERROR, "Failed to get EAP over Ethernet enabled status."); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
return CONNECTION_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
}
- int ret = _connection_libnet_enable_ethernet_eap(enable, net_info->ProfileName);
+ int ret = _connection_libnet_enable_ethernet_eap(enable, net_info->profile_name);
if (ret != CONNECTION_ERROR_NONE) {
CONNECTION_LOG(CONNECTION_ERROR, "Failed to enable EAP over ethernet"); //LCOV_EXCL_LINE
CONN_UNLOCK; //LCOV_EXCL_LINE
return;
}
- switch (event_cb->Event) {
+ switch (event_cb->event) {
case NET_EVENT_OPEN_RSP:
is_requested = true;
/* fall through */
case NET_ERR_ACTIVE_CONNECTION_EXISTS:
CONNECTION_LOG(CONNECTION_INFO, "Successfully open connection");
- __libnet_state_changed_cb(event_cb->ProfileName, CONNECTION_PROFILE_STATE_CONNECTED);
+ __libnet_state_changed_cb(event_cb->profile_name, CONNECTION_PROFILE_STATE_CONNECTED);
CONN_UNLOCK;
return;
default:
__libnet_convert_cp_error_type_to_string(result));
}
- __libnet_state_changed_cb(event_cb->ProfileName, CONNECTION_PROFILE_STATE_DISCONNECTED);
+ __libnet_state_changed_cb(event_cb->profile_name, CONNECTION_PROFILE_STATE_DISCONNECTED);
break;
case NET_EVENT_CLOSE_RSP:
case NET_ERR_NONE:
CONNECTION_LOG(CONNECTION_INFO, "Successfully closed connection");
- __libnet_state_changed_cb(event_cb->ProfileName, CONNECTION_PROFILE_STATE_DISCONNECTED);
+ __libnet_state_changed_cb(event_cb->profile_name, CONNECTION_PROFILE_STATE_DISCONNECTED);
CONN_UNLOCK;
return;
default:
case NET_EVENT_NET_STATE_IND:
CONNECTION_LOG(CONNECTION_INFO, "State changed IND");
- if (event_cb->Datalength != sizeof(net_state_type_t)) {
+ if (event_cb->datalength != sizeof(net_state_type_t)) {
CONN_UNLOCK;
return;
}
- net_state_type_t *profile_state = (net_state_type_t *)event_cb->Data;
+ net_state_type_t *profile_state = (net_state_type_t *)event_cb->data;
connection_profile_state_e cp_state = _profile_convert_to_cp_state(*profile_state);
CONNECTION_LOG(CONNECTION_INFO, "state: %s", __libnet_convert_cp_state_to_string(cp_state));
- SECURE_CONNECTION_LOG(CONNECTION_INFO, "profile name: %s", event_cb->ProfileName);
+ SECURE_CONNECTION_LOG(CONNECTION_INFO, "profile name: %s", event_cb->profile_name);
- __libnet_state_changed_cb(event_cb->ProfileName, cp_state);
+ __libnet_state_changed_cb(event_cb->profile_name, cp_state);
break;
case NET_EVENT_CELLULAR_SET_DEFAULT_RSP:
break;
case NET_EVENT_NETWORK_TYPE_CHANGED:
CONNECTION_LOG(CONNECTION_INFO, "Got Network Type Changed Indication");
- int *state = (int *) event_cb->Data;
+ int *state = (int *) event_cb->data;
if (conn_handle->type_changed_callback) {
int type = CONNECTION_TYPE_DISCONNECTED;
if (conn_handle->ip_changed_callback) {
char *ipv4_addr = NULL;
char *ipv6_addr = NULL;
- char *addr = (char *)event_cb->Data;
+ char *addr = (char *)event_cb->data;
ipv4_addr = g_strdup(addr);
ipv6_addr = vconf_get_str(VCONFKEY_NETWORK_IP6);
if (conn_handle->ip_changed_callback) {
char *ipv4_addr = NULL;
char *ipv6_addr = NULL;
- char *addr = (char *)event_cb->Data;
+ char *addr = (char *)event_cb->data;
ipv6_addr = g_strdup(addr);
ipv4_addr = vconf_get_str(VCONFKEY_NETWORK_IP);
break;
case NET_EVENT_PROXY_ADDRESS_CHANGED:
CONNECTION_LOG(CONNECTION_INFO, "Got Proxy Changed Indication");
- char *proxy_addr = (char *)event_cb->Data;
+ char *proxy_addr = (char *)event_cb->data;
if (conn_handle->proxy_changed_callback) {
conn_handle->proxy_changed_callback(proxy_addr, NULL,
case NET_EVENT_INTERNET_ONLINE_IND:
case NET_EVENT_INTERNET_OFFLINE_IND:
CONNECTION_LOG(CONNECTION_INFO, "Got Internet State Changed Indication: %s",
- event_cb->Event == NET_EVENT_INTERNET_ONLINE_IND ? "Online" : "Offline");
- net_device_t *device_type = (net_device_t *) event_cb->Data;
+ event_cb->event == NET_EVENT_INTERNET_ONLINE_IND ? "Online" : "Offline");
+ net_device_t *device_type = (net_device_t *) event_cb->data;
if (conn_handle->internet_state_changed_callback) {
net_profile_info_t active_profile;
rv = net_get_active_net_info(conn_handle->network_info_handle, &active_profile);
- if (rv == NET_ERR_NO_SERVICE && event_cb->Event == NET_EVENT_INTERNET_OFFLINE_IND) {
+ if (rv == NET_ERR_NO_SERVICE && event_cb->event == NET_EVENT_INTERNET_OFFLINE_IND) {
conn_handle->internet_state_changed_callback(CONNECTION_INTERNET_STATE_OFFLINE,
conn_handle->internet_state_changed_user_data); //LCOV_EXCL_LINE
break;
break; //LCOV_EXCL_LINE
}
- if (event_cb->Event == NET_EVENT_INTERNET_ONLINE_IND) {
- if (active_profile.ProfileState == NET_STATE_TYPE_ONLINE &&
+ if (event_cb->event == NET_EVENT_INTERNET_ONLINE_IND) {
+ if (active_profile.profile_state == NET_STATE_TYPE_ONLINE &&
active_profile.profile_type == *device_type)
conn_handle->internet_state_changed_callback(CONNECTION_INTERNET_STATE_ONLINE,
conn_handle->internet_state_changed_user_data);
} else {
- if (active_profile.ProfileState != NET_STATE_TYPE_ONLINE)
+ if (active_profile.profile_state != NET_STATE_TYPE_ONLINE)
conn_handle->internet_state_changed_callback(CONNECTION_INTERNET_STATE_OFFLINE,
conn_handle->internet_state_changed_user_data);
}
int i = 0;
for (; i < profile_list->count; i++) {
- if (profile_list->profiles[i].ProfileState == NET_STATE_TYPE_ONLINE ||
- profile_list->profiles[i].ProfileState == NET_STATE_TYPE_READY)
+ if (profile_list->profiles[i].profile_state == NET_STATE_TYPE_ONLINE ||
+ profile_list->profiles[i].profile_state == NET_STATE_TYPE_READY)
count++;
}
int i = 0;
for (; i < source->count; i++) {
- if (source->profiles[i].ProfileState == NET_STATE_TYPE_ONLINE ||
- source->profiles[i].ProfileState == NET_STATE_TYPE_READY) {
+ if (source->profiles[i].profile_state == NET_STATE_TYPE_ONLINE ||
+ source->profiles[i].profile_state == NET_STATE_TYPE_READY) {
memcpy(*dest, &source->profiles[i], sizeof(net_profile_info_t));
(*dest)++;
}
for (; i < profile_list->count; i++) {
if (profile_list->profiles[i].profile_type == NET_DEVICE_CELLULAR) {
- if (profile_list->profiles[i].ProfileInfo.Pdp.DefaultConn == TRUE)
+ if (profile_list->profiles[i].profile_info.pdp.default_conn == TRUE)
count++;
}
}
for (; i < source->count; i++) {
if (source->profiles[i].profile_type == NET_DEVICE_CELLULAR) {
- if (source->profiles[i].ProfileInfo.Pdp.DefaultConn == TRUE) {
+ if (source->profiles[i].profile_info.pdp.default_conn == TRUE) {
memcpy(*dest, &source->profiles[i], sizeof(net_profile_info_t));
(*dest)++;
}
return CONNECTION_ERROR_NONE;
}
- switch (ethernet_profiles.profiles->ProfileState) {
+ switch (ethernet_profiles.profiles->profile_state) {
case NET_STATE_TYPE_ONLINE:
case NET_STATE_TYPE_READY:
*state = CONNECTION_ETHERNET_STATE_CONNECTED;
//LCOV_EXCL_START
for (; i < bluetooth_profiles.count; i++) {
- switch (bluetooth_profiles.profiles[i].ProfileState) {
+ switch (bluetooth_profiles.profiles[i].profile_state) {
case NET_STATE_TYPE_ONLINE:
case NET_STATE_TYPE_READY:
*state = CONNECTION_BT_STATE_CONNECTED;
if (profile_info->profile_type == NET_DEVICE_MESH)
rv = net_open_mesh_connection_with_profile(conn_handle->network_info_handle, //LCOV_EXCL_LINE
- profile_info->ProfileName);
+ profile_info->profile_name);
else
rv = net_open_connection_with_profile(conn_handle->network_info_handle,
- profile_info->ProfileName);
+ profile_info->profile_name);
if (rv == NET_ERR_ACCESS_DENIED)
return CONNECTION_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
#endif
for (i = 0; i < cellular_profiles.count; i++)
- if (cellular_profiles.profiles[i].ProfileInfo.Pdp.ServiceType == service_type)
+ if (cellular_profiles.profiles[i].profile_info.pdp.service_type == service_type)
#if defined TIZEN_DUALSIM_ENABLE
if (g_str_has_suffix(
- cellular_profiles.profiles[i].ProfileInfo.Pdp.PSModemPath,
+ cellular_profiles.profiles[i].profile_info.pdp.ps_modem_path,
subscriber_id) == TRUE)
#endif
break;
memcpy(*profile, &cellular_profiles.profiles[i], sizeof(net_profile_info_t));
- if (cellular_profiles.profiles[i].ProfileInfo.Pdp.DefaultConn)
+ if (cellular_profiles.profiles[i].profile_info.pdp.default_conn)
goto done;
//LCOV_EXCL_START
if (i == j)
continue;
- if (cellular_profiles.profiles[j].ProfileInfo.Pdp.ServiceType != service_type)
+ if (cellular_profiles.profiles[j].profile_info.pdp.service_type != service_type)
continue;
- if (cellular_profiles.profiles[j].ProfileInfo.Pdp.DefaultConn) {
+ if (cellular_profiles.profiles[j].profile_info.pdp.default_conn) {
memcpy(*profile, &cellular_profiles.profiles[j], sizeof(net_profile_info_t));
goto done;
}
net_profile_info_t *profile_info = profile;
connection_cellular_service_type_e service_type;
- service_type = _profile_convert_to_connection_cellular_service_type(profile_info->ProfileInfo.Pdp.ServiceType);
+ service_type = _profile_convert_to_connection_cellular_service_type(profile_info->profile_info.pdp.service_type);
if (service_type != type)
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
rv = net_set_default_cellular_service_profile(conn_handle->network_info_handle,
- profile_info->ProfileName);
+ profile_info->profile_name);
if (rv == NET_ERR_ACCESS_DENIED) {
CONNECTION_LOG(CONNECTION_ERROR, "Access denied"); //LCOV_EXCL_LINE
return CONNECTION_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
net_profile_info_t *profile_info = profile;
connection_cellular_service_type_e service_type;
- service_type = _profile_convert_to_connection_cellular_service_type(profile_info->ProfileInfo.Pdp.ServiceType);
+ service_type = _profile_convert_to_connection_cellular_service_type(profile_info->profile_info.pdp.service_type);
if (service_type != type)
return CONNECTION_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
rv = net_set_default_cellular_service_profile_async(conn_handle->network_info_handle,
- profile_info->ProfileName);
+ profile_info->profile_name);
if (rv == NET_ERR_ACCESS_DENIED) {
return CONNECTION_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
} else if (rv != NET_ERR_NONE)
net_profile_info_t *profile_info = profile;
if (profile_info->profile_type == NET_DEVICE_MESH)
- rv = net_close_mesh_connection(conn_handle->network_info_handle, profile_info->ProfileName); //LCOV_EXCL_LINE
+ rv = net_close_mesh_connection(conn_handle->network_info_handle, profile_info->profile_name); //LCOV_EXCL_LINE
else
- rv = net_close_connection(conn_handle->network_info_handle, profile_info->ProfileName);
+ rv = net_close_connection(conn_handle->network_info_handle, profile_info->profile_name);
if (rv == NET_ERR_ACCESS_DENIED)
return CONNECTION_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
connection_profile_state_changed_cb callback, void *user_data)
{
net_profile_info_t *profile_info = profile;
- char *profile_name = g_strdup(profile_info->ProfileName);
+ char *profile_name = g_strdup(profile_info->profile_name);
struct _profile_cb_s *profile_cb_info = g_try_malloc0(sizeof(struct _profile_cb_s));
if (profile_cb_info == NULL) {
profile_cb_info->callback = callback;
profile_cb_info->user_data = user_data;
- profile_cb_info->state = _profile_convert_to_cp_state(profile_info->ProfileState);
+ profile_cb_info->state = _profile_convert_to_cp_state(profile_info->profile_state);
g_hash_table_replace(profile_cb_table, profile_name, profile_cb_info);
{
net_profile_info_t *profile_info = profile;
- if (g_hash_table_remove(profile_cb_table, profile_info->ProfileName) == TRUE)
+ if (g_hash_table_remove(profile_cb_table, profile_info->profile_name) == TRUE)
return true;
return false; //LCOV_EXCL_LINE
return CONNECTION_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
}
- g_strlcpy(profile_info->ProfileInfo.Pdp.PSModemPath, modem_path,
+ g_strlcpy(profile_info->profile_info.pdp.ps_modem_path, modem_path,
NET_PROFILE_NAME_LEN_MAX);
g_free(modem_path);
net_profile_info_t *profile_info = profile;
rv = net_save_ethernet_eap_config(conn_handle->network_info_handle,
- &profile_info->ProfileInfo.Ethernet.net_info);
+ &profile_info->profile_info.ethernet.net_info);
if (rv == NET_ERR_ACCESS_DENIED) {
CONNECTION_LOG(CONNECTION_ERROR, "Access denied");
} else
return -1;
- if (test_get_user_string("Input Apn - (Enter for skip) :", input_str1, 100)) {
+ if (test_get_user_string("Input apn - (Enter for skip) :", input_str1, 100)) {
g_strstrip(input_str1);
rv = connection_profile_set_cellular_apn(profile, input_str1);
if (rv != CONNECTION_ERROR_NONE)
return -1;
}
- if (test_get_user_string("Input HomeURL - (Enter for skip) :", input_str1, 100)) {
+ if (test_get_user_string("Input home_url - (Enter for skip) :", input_str1, 100)) {
g_strstrip(input_str1);
rv = connection_profile_set_cellular_home_url(profile, input_str1);
if (rv != CONNECTION_ERROR_NONE)
return -1;
}
- if (test_get_user_int("Input AuthType(0:NONE 1:PAP 2:CHAP) - (Enter for skip) :", &input_int)) {
+ if (test_get_user_int("Input auth_type(0:NONE 1:PAP 2:CHAP) - (Enter for skip) :", &input_int)) {
switch (input_int) {
case 0:
rv = connection_profile_set_cellular_auth_info(profile,
}
}
- if (test_get_user_int("Input PdnType(1:IPv4 2:IPv6 3:IPv4v6) - (Enter for skip) :", &input_int)) {
+ if (test_get_user_int("Input pdn_type(1:IPv4 2:IPv6 3:IPv4v6) - (Enter for skip) :", &input_int)) {
switch (input_int) {
case 1:
rv = connection_profile_set_cellular_pdn_type(profile, CONNECTION_CELLULAR_PDN_TYPE_IPV4);
return -1;
}
- if (test_get_user_int("Input RoamPdnType(1:IPv4 2:IPv6 3:IPv4v6) - (Enter for skip) :", &input_int)) {
+ if (test_get_user_int("Input roam_pdn_type(1:IPv4 2:IPv6 3:IPv4v6) - (Enter for skip) :", &input_int)) {
switch (input_int) {
case 1:
rv = connection_profile_set_cellular_roam_pdn_type(profile, CONNECTION_CELLULAR_PDN_TYPE_IPV4);
connection_profile_h profile;
char input_str[100] = {0,};
- if (test_get_user_string("Input Keyword - (Enter for skip) :", input_str, 100) == false)
+ if (test_get_user_string("Input keyword - (Enter for skip) :", input_str, 100) == false)
return -1;
g_strstrip(input_str);
printf("Profile Type : Ethernet\n");
break;
case CONNECTION_PROFILE_TYPE_BT:
- printf("Profile Type : Bluetooth\n");
+ printf("Profile Type : bluetooth\n");
break;
default:
{
printf("Profile Type : Ethernet\n");
break;
case CONNECTION_PROFILE_TYPE_BT:
- printf("Profile Type : Bluetooth\n");
+ printf("Profile Type : bluetooth\n");
break;
default:
{
rv = connection_get_bt_state(connection, &bt_state);
if (rv != CONNECTION_ERROR_NONE) {
- printf("Fail to get Bluetooth state [%s]\n", test_print_error(rv));
+ printf("Fail to get bluetooth state [%s]\n", test_print_error(rv));
return -1;
}
- printf("Retval = [%s], Bluetooth state [%d]\n", test_print_error(rv), bt_state);
+ printf("Retval = [%s], bluetooth state [%d]\n", test_print_error(rv), bt_state);
return 1;
}
char a[100];
memset(a, '\0', 100);
- printf("Event received from stdin\n");
+ printf("event received from stdin\n");
rv = read(0, a, 100);
printf("p - Reset WiFi data call statistics\n");
printf("q - Add new route\n");
printf("r - Remove a route\n");
- printf("s - Get Bluetooth state\n");
+ printf("s - Get bluetooth state\n");
printf("t - Get profile id\n");
printf("u - Reset profile\n");
printf("v - Get all cellular default profiles\n");
net_dev_info_t *net_info = NULL;
memset(ProfInfo, 0, sizeof(net_profile_info_t));
- ProfInfo->Favourite = (char)FALSE;
+ ProfInfo->favourite = (char)FALSE;
if (profile_type == NET_DEVICE_WIFI) {
ProfInfo->profile_type = NET_DEVICE_WIFI;
- ProfInfo->ProfileInfo.Wlan.Strength = 0;
- ProfInfo->ProfileInfo.Wlan.frequency = 0;
- ProfInfo->ProfileInfo.Wlan.max_rate = 0;
- ProfInfo->ProfileInfo.Wlan.wlan_mode = 0;
- ProfInfo->ProfileInfo.Wlan.PassphraseRequired = FALSE;
- ProfInfo->ProfileInfo.Wlan.security_info.sec_mode = 0;
- ProfInfo->ProfileInfo.Wlan.security_info.enc_mode = 0;
- ProfInfo->ProfileInfo.Wlan.security_info.wps_support = FALSE;
-
- net_info = &(ProfInfo->ProfileInfo.Wlan.net_info);
+ ProfInfo->profile_info.wlan.strength = 0;
+ ProfInfo->profile_info.wlan.frequency = 0;
+ ProfInfo->profile_info.wlan.max_rate = 0;
+ ProfInfo->profile_info.wlan.wlan_mode = 0;
+ ProfInfo->profile_info.wlan.passphrase_required = FALSE;
+ ProfInfo->profile_info.wlan.security_info.sec_mode = 0;
+ ProfInfo->profile_info.wlan.security_info.enc_mode = 0;
+ ProfInfo->profile_info.wlan.security_info.wps_support = FALSE;
+
+ net_info = &(ProfInfo->profile_info.wlan.net_info);
} else if (profile_type == NET_DEVICE_CELLULAR) {
ProfInfo->profile_type = NET_DEVICE_CELLULAR;
- ProfInfo->ProfileInfo.Pdp.ProtocolType = NET_PDP_TYPE_NONE;
- ProfInfo->ProfileInfo.Pdp.ServiceType = NET_SERVICE_UNKNOWN;
- ProfInfo->ProfileInfo.Pdp.PdnType = NET_PDN_TYPE_UNKNOWN;
- ProfInfo->ProfileInfo.Pdp.RoamPdnType = NET_PDN_TYPE_UNKNOWN;
- ProfInfo->ProfileInfo.Pdp.AuthInfo.AuthType = NET_PDP_AUTH_NONE;
- ProfInfo->ProfileInfo.Pdp.IsStatic = FALSE;
- ProfInfo->ProfileInfo.Pdp.Roaming = FALSE;
- ProfInfo->ProfileInfo.Pdp.SetupRequired = FALSE;
- ProfInfo->ProfileInfo.Pdp.Hidden = FALSE;
- ProfInfo->ProfileInfo.Pdp.Editable = TRUE;
- ProfInfo->ProfileInfo.Pdp.DefaultConn = FALSE;
-
- net_info = &(ProfInfo->ProfileInfo.Pdp.net_info);
+ ProfInfo->profile_info.pdp.protocol_type = NET_PDP_TYPE_NONE;
+ ProfInfo->profile_info.pdp.service_type = NET_SERVICE_UNKNOWN;
+ ProfInfo->profile_info.pdp.pdn_type = NET_PDN_TYPE_UNKNOWN;
+ ProfInfo->profile_info.pdp.roam_pdn_type = NET_PDN_TYPE_UNKNOWN;
+ ProfInfo->profile_info.pdp.auth_info.auth_type = NET_PDP_AUTH_NONE;
+ ProfInfo->profile_info.pdp.is_static = FALSE;
+ ProfInfo->profile_info.pdp.roaming = FALSE;
+ ProfInfo->profile_info.pdp.setup_required = FALSE;
+ ProfInfo->profile_info.pdp.hidden = FALSE;
+ ProfInfo->profile_info.pdp.editable = TRUE;
+ ProfInfo->profile_info.pdp.default_conn = FALSE;
+
+ net_info = &(ProfInfo->profile_info.pdp.net_info);
} else if (profile_type == NET_DEVICE_ETHERNET) {
- net_info = &(ProfInfo->ProfileInfo.Ethernet.net_info);
+ net_info = &(ProfInfo->profile_info.ethernet.net_info);
} else if (profile_type == NET_DEVICE_BLUETOOTH) {
- net_info = &(ProfInfo->ProfileInfo.Bluetooth.net_info);
+ net_info = &(ProfInfo->profile_info.bluetooth.net_info);
} else if (profile_type == NET_DEVICE_MESH) {
ProfInfo->profile_type = NET_DEVICE_MESH;
- ProfInfo->ProfileInfo.Mesh.Strength = 0;
- ProfInfo->ProfileInfo.Mesh.frequency = 0;
- ProfInfo->ProfileInfo.Mesh.PassphraseRequired = FALSE;
- ProfInfo->ProfileInfo.Mesh.security_info.sec_mode = 0;
+ ProfInfo->profile_info.mesh.strength = 0;
+ ProfInfo->profile_info.mesh.frequency = 0;
+ ProfInfo->profile_info.mesh.passphrase_required = FALSE;
+ ProfInfo->profile_info.mesh.security_info.sec_mode = 0;
- net_info = &(ProfInfo->ProfileInfo.Mesh.net_info);
+ net_info = &(ProfInfo->profile_info.mesh.net_info);
}
if (net_info != NULL) {
- net_info->DnsCount = 0;
+ net_info->dns_count = 0;
for (i = 0; i < NET_DNS_ADDR_MAX; i++) {
- net_info->DnsAddr[i].Type = NET_ADDR_IPV4;
- net_info->DnsAddr[i].Data.Ipv4.s_addr = 0;
+ net_info->dns_addr[i].Type = NET_ADDR_IPV4;
+ net_info->dns_addr[i].data.Ipv4.s_addr = 0;
}
- net_info->IpConfigType = 0;
- net_info->IpAddr.Type = NET_ADDR_IPV4;
- net_info->IpAddr.Data.Ipv4.s_addr = 0;
- net_info->BNetmask = FALSE;
- net_info->SubnetMask.Type = NET_ADDR_IPV4;
- net_info->SubnetMask.Data.Ipv4.s_addr = 0;
- net_info->BDefGateway = FALSE;
- net_info->GatewayAddr.Type = NET_ADDR_IPV4;
- net_info->GatewayAddr.Data.Ipv4.s_addr = 0;
- net_info->BServerAddr = FALSE;
- net_info->ServerAddr.Type = NET_ADDR_IPV4;
- net_info->ServerAddr.Data.Ipv4.s_addr = 0;
-
- net_info->IpConfigType6 = 0;
- net_info->IpAddr6.Type = NET_ADDR_IPV6;
- inet_pton(AF_INET6, "::", &net_info->IpAddr6.Data.Ipv6);
- net_info->PrefixLen6 = 0;
- net_info->BDefGateway6 = FALSE;
- net_info->GatewayAddr6.Type = NET_ADDR_IPV6;
- inet_pton(AF_INET6, "::", &net_info->GatewayAddr6.Data.Ipv6);
-
- net_info->ProxyMethod = NET_PROXY_TYPE_UNKNOWN;
+ net_info->ip_config_type = 0;
+ net_info->ip_addr.Type = NET_ADDR_IPV4;
+ net_info->ip_addr.data.Ipv4.s_addr = 0;
+ net_info->b_netmask = FALSE;
+ net_info->subnet_mask.Type = NET_ADDR_IPV4;
+ net_info->subnet_mask.data.Ipv4.s_addr = 0;
+ net_info->b_def_gateway = FALSE;
+ net_info->gateway_addr.Type = NET_ADDR_IPV4;
+ net_info->gateway_addr.data.Ipv4.s_addr = 0;
+ net_info->b_server_addr = FALSE;
+ net_info->server_addr.Type = NET_ADDR_IPV4;
+ net_info->server_addr.data.Ipv4.s_addr = 0;
+
+ net_info->ip_config_type6 = 0;
+ net_info->ip_addr6.Type = NET_ADDR_IPV6;
+ inet_pton(AF_INET6, "::", &net_info->ip_addr6.data.Ipv6);
+ net_info->prefix_len6 = 0;
+ net_info->b_def_gateway6 = FALSE;
+ net_info->gateway_addr6.Type = NET_ADDR_IPV6;
+ inet_pton(AF_INET6, "::", &net_info->gateway_addr6.data.Ipv6);
+
+ net_info->proxy_method = NET_PROXY_TYPE_UNKNOWN;
}
}
char ipString[NETPM_IPV4_STR_LEN_MAX+1];
char *ipToken[4];
- ipValue = (unsigned char *)&(ipAddr->Data.Ipv4.s_addr);
+ ipValue = (unsigned char *)&(ipAddr->data.Ipv4.s_addr);
g_strlcpy(ipString, ip, NETPM_IPV4_STR_LEN_MAX+1);
__net_init_profile_info(NET_DEVICE_CELLULAR, &ProfInfo);
ProfInfo.profile_type = NET_DEVICE_CELLULAR;
- g_strlcpy(ProfInfo.ProfileName, cellular_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
+ g_strlcpy(ProfInfo.profile_name, cellular_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
- g_strlcpy(ProfInfo.ProfileInfo.Pdp.net_info.ProfileName,
+ g_strlcpy(ProfInfo.profile_info.pdp.net_info.profile_name,
cellular_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
- g_strlcpy(ProfInfo.ProfileInfo.Pdp.PSModemPath,
+ g_strlcpy(ProfInfo.profile_info.pdp.ps_modem_path,
cellular_profile[i].name, NET_PROFILE_NAME_LEN_MAX);
- ProfInfo.ProfileState = cellular_profile[i].state;
- ProfInfo.ProfileState6 = cellular_profile[i].state6;
+ ProfInfo.profile_state = cellular_profile[i].state;
+ ProfInfo.profile_state6 = cellular_profile[i].state6;
- net_dev_info_t *net_info = &(ProfInfo.ProfileInfo.Pdp.net_info);
+ net_dev_info_t *net_info = &(ProfInfo.profile_info.pdp.net_info);
if (cellular_profile[i].interface)
- g_strlcpy(net_info->DevName, cellular_profile[i].interface, NET_MAX_DEVICE_NAME_LEN);
+ g_strlcpy(net_info->dev_name, cellular_profile[i].interface, NET_MAX_DEVICE_NAME_LEN);
if (cellular_profile[i].address)
- g_strlcpy(net_info->MacAddr, cellular_profile[i].address, NET_MAX_MAC_ADDR_LEN);
+ g_strlcpy(net_info->mac_addr, cellular_profile[i].address, NET_MAX_MAC_ADDR_LEN);
if (cellular_profile[i].ipv4_method)
- net_info->IpConfigType = cellular_profile[i].ipv4_method;
+ net_info->ip_config_type = cellular_profile[i].ipv4_method;
if (cellular_profile[i].ipv4_address)
- __net_extract_ip(cellular_profile[i].ipv4_address, &net_info->IpAddr);
+ __net_extract_ip(cellular_profile[i].ipv4_address, &net_info->ip_addr);
if (cellular_profile[i].ipv4_netmask) {
- __net_extract_ip(cellular_profile[i].ipv4_netmask, &net_info->SubnetMask);
- net_info->PrefixLen = __net_get_prefix_len(cellular_profile[i].ipv4_netmask);
- net_info->BNetmask = TRUE;
+ __net_extract_ip(cellular_profile[i].ipv4_netmask, &net_info->subnet_mask);
+ net_info->prefix_len = __net_get_prefix_len(cellular_profile[i].ipv4_netmask);
+ net_info->b_netmask = TRUE;
}
if (cellular_profile[i].ipv4_gateway) {
- __net_extract_ip(cellular_profile[i].ipv4_gateway, &net_info->GatewayAddr);
- net_info->BDefGateway = TRUE;
+ __net_extract_ip(cellular_profile[i].ipv4_gateway, &net_info->gateway_addr);
+ net_info->b_def_gateway = TRUE;
}
if (cellular_profile[i].ipv6_method)
- net_info->IpConfigType6 = cellular_profile[i].ipv6_method;
+ net_info->ip_config_type6 = cellular_profile[i].ipv6_method;
- ProfInfo.ProfileInfo.Pdp.ServiceType = cellular_profile[i].service_type;
+ ProfInfo.profile_info.pdp.service_type = cellular_profile[i].service_type;
if (cellular_profile[i].apn)
- g_strlcpy(ProfInfo.ProfileInfo.Pdp.Apn, cellular_profile[i].apn, NET_PDP_APN_LEN_MAX);
+ g_strlcpy(ProfInfo.profile_info.pdp.apn, cellular_profile[i].apn, NET_PDP_APN_LEN_MAX);
if (cellular_profile[i].proxy_addr)
- g_strlcpy(ProfInfo.ProfileInfo.Pdp.net_info.ProxyAddr,
+ g_strlcpy(ProfInfo.profile_info.pdp.net_info.proxy_addr,
cellular_profile[i].proxy_addr, NET_PROXY_LEN_MAX);
if (cellular_profile[i].home_url)
- g_strlcpy(ProfInfo.ProfileInfo.Pdp.HomeURL, cellular_profile[i].home_url, NET_HOME_URL_LEN_MAX);
+ g_strlcpy(ProfInfo.profile_info.pdp.home_url, cellular_profile[i].home_url, NET_HOME_URL_LEN_MAX);
if (cellular_profile[i].profile_name)
- g_strlcpy(ProfInfo.ProfileInfo.Pdp.Keyword, cellular_profile[i].profile_name, NET_PDP_APN_LEN_MAX);
+ g_strlcpy(ProfInfo.profile_info.pdp.keyword, cellular_profile[i].profile_name, NET_PDP_APN_LEN_MAX);
- ProfInfo.ProfileInfo.Pdp.Hidden = cellular_profile[i].hidden;
- ProfInfo.ProfileInfo.Pdp.Editable = cellular_profile[i].editable;
- ProfInfo.ProfileInfo.Pdp.DefaultConn = cellular_profile[i].default_conn;
+ ProfInfo.profile_info.pdp.hidden = cellular_profile[i].hidden;
+ ProfInfo.profile_info.pdp.editable = cellular_profile[i].editable;
+ ProfInfo.profile_info.pdp.default_conn = cellular_profile[i].default_conn;
ProfilePtr = (net_profile_info_t *)realloc(ProfilePtr, (i + 1) * sizeof(net_profile_info_t));
memcpy(ProfilePtr + i, &ProfInfo, sizeof(net_profile_info_t));
__net_init_profile_info(NET_DEVICE_CELLULAR, ProfInfo);
ProfInfo->profile_type = NET_DEVICE_CELLULAR;
- g_strlcpy(ProfInfo->ProfileName, cellular_profile[0].obj, NET_PROFILE_NAME_LEN_MAX);
+ g_strlcpy(ProfInfo->profile_name, cellular_profile[0].obj, NET_PROFILE_NAME_LEN_MAX);
- g_strlcpy(ProfInfo->ProfileInfo.Pdp.net_info.ProfileName,
+ g_strlcpy(ProfInfo->profile_info.pdp.net_info.profile_name,
cellular_profile[0].obj, NET_PROFILE_NAME_LEN_MAX);
- g_strlcpy(ProfInfo->ProfileInfo.Pdp.PSModemPath,
+ g_strlcpy(ProfInfo->profile_info.pdp.ps_modem_path,
cellular_profile[0].name, NET_PROFILE_NAME_LEN_MAX);
- ProfInfo->ProfileState = cellular_profile[0].state;
- ProfInfo->ProfileState6 = cellular_profile[0].state6;
+ ProfInfo->profile_state = cellular_profile[0].state;
+ ProfInfo->profile_state6 = cellular_profile[0].state6;
- net_dev_info_t *net_info = &(ProfInfo->ProfileInfo.Pdp.net_info);
+ net_dev_info_t *net_info = &(ProfInfo->profile_info.pdp.net_info);
if (cellular_profile[0].interface)
- g_strlcpy(net_info->DevName, cellular_profile[0].interface, NET_MAX_DEVICE_NAME_LEN);
+ g_strlcpy(net_info->dev_name, cellular_profile[0].interface, NET_MAX_DEVICE_NAME_LEN);
if (cellular_profile[0].address)
- g_strlcpy(net_info->MacAddr, cellular_profile[0].address, NET_MAX_MAC_ADDR_LEN);
+ g_strlcpy(net_info->mac_addr, cellular_profile[0].address, NET_MAX_MAC_ADDR_LEN);
if (cellular_profile[0].ipv4_method)
- net_info->IpConfigType = cellular_profile[0].ipv4_method;
+ net_info->ip_config_type = cellular_profile[0].ipv4_method;
if (cellular_profile[0].ipv4_address)
- __net_extract_ip(cellular_profile[0].ipv4_address, &net_info->IpAddr);
+ __net_extract_ip(cellular_profile[0].ipv4_address, &net_info->ip_addr);
if (cellular_profile[0].ipv4_netmask) {
- __net_extract_ip(cellular_profile[0].ipv4_netmask, &net_info->SubnetMask);
- net_info->PrefixLen = __net_get_prefix_len(cellular_profile[0].ipv4_netmask);
- net_info->BNetmask = TRUE;
+ __net_extract_ip(cellular_profile[0].ipv4_netmask, &net_info->subnet_mask);
+ net_info->prefix_len = __net_get_prefix_len(cellular_profile[0].ipv4_netmask);
+ net_info->b_netmask = TRUE;
}
if (cellular_profile[0].ipv4_gateway) {
- __net_extract_ip(cellular_profile[0].ipv4_gateway, &net_info->GatewayAddr);
- net_info->BDefGateway = TRUE;
+ __net_extract_ip(cellular_profile[0].ipv4_gateway, &net_info->gateway_addr);
+ net_info->b_def_gateway = TRUE;
}
if (cellular_profile[0].ipv6_method)
- net_info->IpConfigType6 = cellular_profile[0].ipv6_method;
+ net_info->ip_config_type6 = cellular_profile[0].ipv6_method;
- ProfInfo->ProfileInfo.Pdp.ServiceType = cellular_profile[0].service_type;
+ ProfInfo->profile_info.pdp.service_type = cellular_profile[0].service_type;
if (cellular_profile[0].apn)
- g_strlcpy(ProfInfo->ProfileInfo.Pdp.Apn, cellular_profile[0].apn, NET_PDP_APN_LEN_MAX);
+ g_strlcpy(ProfInfo->profile_info.pdp.apn, cellular_profile[0].apn, NET_PDP_APN_LEN_MAX);
if (cellular_profile[0].proxy_addr)
- g_strlcpy(ProfInfo->ProfileInfo.Pdp.net_info.ProxyAddr,
+ g_strlcpy(ProfInfo->profile_info.pdp.net_info.proxy_addr,
cellular_profile[0].proxy_addr, NET_PROXY_LEN_MAX);
if (cellular_profile[0].home_url)
- g_strlcpy(ProfInfo->ProfileInfo.Pdp.HomeURL, cellular_profile[0].home_url, NET_HOME_URL_LEN_MAX);
+ g_strlcpy(ProfInfo->profile_info.pdp.home_url, cellular_profile[0].home_url, NET_HOME_URL_LEN_MAX);
if (cellular_profile[0].profile_name)
- g_strlcpy(ProfInfo->ProfileInfo.Pdp.Keyword, cellular_profile[0].profile_name, NET_PDP_APN_LEN_MAX);
+ g_strlcpy(ProfInfo->profile_info.pdp.keyword, cellular_profile[0].profile_name, NET_PDP_APN_LEN_MAX);
- ProfInfo->ProfileInfo.Pdp.Hidden = cellular_profile[0].hidden;
- ProfInfo->ProfileInfo.Pdp.Editable = cellular_profile[0].editable;
- ProfInfo->ProfileInfo.Pdp.DefaultConn = cellular_profile[0].default_conn;
+ ProfInfo->profile_info.pdp.hidden = cellular_profile[0].hidden;
+ ProfInfo->profile_info.pdp.editable = cellular_profile[0].editable;
+ ProfInfo->profile_info.pdp.default_conn = cellular_profile[0].default_conn;
}
static void __net_add_profile_wifi(net_profile_info_t **profile_info, int *profile_count)
__net_init_profile_info(NET_DEVICE_WIFI, &ProfInfo);
ProfInfo.profile_type = NET_DEVICE_WIFI;
- g_strlcpy(ProfInfo.ProfileName, wifi_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
+ g_strlcpy(ProfInfo.profile_name, wifi_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
- ProfInfo.ProfileState = wifi_profile[i].state;
- ProfInfo.ProfileState6 = wifi_profile[i].state6;
+ ProfInfo.profile_state = wifi_profile[i].state;
+ ProfInfo.profile_state6 = wifi_profile[i].state6;
- net_wifi_profile_info_t *Wlan = &(ProfInfo.ProfileInfo.Wlan);
+ net_wifi_profile_info_t *Wlan = &(ProfInfo.profile_info.wlan);
- g_strlcpy(Wlan->net_info.ProfileName, wifi_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
+ g_strlcpy(Wlan->net_info.profile_name, wifi_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
Wlan->security_info.sec_mode = wifi_profile[i].sec_mode;
Wlan->security_info.enc_mode = wifi_profile[i].enc_mode;
Wlan->passpoint = wifi_profile[i].passpoint;
- Wlan->Strength = wifi_profile[i].strength;
+ Wlan->strength = wifi_profile[i].strength;
if (wifi_profile[i].essid)
g_strlcpy(Wlan->essid, wifi_profile[i].essid, NET_WLAN_ESSID_LEN);
if (wifi_profile[i].bssid)
Wlan->frequency = wifi_profile[i].frequency;
Wlan->security_info.keymgmt = wifi_profile[i].keymgmt;
- net_dev_info_t *net_info = &(ProfInfo.ProfileInfo.Wlan.net_info);
+ net_dev_info_t *net_info = &(ProfInfo.profile_info.wlan.net_info);
if (wifi_profile[i].interface)
- g_strlcpy(net_info->DevName, wifi_profile[i].interface, NET_MAX_DEVICE_NAME_LEN);
+ g_strlcpy(net_info->dev_name, wifi_profile[i].interface, NET_MAX_DEVICE_NAME_LEN);
if (wifi_profile[i].address)
- g_strlcpy(net_info->MacAddr, wifi_profile[i].address, NET_MAX_MAC_ADDR_LEN);
+ g_strlcpy(net_info->mac_addr, wifi_profile[i].address, NET_MAX_MAC_ADDR_LEN);
if (wifi_profile[i].ipv4_method)
- net_info->IpConfigType = wifi_profile[i].ipv4_method;
+ net_info->ip_config_type = wifi_profile[i].ipv4_method;
if (wifi_profile[i].ipv4_address)
- __net_extract_ip(wifi_profile[i].ipv4_address, &net_info->IpAddr);
+ __net_extract_ip(wifi_profile[i].ipv4_address, &net_info->ip_addr);
if (wifi_profile[i].ipv4_netmask) {
- __net_extract_ip(wifi_profile[i].ipv4_netmask, &net_info->SubnetMask);
- net_info->PrefixLen = __net_get_prefix_len(wifi_profile[i].ipv4_netmask);
- net_info->BNetmask = TRUE;
+ __net_extract_ip(wifi_profile[i].ipv4_netmask, &net_info->subnet_mask);
+ net_info->prefix_len = __net_get_prefix_len(wifi_profile[i].ipv4_netmask);
+ net_info->b_netmask = TRUE;
}
if (wifi_profile[i].ipv4_gateway) {
- __net_extract_ip(wifi_profile[i].ipv4_gateway, &net_info->GatewayAddr);
- net_info->BDefGateway = TRUE;
+ __net_extract_ip(wifi_profile[i].ipv4_gateway, &net_info->gateway_addr);
+ net_info->b_def_gateway = TRUE;
}
if (wifi_profile[i].ipv6_method)
- net_info->IpConfigType6 = wifi_profile[i].ipv6_method;
+ net_info->ip_config_type6 = wifi_profile[i].ipv6_method;
ProfilePtr = (net_profile_info_t *)realloc(ProfilePtr, (i + 1) * sizeof(net_profile_info_t));
memcpy(ProfilePtr + i, &ProfInfo, sizeof(net_profile_info_t));
__net_init_profile_info(NET_DEVICE_ETHERNET, &ProfInfo);
ProfInfo.profile_type = NET_DEVICE_ETHERNET;
- g_strlcpy(ProfInfo.ProfileName, ethernet_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
+ g_strlcpy(ProfInfo.profile_name, ethernet_profile[i].obj, NET_PROFILE_NAME_LEN_MAX);
- ProfInfo.ProfileState = ethernet_profile[i].state;
- ProfInfo.ProfileState6 = ethernet_profile[i].state6;
+ ProfInfo.profile_state = ethernet_profile[i].state;
+ ProfInfo.profile_state6 = ethernet_profile[i].state6;
- net_dev_info_t *net_info = &(ProfInfo.ProfileInfo.Wlan.net_info);
+ net_dev_info_t *net_info = &(ProfInfo.profile_info.wlan.net_info);
if (ethernet_profile[i].interface)
- g_strlcpy(net_info->DevName, ethernet_profile[i].interface, NET_MAX_DEVICE_NAME_LEN);
+ g_strlcpy(net_info->dev_name, ethernet_profile[i].interface, NET_MAX_DEVICE_NAME_LEN);
if (ethernet_profile[i].address)
- g_strlcpy(net_info->MacAddr, ethernet_profile[i].address, NET_MAX_MAC_ADDR_LEN);
+ g_strlcpy(net_info->mac_addr, ethernet_profile[i].address, NET_MAX_MAC_ADDR_LEN);
if (ethernet_profile[i].ipv4_method)
- net_info->IpConfigType = ethernet_profile[i].ipv4_method;
+ net_info->ip_config_type = ethernet_profile[i].ipv4_method;
if (ethernet_profile[i].ipv4_address)
- __net_extract_ip(ethernet_profile[i].ipv4_address, &net_info->IpAddr);
+ __net_extract_ip(ethernet_profile[i].ipv4_address, &net_info->ip_addr);
if (ethernet_profile[i].ipv4_netmask) {
- __net_extract_ip(ethernet_profile[i].ipv4_netmask, &net_info->SubnetMask);
- net_info->PrefixLen = __net_get_prefix_len(ethernet_profile[i].ipv4_netmask);
- net_info->BNetmask = TRUE;
+ __net_extract_ip(ethernet_profile[i].ipv4_netmask, &net_info->subnet_mask);
+ net_info->prefix_len = __net_get_prefix_len(ethernet_profile[i].ipv4_netmask);
+ net_info->b_netmask = TRUE;
}
if (ethernet_profile[i].ipv4_gateway) {
- __net_extract_ip(ethernet_profile[i].ipv4_gateway, &net_info->GatewayAddr);
- net_info->BDefGateway = TRUE;
+ __net_extract_ip(ethernet_profile[i].ipv4_gateway, &net_info->gateway_addr);
+ net_info->b_def_gateway = TRUE;
}
if (ethernet_profile[i].ipv6_method)
- net_info->IpConfigType6 = ethernet_profile[i].ipv6_method;
+ net_info->ip_config_type6 = ethernet_profile[i].ipv6_method;
ProfilePtr = (net_profile_info_t *)realloc(ProfilePtr, (i + 1) * sizeof(net_profile_info_t));
memcpy(ProfilePtr + i, &ProfInfo, sizeof(net_profile_info_t));
* @testcase utc_connection_get_bt_state_p
* @since_tizen 2.3
* @type Positive
- * @description Gets the state of the Bluetooth.The returned state is for the Bluetooth connection state.
+ * @description Gets the state of the bluetooth.The returned state is for the bluetooth connection state.
* @scenario Invoking connection_get_bt_state with valid parameter.
*/
int utc_connection_get_bt_state_p(void)