diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-06-04 01:22:56 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-06-04 01:22:56 +0200 |
commit | 925fe2d3de0e12c644f91f94d13bf388aeda9b57 (patch) | |
tree | d9813e6386919303336553495f2010b42bd604e5 /nest/protocol.h | |
parent | c07c65d6d079eaf4525f03f5d126d51caa2595d6 (diff) | |
download | bird-925fe2d3de0e12c644f91f94d13bf388aeda9b57.tar bird-925fe2d3de0e12c644f91f94d13bf388aeda9b57.zip |
Implements route statistics and fixes some minor bugs.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r-- | nest/protocol.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nest/protocol.h b/nest/protocol.h index 865b2b3..eee3a74 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -87,6 +87,31 @@ struct proto_config { /* Protocol-specific data follow... */ }; + /* Protocol statistics */ +struct proto_stats { + /* Import - from protocol to core */ + u32 imp_routes; /* Number of routes successfully imported to the (adjacent) routing table */ + u32 pref_routes; /* Number of routes that are preferred, sum over all routing table */ + u32 imp_updates_received; /* Number of route updates received */ + u32 imp_updates_invalid; /* Number of route updates rejected as invalid */ + u32 imp_updates_filtered; /* Number of route updates rejected by filters */ + u32 imp_updates_ignored; /* Number of route updates rejected as already in route table */ + u32 imp_updates_accepted; /* Number of route updates accepted and imported */ + u32 imp_withdraws_received; /* Number of route withdraws received */ + u32 imp_withdraws_invalid; /* Number of route withdraws rejected as invalid */ + u32 imp_withdraws_ignored; /* Number of route withdraws rejected as already not in route table */ + u32 imp_withdraws_accepted; /* Number of route withdraws accepted and processed */ + + /* Export - from core to protocol */ + u32 exp_routes; /* Number of routes successfully exported to the protocol */ + u32 exp_updates_received; /* Number of route updates received */ + u32 exp_updates_rejected; /* Number of route updates rejected by protocol */ + u32 exp_updates_filtered; /* Number of route updates rejected by filters */ + u32 exp_updates_accepted; /* Number of route updates accepted and exported */ + u32 exp_withdraws_received; /* Number of route withdraws received */ + u32 exp_withdraws_accepted; /* Number of route withdraws accepted and processed */ +}; + struct proto { node n; /* Node in *_proto_list */ node glob_node; /* Node in global proto_list */ @@ -109,6 +134,7 @@ struct proto { u32 hash_key; /* Random key used for hashing of neighbors */ bird_clock_t last_state_change; /* Time of last state transition */ char *last_state_name_announced; /* Last state name we've announced to the user */ + struct proto_stats stats; /* Current protocol statistics */ /* * General protocol hooks: |