#define WIFI_FEATURE "http://tizen.org/feature/network.wifi"
#define TETHERING_BLUETOOTH_FEATURE "http://tizen.org/feature/network.tethering.bluetooth"
#define ETHERNET_FEATURE "http://tizen.org/feature/network.ethernet"
+#define ROUTE_FEATURE "http://tizen.org/feature/network.route"
typedef enum {
CONNECTION_CELLULAR_SUBSCRIBER_1 = 0x00,
CONNECTION_SUPPORTED_FEATURE_WIFI,
CONNECTION_SUPPORTED_FEATURE_TETHERING_BLUETOOTH,
CONNECTION_SUPPORTED_FEATURE_ETHERNET,
+ CONNECTION_SUPPORTED_FEATURE_ROUTE,
CONNECTION_SUPPORTED_FEATURE_MAX,
} connection_supported_feature_e;
CONN_LOCK;
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE, TETHERING_BLUETOOTH_FEATURE, ETHERNET_FEATURE);
+ CHECK_FEATURE_SUPPORTED(ROUTE_FEATURE);
if (!(__connection_check_handle_validity(connection)) ||
interface_name == NULL || host_address == NULL) {
CONN_LOCK;
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE, TETHERING_BLUETOOTH_FEATURE, ETHERNET_FEATURE);
+ CHECK_FEATURE_SUPPORTED(ROUTE_FEATURE);
if (!(__connection_check_handle_validity(connection)) ||
interface_name == NULL || host_address == NULL) {
CONN_LOCK;
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE, ETHERNET_FEATURE);
+ CHECK_FEATURE_SUPPORTED(ROUTE_FEATURE);
if (!(__connection_check_handle_validity(connection)) ||
interface_name == NULL || host_address == NULL) {
CONN_LOCK;
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE, ETHERNET_FEATURE);
+ CHECK_FEATURE_SUPPORTED(ROUTE_FEATURE);
if (!(__connection_check_handle_validity(connection)) ||
interface_name == NULL || host_address == NULL) {
CONN_LOCK;
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE, ETHERNET_FEATURE);
+ CHECK_FEATURE_SUPPORTED(ROUTE_FEATURE);
if (!(__connection_check_handle_validity(connection)) ||
(address_family != CONNECTION_ADDRESS_FAMILY_IPV4 &&
CONN_LOCK;
CHECK_FEATURE_SUPPORTED(TELEPHONY_FEATURE, WIFI_FEATURE, ETHERNET_FEATURE);
+ CHECK_FEATURE_SUPPORTED(ROUTE_FEATURE);
if (!(__connection_check_handle_validity(connection)) ||
(address_family != CONNECTION_ADDRESS_FAMILY_IPV4 &&
telephony_supported = connection_check_feature_supported(FEATURE_TELEPHONY);
bt_tethering_supported = connection_check_feature_supported(FEATURE_BT_TETHERING);
ethernet_supported = connection_check_feature_supported(FEATURE_ETHERNET);
+ route_supported = connection_check_feature_supported(FEATURE_ROUTE);
if (telephony_supported == false && wifi_supported == false
&& bt_tethering_supported == false && ethernet_supported == false) {
{
int ret;
- if (all_features_not_supported) {
+ if (!route_supported || all_features_not_supported) {
ret = connection_add_route(connection, NULL, NULL);
CHECK_RETURN("connection_add_route", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (all_features_not_supported) {
+ if (!route_supported || all_features_not_supported) {
ret = connection_add_route(connection, interface_name, "192.168.129.3");
CHECK_RETURN("connection_add_route", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
{
int ret;
- if (all_features_not_supported) {
+ if (!route_supported || all_features_not_supported) {
ret = connection_remove_route(NULL, NULL, NULL);
CHECK_RETURN("connection_remove_route", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (all_features_not_supported) {
+ if (!route_supported || all_features_not_supported) {
ret = connection_remove_route(connection, interface_name, "192.168.129.3");
CHECK_RETURN("connection_remove_route", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
{
int ret;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_add_route_ipv6(NULL, NULL, NULL, NULL);
CHECK_RETURN("connection_add_route_ipv6", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_add_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::");
CHECK_RETURN("connection_add_route_ipv6", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
{
int ret;
- if (all_features_not_supported) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_remove_route_ipv6(NULL, NULL, NULL, NULL);
CHECK_RETURN("connection_remove_route_ipv6", ret, CONNECTION_ERROR_NOT_SUPPORTED);
return 0;
int ret;
char* interface_name = NULL;
- if (telephony_supported == false && wifi_supported == false && ethernet_supported == false) {
+ if (!route_supported || (telephony_supported == false && wifi_supported == false && ethernet_supported == false)) {
ret = connection_remove_route_ipv6(connection, interface_name, "2001:db8:1:0::1", "fe80::");
FREE_RESOURCE(interface_name);
CHECK_RETURN("connection_remove_route_ipv6", ret, CONNECTION_ERROR_NOT_SUPPORTED);