class MifsetTimers

Class for handling timers per virtual network interface. More...

Definition#include <mifset.hh>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

 MifsetTimers ()

MifsetTimers

Default constructor

 ~MifsetTimers ()

~MifsetTimers

Destructor

bool  mif_timer_is_set (size_t vif_index)

mif_timer_is_set

[const]

Test if the timer is set

Test if the timer for a given virtual interface is set (i.e., running).

Parameters:
vif_indexthe index of the virtual interface to test if its timer is set.

Returns: true if the timer is set, otherwise false.

uint32_t  mif_timer_remain (size_t vif_index, struct timeval& timeval_diff)

mif_timer_remain

[const]

Get the remaining expiration time

Compute the expiration time for the timer for a given virtual interface.

Parameters:
vif_indexthe index of the virtual interface to compute the expiration time of its timer.
timeval_diffthe timeval structure to store the result. Note that if the timer is not set, the timeval structure will be reset to (0, 0); i.e., zero seconds and zero microseconds.

Returns: the number of seconds until the timer expire. Note that if the timer is not set, the return value is 0 (zero seconds).

void  set_mif_timer (size_t vif_index, uint32_t delay_sec, uint32_t delay_usec, cfunc_t func, void *data_pointer)

set_mif_timer

Set the timer

This method will start a one-time timer. If the timer should be periodic, it should be restarted by the timeout function.

Parameters:
vif_indexthe index of the virtual interface to set the timer of.
delay_secthe number of seconds to the timer expiration.
delay_usecthe number of microseconds (in addition to the number of seconds delay_sec) to the timer expiration.
functhe timeout function to call when the timer expires.
data_pointerthe data to supply to the timeout function func when the timer expires.

void  cancel_mif_timer (size_t vif_index)

cancel_mif_timer

Cancel the timer

Parameters:
vif_indexthe index of the virtual interface of the timer to cancel.


Generated by: pavlin on possum.icir.org on Wed Dec 11 16:50:45 2002, using kdoc 2.0a54+XORP.