NOX: Dot2Llc - Separated protocol and widget as per new framework

This commit is contained in:
Srivats P. 2014-03-27 06:39:08 +05:30
parent a8dcc42d4c
commit 4608edf771
5 changed files with 45 additions and 4 deletions

36
common/dot2llcconfig.h Normal file
View File

@ -0,0 +1,36 @@
/*
Copyright (C) 2014 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_LLC_CONFIG_H
#define _DOT2_LLC_CONFIG_H
#include "comboprotocolconfig.h"
#include "dot3config.h"
#include "llcconfig.h"
#include "dot3.h"
#include "llc.h"
typedef ComboProtocolConfigForm <
OstProto::Protocol::kDot2LlcFieldNumber,
Dot3ConfigForm, LlcConfigForm,
Dot3Protocol, LlcProtocol
> Dot2LlcConfigForm;
#endif

View File

@ -53,11 +53,11 @@ HEADERS += \
eth2.h \
dot3.h \
llc.h \
dot2llc.h \
ip6.h
HEADERS1 += \
snap.h \
dot2llc.h \
dot2snap.h \
arp.h \
ip4.h \

View File

@ -55,6 +55,7 @@ HEADERS += \
eth2config.h \
dot3config.h \
llcconfig.h \
dot2llcconfig.h \
ip6config.h
SOURCES += \

View File

@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include "protocol.pb.h"
#if 0
#include "snap.h"
#include "dot2llc.h"
#include "dot2snap.h"
#include "arp.h"
#include "ip4.h"
@ -48,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include "vlanstack.h"
#include "dot3.h"
#include "llc.h"
#include "dot2llc.h"
#include "eth2.h"
#include "ip6.h"
#endif
@ -62,8 +62,6 @@ ProtocolManager::ProtocolManager()
#if 0
registerProtocol(OstProto::Protocol::kSnapFieldNumber,
(void*) SnapProtocol::createInstance);
registerProtocol(OstProto::Protocol::kDot2LlcFieldNumber,
(void*) Dot2LlcProtocol::createInstance);
registerProtocol(OstProto::Protocol::kDot2SnapFieldNumber,
(void*) Dot2SnapProtocol::createInstance);
@ -119,6 +117,8 @@ ProtocolManager::ProtocolManager()
(void*) Dot3Protocol::createInstance);
registerProtocol(OstProto::Protocol::kLlcFieldNumber,
(void*) LlcProtocol::createInstance);
registerProtocol(OstProto::Protocol::kDot2LlcFieldNumber,
(void*) Dot2LlcProtocol::createInstance);
registerProtocol(OstProto::Protocol::kIp6FieldNumber,
(void*) Ip6Protocol::createInstance);

View File

@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
#include "eth2config.h"
#include "dot3config.h"
#include "llcconfig.h"
#include "dot2llcconfig.h"
#include "ip6config.h"
ProtocolWidgetFactory *OstProtocolWidgetFactory;
@ -64,6 +65,9 @@ ProtocolWidgetFactory::ProtocolWidgetFactory()
OstProtocolWidgetFactory->registerProtocolConfigWidget(
OstProto::Protocol::kLlcFieldNumber,
(void*) LlcConfigForm::createInstance);
OstProtocolWidgetFactory->registerProtocolConfigWidget(
OstProto::Protocol::kDot2LlcFieldNumber,
(void*) Dot2LlcConfigForm::createInstance);
OstProtocolWidgetFactory->registerProtocolConfigWidget(
OstProto::Protocol::kIp6FieldNumber,