Network priority assignment
[ICd internal functions]


Defines

#define ICD_NW_PRIO_SRV_PREF   500
#define PREFERRED_SERVICE_ID
#define PREFERRED_SERVICE_TYPE
#define ICD_NW_TYPE_WLAN   "WLAN_"
#define ICD_NW_PRIO_WLAN   60
#define ICD_NW_TYPE_WIMAX   "WIMAX"
#define ICD_NW_PRIO_WIMAX   50
#define ICD_NW_TYPE_GPRS   "GPRS"
#define ICD_NW_PRIO_GPRS   45
#define ICD_NW_TYPE_DUN_GSM_PS   "DUN_GSM_PS"
#define ICD_NW_TYPE_DUN_CDMA_PSD   "DUN_CDMA_PSD"
#define ICD_NW_PRIO_DUN_PS   40
#define ICD_NW_TYPE_DUN_GSM_CS   "DUN_GSM_CS"
#define ICD_NW_TYPE_DUN_CDMA_CSD   "DUN_CDMA_CSD"
#define ICD_NW_TYPE_DUN_CDMA_QNC   "DUN_CDMA_QNC"
#define ICD_NW_PRIO_DUN_CS   30
#define ICD_NW_PRIO_HIGHEST   ICD_NW_PRIO_WLAN
#define ICD_NW_PRIO_SAVED_BOOSTER_VALUE   100

Functions

void icd_network_priority_pref_init (void)
gint icd_network_priority_get (const gchar *srv_type, const gchar *srv_id, const gchar *network_type, const guint network_attrs)
gboolean icd_network_priority (const gchar *srv_type, const gchar *srv_id, const gchar *network_type, const guint network_attrs, gint *network_priority)

Variables

static gchar * preferred_id = NULL
static gchar * preferred_type = NULL

Define Documentation

#define ICD_NW_PRIO_DUN_CS   30

GSM/CDMA circuit switched priority

#define ICD_NW_PRIO_DUN_PS   40

GSM/CDMA packet data priority

#define ICD_NW_PRIO_GPRS   45

WiMax priority

#define ICD_NW_PRIO_HIGHEST   ICD_NW_PRIO_WLAN

What is the highest normal (not preferred) priority

#define ICD_NW_PRIO_SAVED_BOOSTER_VALUE   100

The saved IAP priority is made higher

#define ICD_NW_PRIO_SRV_PREF   500

preferred service network priority

#define ICD_NW_PRIO_WIMAX   50

WiMax priority

#define ICD_NW_PRIO_WLAN   60

WLAN priority

#define ICD_NW_TYPE_DUN_CDMA_CSD   "DUN_CDMA_CSD"

CDMA circuit switched network

#define ICD_NW_TYPE_DUN_CDMA_PSD   "DUN_CDMA_PSD"

CDMA packet data network

#define ICD_NW_TYPE_DUN_CDMA_QNC   "DUN_CDMA_QNC"

CDMA Quick Net connect network

#define ICD_NW_TYPE_DUN_GSM_CS   "DUN_GSM_CS"

GSM circuit switched network

#define ICD_NW_TYPE_DUN_GSM_PS   "DUN_GSM_PS"

GSM GPRS network

#define ICD_NW_TYPE_GPRS   "GPRS"

GPRS network

#define ICD_NW_TYPE_WIMAX   "WIMAX"

WiMAX network

#define ICD_NW_TYPE_WLAN   "WLAN_"

WLAN network prefix

#define PREFERRED_SERVICE_ID

Value:

ICD_GCONF_SETTINGS \
                                 "/srv_provider/preferred_id"
preferred service id

#define PREFERRED_SERVICE_TYPE

Value:

ICD_GCONF_SETTINGS \
                                 "/srv_provider/preferred_type"
preferred service type


Function Documentation

gboolean icd_network_priority ( const gchar *  srv_type,
const gchar *  srv_id,
const gchar *  network_type,
const guint  network_attrs,
gint *  network_priority 
)

Check if there are more higher priority networks available. Return also the priority if the return pointer is set. This function can be called by policy module like policy_always_online.so

Parameters:
srv_type service type or NULL if none
srv_id service id or NULL if none
network_type network type
network_attrs network attrs
the network priority (returned to caller)
Returns:
TRUE if found higher priority network types, FALSE if not found

gint icd_network_priority_get ( const gchar *  srv_type,
const gchar *  srv_id,
const gchar *  network_type,
const guint  network_attrs 
)

Set static network priority for the cahce entry

Parameters:
srv_type service type or NULL if none
srv_id service id or NULL if none
network_type network type
network_attrs network attrs
Returns:
the network priority

void icd_network_priority_pref_init ( void   ) 

(Re)set preferred service type and id


Variable Documentation

gchar* preferred_id = NULL [static]

preferred service id

gchar* preferred_type = NULL [static]

preferred service type


Generated on Tue Feb 24 16:21:36 2009 for ICd2 by  doxygen 1.5.1