Adds sitara_depot/free_rtos Original one is on server_gorbunov/SmartForce4.0/sitara_depot
44 lines
940 B
C++
44 lines
940 B
C++
/*
|
|
* 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 "ethernet/eth_types.h"
|
|
#include "ethernet/eth_frame.h"
|
|
#include "handler_store/handler.hpp"
|
|
|
|
class EthStackIface {
|
|
public:
|
|
/**
|
|
* Óñòàíîâêà ñîáñòâåííîãî mac-àäðåñà
|
|
*/
|
|
virtual void set_mac_address(uint64_t mac_addr_be) = 0;
|
|
|
|
/**
|
|
* Îáðàáîò÷èê eth ïàêåòîâ
|
|
*/
|
|
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;
|
|
|
|
/**
|
|
* Ðåãèñòðàöèÿ îáðàáîò÷èêà eth-ïàêåòà
|
|
*/
|
|
virtual bool Register(uint32_t prot_id, Handler * p_handler) = 0;
|
|
|
|
virtual ~EthStackIface() {};
|
|
};
|
|
|
|
|
|
|
|
#endif /* FREE_RTOS_ETHERNET_IP_ETH_STACK_IFACE_HPP_ */
|