NOX: Dot2Snap - Separated protocol and widget as per new framework
This commit is contained in:
parent
38c17d5e5b
commit
24fbac9c5a
36
common/dot2snapconfig.h
Normal file
36
common/dot2snapconfig.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
Copyright (C) 2010 Srivats P.
|
||||
|
||||
This file is part of "Ostinato"
|
||||
|
||||
This is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
#ifndef _DOT2_SNAP_CONFIG_H
|
||||
#define _DOT2_SNAP_CONFIG_H
|
||||
|
||||
#include "comboprotocol.h"
|
||||
|
||||
#include "dot2llcconfig.h"
|
||||
#include "snapconfig.h"
|
||||
#include "dot2llc.h"
|
||||
#include "snap.h"
|
||||
|
||||
typedef ComboProtocolConfigForm <
|
||||
OstProto::Protocol::kDot2SnapFieldNumber,
|
||||
Dot2LlcConfigForm, SnapConfigForm,
|
||||
Dot2LlcProtocol, SnapProtocol
|
||||
> Dot2SnapConfigForm;
|
||||
|
||||
#endif
|
@ -55,10 +55,10 @@ HEADERS += \
|
||||
llc.h \
|
||||
dot2llc.h \
|
||||
snap.h \
|
||||
dot2snap.h \
|
||||
ip6.h
|
||||
|
||||
HEADERS1 += \
|
||||
dot2snap.h \
|
||||
arp.h \
|
||||
ip4.h \
|
||||
ipv4addressdelegate.h \
|
||||
|
@ -57,6 +57,7 @@ HEADERS += \
|
||||
llcconfig.h \
|
||||
dot2llcconfig.h \
|
||||
snapconfig.h \
|
||||
dot2snapconfig.h \
|
||||
ip6config.h
|
||||
|
||||
SOURCES += \
|
||||
|
@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
#include "protocol.pb.h"
|
||||
#if 0
|
||||
#include "dot2snap.h"
|
||||
#include "arp.h"
|
||||
#include "ip4.h"
|
||||
#include "ip6over4.h"
|
||||
@ -48,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#include "llc.h"
|
||||
#include "dot2llc.h"
|
||||
#include "snap.h"
|
||||
#include "dot2snap.h"
|
||||
#include "eth2.h"
|
||||
#include "ip6.h"
|
||||
#endif
|
||||
@ -60,9 +60,6 @@ ProtocolManager::ProtocolManager()
|
||||
themselves (once this is done remove the #includes for all the protocols)
|
||||
*/
|
||||
#if 0
|
||||
registerProtocol(OstProto::Protocol::kDot2SnapFieldNumber,
|
||||
(void*) Dot2SnapProtocol::createInstance);
|
||||
|
||||
registerProtocol(OstProto::Protocol::kArpFieldNumber,
|
||||
(void*) ArpProtocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kIp4FieldNumber,
|
||||
@ -119,6 +116,8 @@ ProtocolManager::ProtocolManager()
|
||||
(void*) Dot2LlcProtocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kSnapFieldNumber,
|
||||
(void*) SnapProtocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kDot2SnapFieldNumber,
|
||||
(void*) Dot2SnapProtocol::createInstance);
|
||||
|
||||
registerProtocol(OstProto::Protocol::kIp6FieldNumber,
|
||||
(void*) Ip6Protocol::createInstance);
|
||||
|
@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#include "llcconfig.h"
|
||||
#include "dot2llcconfig.h"
|
||||
#include "snapconfig.h"
|
||||
#include "dot2snapconfig.h"
|
||||
#include "ip6config.h"
|
||||
|
||||
ProtocolWidgetFactory *OstProtocolWidgetFactory;
|
||||
@ -72,6 +73,9 @@ ProtocolWidgetFactory::ProtocolWidgetFactory()
|
||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||
OstProto::Protocol::kSnapFieldNumber,
|
||||
(void*) SnapConfigForm::createInstance);
|
||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||
OstProto::Protocol::kDot2SnapFieldNumber,
|
||||
(void*) Dot2SnapConfigForm::createInstance);
|
||||
|
||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||
OstProto::Protocol::kIp6FieldNumber,
|
||||
|
Loading…
Reference in New Issue
Block a user