|
INET Framework for OMNeT++/OMNEST
|
00001 /* 00002 * Copyright (C) 2003 Andras Varga; CTIE, Monash University, Australia 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public License 00015 * along with this program; if not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef __INET_ETHERENCAP_H 00019 #define __INET_ETHERENCAP_H 00020 00021 #include <stdio.h> 00022 #include "Ethernet.h" 00023 #include "EtherFrame_m.h" 00024 00028 class INET_API EtherEncap : public cSimpleModule 00029 { 00030 protected: 00031 int seqNum; 00032 00033 // statistics 00034 long totalFromHigherLayer; // total number of packets received from higher layer 00035 long totalFromMAC; // total number of frames received from MAC 00036 long totalPauseSent; // total number of PAUSE frames sent 00037 00038 protected: 00039 virtual void initialize(); 00040 virtual void handleMessage(cMessage *msg); 00041 virtual void finish(); 00042 00043 virtual void processPacketFromHigherLayer(cPacket *msg); 00044 virtual void processFrameFromMAC(EtherFrame *msg); 00045 virtual void handleSendPause(cMessage *msg); 00046 00047 virtual void updateDisplayString(); 00048 }; 00049 00050 #endif 00051 00052