sitara_depot/components/free_rtos/ethernet_ip/eth_stack_iface.hpp

43 lines
957 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* eth_stack_iface.hpp
*
* Created on: 14 мар. 2023 г.
* Author: sychev
*/
#ifndef FREE_RTOS_ETHERNET_IP_ETH_STACK_IFACE_HPP_
#define FREE_RTOS_ETHERNET_IP_ETH_STACK_IFACE_HPP_
#include <cstdint>
#include "free_rtos/ethernet/eth_types.h"
#include "free_rtos/ethernet/eth_frame.h"
#include "free_rtos/ethernet/eth_tx_flow_iface.hpp"
#include "free_rtos/handler_store/handler.hpp"
struct EthStackHandlerArgs : public TxFlowHandlerArgs {
};
class EthStackIface {
public:
virtual void set_mac_address(uint64_t mac_addr_be) = 0;
virtual void rx_handler(uint8_t * p_data, uint32_t len) = 0;
virtual bool send_pkt(TEthMacPorts port_id, uint64_t mac_dst, uint16_t prot_id, TEthPkt& pkt) = 0;
virtual bool send_pkt(EthStackHandlerArgs& handlerArgs) = 0;
virtual bool Register(uint32_t prot_id, Handler * p_handler) = 0;
virtual ~EthStackIface() {};
};
#endif /* FREE_RTOS_ETHERNET_IP_ETH_STACK_IFACE_HPP_ */