diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-06-13 16:01:40 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-06-13 16:01:40 +0300 |
| commit | 58a92cb81084e33dcb291b7fef09eddccb7cef81 (patch) | |
| tree | b976dee92dbf018732ecf164f1b573ff9e9a8c77 /bgpd/bgp_fsm.h | |
| parent | 5b28833d38319ae5cb48235ae0261dd57e35dbd2 (diff) | |
bgpd: Use enum bgp_fsm_state_progress for bgp_stop()
```
bgpd/bgp_fsm.c:1360:29: warning: conflicting types for ‘bgp_stop’ due to enum/integer mismatch; have ‘enum bgp_fsm_state_progress(struct peer *)’ [-Wenum-int-mismatch]
1360 | enum bgp_fsm_state_progress bgp_stop(struct peer *peer)
| ^~~~~~~~
In file included from bgpd/bgp_fsm.c:29:
./bgpd/bgp_fsm.h:111:12: note: previous declaration of ‘bgp_stop’ with type ‘int(struct peer *)’
111 | extern int bgp_stop(struct peer *peer);
| ^~~~~~~~
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_fsm.h')
| -rw-r--r-- | bgpd/bgp_fsm.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h index e3cfd0c893..daf31b266e 100644 --- a/bgpd/bgp_fsm.h +++ b/bgpd/bgp_fsm.h @@ -7,6 +7,13 @@ #ifndef _QUAGGA_BGP_FSM_H #define _QUAGGA_BGP_FSM_H +enum bgp_fsm_state_progress { + BGP_FSM_FAILURE_AND_DELETE = -2, + BGP_FSM_FAILURE = -1, + BGP_FSM_SUCCESS = 0, + BGP_FSM_SUCCESS_STATE_TRANSFER = 1, +}; + /* Macro for BGP read, write and timer thread. */ #define BGP_TIMER_ON(T, F, V) \ do { \ @@ -108,7 +115,7 @@ extern void bgp_fsm_nht_update(struct peer *peer, bool has_valid_nexthops); extern void bgp_event(struct event *event); extern int bgp_event_update(struct peer *, enum bgp_fsm_events event); -extern int bgp_stop(struct peer *peer); +extern enum bgp_fsm_state_progress bgp_stop(struct peer *peer); extern void bgp_timer_set(struct peer *); extern void bgp_routeadv_timer(struct event *event); extern void bgp_fsm_change_status(struct peer *peer, |
