|
|
This entry contains all the information about the condition a dataflow must satisfy to deliver a signal. It is (S,G)-specific, but there could be more than one MfeaDfe entries per (S,G).
MfeaDfe (MfeaDfeLookup& mfea_dfe_lookup,
const struct timeval& threshold_interval,
uint32_t threshold_packets,
uint32_t threshold_bytes,
bool is_threshold_in_packets,
bool is_threshold_in_bytes,
bool is_geq_upcall,
bool is_leq_upcall)
| MfeaDfe |
Constructor with information with the dataflow condition to satisfy.
Note: either is_threshold_in_packets or is_threshold_in_bytes (or both) must be true. Note: either is_geq_upcall or is_leq_upcall (but not both) must be true.
Parameters:
mfea_dfe_lookup | the MfeaDfeLookup entry this entry belongs to. |
threshold_interval | the dataflow threshold interval. |
threshold_packets | the threshold (in number of packets) to compare against. |
threshold_bytes | the threshold (in number of bytes) to compare against. |
is_threshold_in_packets | if true, threshold_packets is valid. |
is_threshold_in_bytes | if true, threshold_bytes is valid. |
is_geq_upcall | if true, the operation for comparison is ">=". |
is_leq_upcall | if true, the operation for comparison is "<=". |
~MfeaDfe ()
| ~MfeaDfe |
Destructor
MfeaDfeLookup& mfea_dfe_lookup ()
| mfea_dfe_lookup |
[const]
Get a reference to the MfeaDfeLookup entry this entry belongs to.
Returns: a reference to the MfeaDfeLookup entry this entry belongs to.
MfeaDft& mfea_dft ()
| mfea_dft |
[const]
Get a reference to the MfeaDft dataflow table this entry belongs to.
Returns: a reference to the MfeaDft dataflow table this entry belongs to.
int family ()
| family |
[const]
Get the address family.
Returns: the address family (e.g., AF_INET or AF_INET6 for IPv4 and IPv6 respectively).
const IPvX& source_addr ()
| source_addr |
[const]
Get the source address.
Returns: the source address.
const IPvX& group_addr ()
| group_addr |
[const]
Get the group address.
Returns: the group address.
bool is_valid ()
| is_valid |
[const]
Test if this entry is valid.
An entry is valid if, for example: (a) either is_threshold_in_packets or is_threshold_in_bytes (or both) must be true. (b) either is_geq_upcall or is_leq_upcall (but not both) must be true. (c) the threshold interval is not too small. (d) the bandwidth-related statistics do not contain invalid values.
Returns: true if this entry is valid, otherwise false.
bool is_same (const struct timeval& threshold_interval_test,
uint32_t threshold_packets_test,
uint32_t threshold_bytes_test,
bool is_threshold_in_packets_test,
bool is_threshold_in_bytes_test,
bool is_geq_upcall_test,
bool is_leq_upcall_test)
| is_same |
[const]
Compare whether the information contained within this MfeaDfe entry is same as the specified information.
Parameters:
threshold_interval_test | the dataflow threshold interval. |
threshold_packets_test | the threshold (in number of packets) to compare against. |
threshold_bytes_test | the threshold (in number of bytes) to compare against. |
is_threshold_in_packets_test | if true, threshold_packets is valid. |
is_threshold_in_bytes_test | if true, threshold_bytes is valid. |
is_geq_upcall_test | if true, the operation for comparison is ">=". |
is_leq_upcall_test | if true, the operation for comparison is "<=". |
Returns: true if the information contained within this MfeaDfe entry is same as the specified information, otherwise false.
void init_sg_count ()
| init_sg_count |
Initialize this entry with the current multicast forwarding information.
The current multicast forwarding bandwidth information is read from the kernel.
bool test_sg_count ()
| test_sg_count |
Test if the dataflow bandwidth satisfies the pre-defined condition.
The multicast forwarding bandwidth information is read from the kernel, and then is tested whether is above/below the pre-defined threshold.
Returns: true if the dataflow bandwidth satisifes the pre-defined condition, otherwise false. Note: if both "is_threshold_in_packets" and "is_threshold_in_bytes" are true, then return true if the test is positive for either unit (i.e., packets or bytes).
void start_measurement ()
| start_measurement |
Start bandwidth measurement.
void dataflow_signal_send ()
| dataflow_signal_send |
Send a dataflow signal that the pre-defined condition is true.
const struct timeval& threshold_interval ()
| threshold_interval |
[const]
Get the threshold interval.
Returns: the threshold interval for this dataflow entry.
uint32_t threshold_packets ()
| threshold_packets |
[const]
Get the threshold packets.
Returns: the threshold packets for this dataflow entry.
uint32_t threshold_bytes ()
| threshold_bytes |
[const]
Get the threshold bytes.
Returns: the threshold bytes for this dataflow entry.
bool is_threshold_in_packets ()
| is_threshold_in_packets |
[const]
Test if the threshold is in number of packets.
Returns: true if the threshold is in number of packets.
bool is_threshold_in_bytes ()
| is_threshold_in_bytes |
[const]
Test if the threshold is in number of bytes.
Returns: true if the threshold is in number of bytes.
bool is_geq_upcall ()
| is_geq_upcall |
[const]
Test if the threshold type is "greater-or-equal" (i.e., ">=").
Returns: true if the threshold type is "greater-or-equal" (i.e., ">=").
bool is_leq_upcall ()
| is_leq_upcall |
[const]
Test if the threshold type is "less-or-equal" (i.e., "<=").
Returns: true if the threshold type is "less-or-equal" (i.e., "<=").
const struct timeval& start_time ()
| start_time |
[const]
Get the start time for the most recent measurement interval window.
Returns: the start time for the most recent measurement interval window.
uint32_t measured_packets ()
| measured_packets |
[const]
Get the number of packets measured in the most recent interval window.
Returns: the number of packets measured in the most recent interval window.
uint32_t measured_bytes ()
| measured_bytes |
[const]
Get the number of bytes measured in the most recent interval window.
Returns: the number of bytes measured in the most recent interval window.
Generated by: pavlin on possum.icir.org on Mon Mar 10 19:34:53 2003, using kdoc 2.0a54+XORP. |