diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-09-19 19:55:37 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-09-19 19:57:52 +0200 |
commit | cd1d99611e445c9fe2452d05627ccfc624f35c39 (patch) | |
tree | eeae5838682bbc556ebf291423505a77164192e2 /nest/protocol.h | |
parent | 7b2c5f3d2826e3175bf31b1c36056c9efc587a2b (diff) |
BGP: Shutdown communication (RFC 8203)
The patch implements BGP Administrative Shutdown Communication (RFC 8203)
allowing BGP operators to pass messages related to BGP session
administrative shutdown/restart. It handles both transmit and receive of
shutdown messages. Messages are logged and may be displayed by show
protocol all command.
Thanks to Job Snijders for the basic patch.
Diffstat (limited to 'nest/protocol.h')
-rw-r--r-- | nest/protocol.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nest/protocol.h b/nest/protocol.h index 18dfbd6f..5aca9a4e 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -164,6 +164,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 */ + char *message; /* State-change message, allocated from proto_pool */ struct proto_stats stats; /* Current protocol statistics */ /* @@ -250,6 +251,7 @@ struct proto_spec { void *proto_new(struct proto_config *, unsigned size); void *proto_config_new(struct protocol *, int class); void proto_copy_config(struct proto_config *dest, struct proto_config *src); +void proto_set_message(struct proto *p, char *msg, int len); void proto_request_feeding(struct proto *p); static inline void @@ -267,15 +269,15 @@ void proto_graceful_restart_unlock(struct proto *p); void proto_show_limit(struct proto_limit *l, const char *dsc); void proto_show_basic_info(struct proto *p); -void proto_cmd_show(struct proto *, uint, int); -void proto_cmd_disable(struct proto *, uint, int); -void proto_cmd_enable(struct proto *, uint, int); -void proto_cmd_restart(struct proto *, uint, int); -void proto_cmd_reload(struct proto *, uint, int); -void proto_cmd_debug(struct proto *, uint, int); -void proto_cmd_mrtdump(struct proto *, uint, int); +void proto_cmd_show(struct proto *, uintptr_t, int); +void proto_cmd_disable(struct proto *, uintptr_t, int); +void proto_cmd_enable(struct proto *, uintptr_t, int); +void proto_cmd_restart(struct proto *, uintptr_t, int); +void proto_cmd_reload(struct proto *, uintptr_t, int); +void proto_cmd_debug(struct proto *, uintptr_t, int); +void proto_cmd_mrtdump(struct proto *, uintptr_t, int); -void proto_apply_cmd(struct proto_spec ps, void (* cmd)(struct proto *, uint, int), int restricted, uint arg); +void proto_apply_cmd(struct proto_spec ps, void (* cmd)(struct proto *, uintptr_t, int), int restricted, uintptr_t arg); struct proto *proto_get_named(struct symbol *, struct protocol *); #define CMD_RELOAD 0 |