19cd2d7a5SSteven/*
29cd2d7a5SSteven * Copyright (c) 2017 Cisco and/or its affiliates.
39cd2d7a5SSteven * Licensed under the Apache License, Version 2.0 (the "License");
49cd2d7a5SSteven * you may not use this file except in compliance with the License.
59cd2d7a5SSteven * You may obtain a copy of the License at:
69cd2d7a5SSteven *
79cd2d7a5SSteven *     http://www.apache.org/licenses/LICENSE-2.0
89cd2d7a5SSteven *
99cd2d7a5SSteven * Unless required by applicable law or agreed to in writing, software
109cd2d7a5SSteven * distributed under the License is distributed on an "AS IS" BASIS,
119cd2d7a5SSteven * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
129cd2d7a5SSteven * See the License for the specific language governing permissions and
139cd2d7a5SSteven * limitations under the License.
149cd2d7a5SSteven */
159cd2d7a5SSteven
169cd2d7a5SSteven#ifndef	__LACP_TX_MACHINE_H__
179cd2d7a5SSteven#define	__LACP_TX_MACHINE_H__
189cd2d7a5SSteven
199cd2d7a5SSteven#include <stdint.h>
209cd2d7a5SSteven#include <lacp/machine.h>
219cd2d7a5SSteven
229cd2d7a5SSteven#define foreach_lacp_tx_event          \
239cd2d7a5SSteven  _(0, BEGIN, "begin")                 \
249cd2d7a5SSteven  _(1, NTT, "Need To Transmit")
259cd2d7a5SSteven
269cd2d7a5SSteventypedef enum
279cd2d7a5SSteven{
289cd2d7a5SSteven#define _(a, b, c) LACP_TX_EVENT_##b = (a),
299cd2d7a5SSteven  foreach_lacp_tx_event
309cd2d7a5SSteven#undef _
319cd2d7a5SSteven} lacp_tx_event_t;
329cd2d7a5SSteven
339cd2d7a5SSteven#define foreach_lacp_tx_sm_state       \
349cd2d7a5SSteven  _(0, TRANSMIT, "transmit PDU")
359cd2d7a5SSteven
369cd2d7a5SSteventypedef enum
379cd2d7a5SSteven{
389cd2d7a5SSteven#define _(a, b, c) LACP_TX_STATE_##b = (a),
399cd2d7a5SSteven  foreach_lacp_tx_sm_state
409cd2d7a5SSteven#undef _
419cd2d7a5SSteven} lacp_tx_sm_state_t;
429cd2d7a5SSteven
439cd2d7a5SStevenextern lacp_machine_t lacp_tx_machine;
449cd2d7a5SSteven
459cd2d7a5SStevenint lacp_tx_action_transmit (void *p1, void *p2);
469cd2d7a5SStevenvoid lacp_tx_debug_func (slave_if_t * sif, int event, int state,
479cd2d7a5SSteven			 lacp_fsm_state_t * transition);
489cd2d7a5SSteven
499cd2d7a5SSteven#define LACP_ACTION_TRANSMIT LACP_ACTION_ROUTINE(lacp_tx_action_transmit)
509cd2d7a5SSteven
519cd2d7a5SSteven#endif /* __LACP_TX_MACHINE_H__ */
529cd2d7a5SSteven
539cd2d7a5SSteven/*
549cd2d7a5SSteven * fd.io coding-style-patch-verification: ON
559cd2d7a5SSteven *
569cd2d7a5SSteven * Local Variables:
579cd2d7a5SSteven * eval: (c-set-style "gnu")
589cd2d7a5SSteven * End:
599cd2d7a5SSteven */
60