bonding lacp: replace slave string with member
[vpp.git] / src / plugins / lacp / tx_machine.h
1 /*
2  * Copyright (c) 2017 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15
16 #ifndef __LACP_TX_MACHINE_H__
17 #define __LACP_TX_MACHINE_H__
18
19 #include <stdint.h>
20 #include <lacp/machine.h>
21
22 #define foreach_lacp_tx_event          \
23   _(0, BEGIN, "begin")                 \
24   _(1, NTT, "Need To Transmit")
25
26 typedef enum
27 {
28 #define _(a, b, c) LACP_TX_EVENT_##b = (a),
29   foreach_lacp_tx_event
30 #undef _
31 } lacp_tx_event_t;
32
33 #define foreach_lacp_tx_sm_state       \
34   _(0, TRANSMIT, "transmit PDU")
35
36 typedef enum
37 {
38 #define _(a, b, c) LACP_TX_STATE_##b = (a),
39   foreach_lacp_tx_sm_state
40 #undef _
41 } lacp_tx_sm_state_t;
42
43 extern lacp_machine_t lacp_tx_machine;
44
45 int lacp_tx_action_transmit (void *p1, void *p2);
46 void lacp_tx_debug_func (member_if_t * mif, int event, int state,
47                          lacp_fsm_state_t * transition);
48
49 #define LACP_ACTION_TRANSMIT LACP_ACTION_ROUTINE(lacp_tx_action_transmit)
50
51 #endif /* __LACP_TX_MACHINE_H__ */
52
53 /*
54  * fd.io coding-style-patch-verification: ON
55  *
56  * Local Variables:
57  * eval: (c-set-style "gnu")
58  * End:
59  */