ethertap.hh (12055:945e851d846b) | ethertap.hh (12056:1ad5b3161819) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 25 unchanged lines hidden (view full) --- 34 35#ifndef __DEV_NET_ETHERTAP_HH__ 36#define __DEV_NET_ETHERTAP_HH__ 37 38#include <queue> 39#include <string> 40 41#include "base/pollevent.hh" | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 25 unchanged lines hidden (view full) --- 34 35#ifndef __DEV_NET_ETHERTAP_HH__ 36#define __DEV_NET_ETHERTAP_HH__ 37 38#include <queue> 39#include <string> 40 41#include "base/pollevent.hh" |
42#include "config/use_tuntap.hh" |
|
42#include "dev/net/etherint.hh" 43#include "dev/net/etherobject.hh" 44#include "dev/net/etherpkt.hh" | 43#include "dev/net/etherint.hh" 44#include "dev/net/etherobject.hh" 45#include "dev/net/etherpkt.hh" |
46 47#if USE_TUNTAP 48#include "params/EtherTap.hh" 49 50#endif 51 |
|
45#include "params/EtherTapStub.hh" 46#include "sim/eventq.hh" 47#include "sim/sim_object.hh" 48 49class TapEvent; 50class EtherTapInt; 51 52class EtherTapBase : public EtherObject --- 118 unchanged lines hidden (view full) --- 171 uint32_t buffer_used; 172 uint32_t frame_len; 173 174 void recvReal(int revent) override; 175 bool sendReal(const void *data, size_t len) override; 176}; 177 178 | 52#include "params/EtherTapStub.hh" 53#include "sim/eventq.hh" 54#include "sim/sim_object.hh" 55 56class TapEvent; 57class EtherTapInt; 58 59class EtherTapBase : public EtherObject --- 118 unchanged lines hidden (view full) --- 178 uint32_t buffer_used; 179 uint32_t frame_len; 180 181 void recvReal(int revent) override; 182 bool sendReal(const void *data, size_t len) override; 183}; 184 185 |
186#if USE_TUNTAP 187class EtherTap : public EtherTapBase 188{ 189 public: 190 typedef EtherTapParams Params; 191 EtherTap(const Params *p); 192 ~EtherTap(); 193 194 const Params * 195 params() const 196 { 197 return dynamic_cast<const Params *>(_params); 198 } 199 200 201 protected: 202 int tap; 203 204 void recvReal(int revent) override; 205 bool sendReal(const void *data, size_t len) override; 206}; 207#endif 208 209 |
|
179#endif // __DEV_NET_ETHERTAP_HH__ | 210#endif // __DEV_NET_ETHERTAP_HH__ |