INET Framework for OMNeT++/OMNEST
ansaLinkStateUpdateHandler6.h
Go to the documentation of this file.
00001 //
00002 // This program is free software: you can redistribute it and/or modify
00003 // it under the terms of the GNU Lesser General Public License as published by
00004 // the Free Software Foundation, either version 3 of the License, or
00005 // (at your option) any later version.
00006 // 
00007 // This program is distributed in the hope that it will be useful,
00008 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 // GNU Lesser General Public License for more details.
00011 // 
00012 // You should have received a copy of the GNU Lesser General Public License
00013 // along with this program.  If not, see http://www.gnu.org/licenses/.
00014 // 
00015 
00016 #ifndef ANSALINKSTATEUPDATEHANDLER6_H_
00017 #define ANSALINKSTATEUPDATEHANDLER6_H_
00018 
00019 #include "ansaOspfCommon6.h"
00020 #include "ansaIMessageHandler6.h"
00021 
00022 namespace AnsaOspf6 {
00023 
00024 class LinkStateUpdateHandler: public IMessageHandler {
00025 private:
00026    struct AcknowledgementFlags {
00027          bool floodedBackOut;
00028          bool lsaIsNewer;
00029          bool lsaIsDuplicate;
00030          bool impliedAcknowledgement;
00031          bool lsaReachedMaxAge;
00032          bool noLSAInstanceInDatabase;
00033          bool anyNeighborInExchangeOrLoadingState;
00034    };
00035 
00036 private:
00037    void AcknowledgeLSA(OspfLsaHeader6& lsaHeader, Interface* intf, AcknowledgementFlags acknowledgementFlags, RouterID lsaSource);
00038 
00039 public:
00040    LinkStateUpdateHandler(Router* containingRouter);
00041 
00042    void ProcessPacket(OspfPacket6* packet, Interface* intf, Neighbor* neighbor);
00043 };
00044 }
00045 
00046 #endif /* ANSALINKSTATEUPDATEHANDLER6_H_ */