|
Data Structures |
| struct | ip_record |
Defines |
| #define | FW_STARTUP_GRACE 300 /**< Startup period: we send pongs */ |
| | Startup period: we send pongs.
|
| #define | FW_GRACE_INTERVAL 3600 /**< Every hour, new grace period */ |
| | Every hour, new grace period.
|
| #define | FW_PERIODIC_GRACE 120 /**< We send pongs for 2 minutes */ |
| | We send pongs for 2 minutes.
|
| #define | FW_INCOMING_WINDOW 3600 /**< Incoming monitoring window */ |
| | Incoming monitoring window.
|
| #define | FW_SOLICITED_WINDOW 3600 /**< Solicited UDP monitoring window */ |
| | Solicited UDP monitoring window.
|
| #define | FW_UDP_WINDOW 120 /**< 2 minutes, in most firewalls */ |
| | 2 minutes, in most firewalls
|
| #define | OUTGOING_WINDOW 150 /**< Outgoing monitoring window */ |
| | Outgoing monitoring window.
|
Functions |
| | RCSID ("$Id:inet.c, v 1.25 2005/09/10 08:17:28 daichik Exp $") |
| void | inet_set_is_connected (gboolean val) |
| | Sets our internet connection status.
|
| ip_record * | ip_record_make (const host_addr_t addr) |
| | Create a new ip_record structure.
|
| void | ip_record_free (struct ip_record *ipr) |
| | Free ip_record structure.
|
| void | ip_record_free_remove (struct ip_record *ipr) |
| | Free ip_record structure and remove it from the `outgoing_udp' table.
|
| void | ip_record_touch (struct ip_record *ipr) |
| | Touch ip_record when we send a new datagram to that IP.
|
| void | ip_record_destroy (cqueue_t *unused_cq, gpointer obj) |
| | Callout queue callback, invoked when it's time to destroy the record.
|
| gboolean | is_local_addr (const host_addr_t addr) |
| void | inet_firewalled (void) |
| | Called when we enter the firewalled status (TCP).
|
| void | inet_udp_firewalled (void) |
| | Called when we enter the firewalled status (UDP).
|
| void | got_no_udp_solicited (cqueue_t *unused_cq, gpointer unused_obj) |
| | This is a callback invoked when no solicited UDP has been received for some amount of time.
|
| void | inet_udp_got_solicited (void) |
| | Called whenever we receive solicited UDP traffic.
|
| void | got_no_connection (cqueue_t *unused_cq, gpointer unused_obj) |
| | This is a callback invoked when no incoming connection has been received for some amount of time.
|
| void | got_no_udp_unsolicited (cqueue_t *unused_cq, gpointer unused_obj) |
| | This is a callback invoked when no unsolicited UDP datagrams have been received for some amount of time.
|
| void | inet_not_firewalled (void) |
| | Called when we have determined we are definitely not TCP-firewalled.
|
| void | inet_udp_not_firewalled (void) |
| | Called when we have determined we are definitely not UDP-firewalled.
|
| void | inet_got_incoming (const host_addr_t addr) |
| | Called when we got an incoming connection from another computer at `ip'.
|
| void | inet_udp_got_unsolicited_incoming (void) |
| | Called when we got an incoming unsolicited datagram from another computer at `ip'.
|
| void | inet_udp_got_incoming (const host_addr_t addr) |
| | Called when we got an incoming datagram from another computer at `ip'.
|
| void | inet_udp_record_sent (const host_addr_t addr) |
| | Record that we sent an UDP datagram to some host, thereby opening a breach on the firewall for the UDP reply.
|
| gboolean | inet_can_answer_ping (void) |
| | Check whether we can answer a ping with a pong.
|
| void | check_outgoing_connection (cqueue_t *unused_cq, gpointer unused_obj) |
| | This callback is periodically called when there has been outgoing connections attempted.
|
| void | inet_connection_attempted (const host_addr_t addr) |
| | Called each time we attempt a connection.
|
| void | inet_connection_succeeded (const host_addr_t addr) |
| | Called each time a connection attempt succeeds.
|
| void | inet_read_activity (void) |
| | Called when reading activity occurred during a b/w scheduling period.
|
| void | inet_init (void) |
| | Initialization code.
|
| void | free_ip_record (gpointer key, gpointer value, gpointer unused_udata) |
| | Hash table iteration callback to free the "ip_record" structure.
|
| void | inet_close (void) |
| | Shutdown cleanup.
|
Variables |
| time_t | fw_time = 0 |
| | When we last became firewalled.
|
| gpointer | incoming_ev = NULL |
| | Callout queue timer.
|
| gpointer | incoming_udp_ev = NULL |
| | Idem.
|
| gpointer | solicited_udp_ev = NULL |
| | Idem.
|
| GHashTable * | outgoing_udp = NULL |
| | Maps "IP" => "ip_record".
|
| guint32 | activity_seen = 0 |
| | Activity recorded in period.
|
| gpointer | outgoing_ev = NULL |
| | Callout queue timer.
|