33#ifndef __DEV_NET_ETHERTAP_HH__
34#define __DEV_NET_ETHERTAP_HH__
40#include "config/have_tuntap.hh"
45#include "params/EtherTap.hh"
49#include "params/EtherTapStub.hh"
165 using Params = EtherTapParams;
166 EtherTap(
const Params &p);
173 void recvReal(
int revent)
override;
174 bool sendReal(
const void *
data,
size_t len)
override;
const std::string & name() const
Return port name (for DPRINTF).
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void sendSimulated(void *data, size_t len)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
EtherTapBaseParams Params
virtual void recvReal(int revent)=0
bool recvSimulated(EthPacketPtr packet)
void serialize(CheckpointOut &cp) const override
Serialize an object.
std::queue< EthPacketPtr > packetBuffer
virtual bool sendReal(const void *data, size_t len)=0
EventFunctionWrapper txEvent
EtherTapBase(const Params &p)
bool recvPacket(EthPacketPtr pkt) override
EtherTapInt(const std::string &name, EtherTapBase *t)
EtherTapStub(const Params &p)
void serialize(CheckpointOut &cp) const override
Serialize an object.
EtherTapStubParams Params
void recvReal(int revent) override
void unserialize(CheckpointIn &cp) override
Unserialize an object.
bool sendReal(const void *data, size_t len) override
Ports are used to interface objects to each other.
Abstract superclass for simulation objects.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
std::ostream CheckpointOut
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
std::shared_ptr< EthPacketData > EthPacketPtr