Defines | |
| #define | ICD2_IDLE_TIMER_IPTABLES_PREFIX "icd2-idle-" |
Functions | |
| static gboolean | icd_idle_timer_unset_rules (const char *interface) |
| static gboolean | icd_idle_timer_set_rules (const gchar *interface, const guint timeout) |
| static gboolean | icd_idle_timer_trigger (GIOChannel *source, GIOCondition condition, gpointer user_data) |
| static gboolean | icd_idle_timer_start (struct icd_iap *iap, guint timeout) |
| gboolean | icd_idle_timer_set (struct icd_iap *iap) |
| gboolean | icd_idle_timer_unset (struct icd_iap *iap) |
| static gboolean | icd_idle_timer_foreach_iap (struct icd_iap *iap, gpointer user_data) |
| static void | icd_idle_timer_gconf_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) |
| gboolean | icd_idle_timer_init (struct icd_context *icd_ctx) |
| void | icd_idle_timer_remove (struct icd_context *icd_ctx) |
| static gboolean icd_idle_timer_foreach_iap | ( | struct icd_iap * | iap, | |
| gpointer | user_data | |||
| ) | [static] |
Go through each IAP and see if the changed idle timer entry applies to the type of this IAP
| iap | the IAP | |
| user_data | the changed GConfEntry |
References icd_iap::connection, icd_idle_timer_start(), icd_idle_timer_unset(), ILOG_DEBUG, ILOG_WARN, icd_iap::interface_name, and icd_policy_request::network_type.
Referenced by icd_idle_timer_gconf_changed().
| static void icd_idle_timer_gconf_changed | ( | GConfClient * | client, | |
| guint | cnxn_id, | |||
| GConfEntry * | entry, | |||
| gpointer | user_data | |||
| ) | [static] |
Callback for GConf entry change
| client | GConf client | |
| cnxn_id | connection id | |
| entry | the changed GConfEntry | |
| user_data | user data |
References icd_iap_foreach(), and icd_idle_timer_foreach_iap().
Referenced by icd_idle_timer_init().
| gboolean icd_idle_timer_init | ( | struct icd_context * | icd_ctx | ) |
Clear all OUTPUT chain rules and add notification function for idle timer gconf values
References icd_idle_timer_gconf_changed(), and icd_context::idle_timer_notify.
Referenced by main().
| void icd_idle_timer_remove | ( | struct icd_context * | icd_ctx | ) |
Remove gconf idle timer notification
| icd_ctx | icd context |
References icd_context::idle_timer_notify.
Referenced by main().
| gboolean icd_idle_timer_set | ( | struct icd_iap * | iap | ) |
Set idle timer for IAP
| iap | the IAP |
References icd_iap::connection, icd_idle_timer_start(), icd_iap::idletimer_id, ILOG_CRIT, ILOG_DEBUG, ILOG_WARN, icd_iap::interface_name, and icd_policy_request::network_type.
Referenced by icd_iap_has_connected().
| static gboolean icd_idle_timer_set_rules | ( | const gchar * | interface, | |
| const guint | timeout | |||
| ) | [static] |
Set idletimer iptables rules
| interface | the interface name | |
| timeout_str | time in seconds to wait until interface is considered idle |
References ILOG_ERR.
Referenced by icd_idle_timer_start().
| static gboolean icd_idle_timer_start | ( | struct icd_iap * | iap, | |
| guint | timeout | |||
| ) | [static] |
Start idle timer
| iap | the IAP | |
| timeout | timeout in seconds |
References icd_idle_timer_set_rules(), icd_idle_timer_trigger(), icd_iap::idletimer_id, ILOG_ERR, ILOG_INFO, ILOG_WARN, and icd_iap::interface_name.
Referenced by icd_idle_timer_foreach_iap(), and icd_idle_timer_set().
| static gboolean icd_idle_timer_trigger | ( | GIOChannel * | source, | |
| GIOCondition | condition, | |||
| gpointer | user_data | |||
| ) | [static] |
Idle timer callback function called when the idle timer has triggered
| source | the GIOChannel event source | |
| condition | the condition which has been satisfied | |
| data | user data set in g_io_add_watch() or g_io_add_watch_full() |
References icd_iap_disconnect(), icd_iap::idletimer_id, ILOG_DEBUG, and ILOG_INFO.
Referenced by icd_idle_timer_start().
| gboolean icd_idle_timer_unset | ( | struct icd_iap * | iap | ) |
Unset idle timer for an IAP
| iap | the IAP |
References icd_idle_timer_unset_rules(), icd_iap::idletimer_id, ILOG_DEBUG, ILOG_ERR, and icd_iap::interface_name.
Referenced by icd_iap_disconnect(), and icd_idle_timer_foreach_iap().
| static gboolean icd_idle_timer_unset_rules | ( | const char * | interface | ) | [static] |
Unset idletimer iptables rules
| interface | the interface name |
References ILOG_ERR, and ILOG_INFO.
Referenced by icd_idle_timer_unset().
1.5.6