ethertap.cc (12056:1ad5b3161819) ethertap.cc (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;

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

79 public:
80 TapEvent(EtherTapBase *_tap, int fd, int e)
81 : PollEvent(fd, e), tap(_tap) {}
82 virtual void process(int revent) { tap->recvReal(revent); }
83};
84
85EtherTapBase::EtherTapBase(const Params *p)
86 : EtherObject(p), buflen(p->bufsz), dump(p->dump), event(NULL),
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;

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

79 public:
80 TapEvent(EtherTapBase *_tap, int fd, int e)
81 : PollEvent(fd, e), tap(_tap) {}
82 virtual void process(int revent) { tap->recvReal(revent); }
83};
84
85EtherTapBase::EtherTapBase(const Params *p)
86 : EtherObject(p), buflen(p->bufsz), dump(p->dump), event(NULL),
87 interface(NULL), txEvent(this)
87 interface(NULL),
88 txEvent([this]{ retransmit(); }, "EtherTapBase retransmit")
88{
89 buffer = new uint8_t[buflen];
90 interface = new EtherTapInt(name() + ".interface", this);
91}
92
93EtherTapBase::~EtherTapBase()
94{
95 delete buffer;

--- 363 unchanged lines hidden ---
89{
90 buffer = new uint8_t[buflen];
91 interface = new EtherTapInt(name() + ".interface", this);
92}
93
94EtherTapBase::~EtherTapBase()
95{
96 delete buffer;

--- 363 unchanged lines hidden ---