ethertap.hh (12056:1ad5b3161819) ethertap.hh (12130:5e0dd4d7b730)
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;

--- 95 unchanged lines hidden (view full) ---

104 EtherInt *getEthPort(const std::string &if_name, int idx) override;
105
106 bool recvSimulated(EthPacketPtr packet);
107 void sendSimulated(void *data, size_t len);
108
109 protected:
110 std::queue<EthPacketPtr> packetBuffer;
111 void retransmit();
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;

--- 95 unchanged lines hidden (view full) ---

104 EtherInt *getEthPort(const std::string &if_name, int idx) override;
105
106 bool recvSimulated(EthPacketPtr packet);
107 void sendSimulated(void *data, size_t len);
108
109 protected:
110 std::queue<EthPacketPtr> packetBuffer;
111 void retransmit();
112
113 class TxEvent : public Event
114 {
115 protected:
116 EtherTapBase *tap;
117
118 public:
119 TxEvent(EtherTapBase *_tap) : tap(_tap) {}
120 void process() { tap->retransmit(); }
121 virtual const char *description() const
122 { return "EtherTapBase retransmit"; }
123 };
124
125 friend class TxEvent;
126 TxEvent txEvent;
112 EventFunctionWrapper txEvent;
127};
128
129class EtherTapInt : public EtherInt
130{
131 private:
132 EtherTapBase *tap;
133 public:
134 EtherTapInt(const std::string &name, EtherTapBase *t) :

--- 76 unchanged lines hidden ---
113};
114
115class EtherTapInt : public EtherInt
116{
117 private:
118 EtherTapBase *tap;
119 public:
120 EtherTapInt(const std::string &name, EtherTapBase *t) :

--- 76 unchanged lines hidden ---