NOX: Dot2Llc - Separated protocol and widget as per new framework
This commit is contained in:
parent
a8dcc42d4c
commit
4608edf771
36
common/dot2llcconfig.h
Normal file
36
common/dot2llcconfig.h
Normal 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
|
@ -53,11 +53,11 @@ HEADERS += \
|
|||||||
eth2.h \
|
eth2.h \
|
||||||
dot3.h \
|
dot3.h \
|
||||||
llc.h \
|
llc.h \
|
||||||
|
dot2llc.h \
|
||||||
ip6.h
|
ip6.h
|
||||||
|
|
||||||
HEADERS1 += \
|
HEADERS1 += \
|
||||||
snap.h \
|
snap.h \
|
||||||
dot2llc.h \
|
|
||||||
dot2snap.h \
|
dot2snap.h \
|
||||||
arp.h \
|
arp.h \
|
||||||
ip4.h \
|
ip4.h \
|
||||||
|
@ -55,6 +55,7 @@ HEADERS += \
|
|||||||
eth2config.h \
|
eth2config.h \
|
||||||
dot3config.h \
|
dot3config.h \
|
||||||
llcconfig.h \
|
llcconfig.h \
|
||||||
|
dot2llcconfig.h \
|
||||||
ip6config.h
|
ip6config.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
|
@ -23,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
#include "protocol.pb.h"
|
#include "protocol.pb.h"
|
||||||
#if 0
|
#if 0
|
||||||
#include "snap.h"
|
#include "snap.h"
|
||||||
#include "dot2llc.h"
|
|
||||||
#include "dot2snap.h"
|
#include "dot2snap.h"
|
||||||
#include "arp.h"
|
#include "arp.h"
|
||||||
#include "ip4.h"
|
#include "ip4.h"
|
||||||
@ -48,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
#include "vlanstack.h"
|
#include "vlanstack.h"
|
||||||
#include "dot3.h"
|
#include "dot3.h"
|
||||||
#include "llc.h"
|
#include "llc.h"
|
||||||
|
#include "dot2llc.h"
|
||||||
#include "eth2.h"
|
#include "eth2.h"
|
||||||
#include "ip6.h"
|
#include "ip6.h"
|
||||||
#endif
|
#endif
|
||||||
@ -62,8 +62,6 @@ ProtocolManager::ProtocolManager()
|
|||||||
#if 0
|
#if 0
|
||||||
registerProtocol(OstProto::Protocol::kSnapFieldNumber,
|
registerProtocol(OstProto::Protocol::kSnapFieldNumber,
|
||||||
(void*) SnapProtocol::createInstance);
|
(void*) SnapProtocol::createInstance);
|
||||||
registerProtocol(OstProto::Protocol::kDot2LlcFieldNumber,
|
|
||||||
(void*) Dot2LlcProtocol::createInstance);
|
|
||||||
registerProtocol(OstProto::Protocol::kDot2SnapFieldNumber,
|
registerProtocol(OstProto::Protocol::kDot2SnapFieldNumber,
|
||||||
(void*) Dot2SnapProtocol::createInstance);
|
(void*) Dot2SnapProtocol::createInstance);
|
||||||
|
|
||||||
@ -119,6 +117,8 @@ ProtocolManager::ProtocolManager()
|
|||||||
(void*) Dot3Protocol::createInstance);
|
(void*) Dot3Protocol::createInstance);
|
||||||
registerProtocol(OstProto::Protocol::kLlcFieldNumber,
|
registerProtocol(OstProto::Protocol::kLlcFieldNumber,
|
||||||
(void*) LlcProtocol::createInstance);
|
(void*) LlcProtocol::createInstance);
|
||||||
|
registerProtocol(OstProto::Protocol::kDot2LlcFieldNumber,
|
||||||
|
(void*) Dot2LlcProtocol::createInstance);
|
||||||
|
|
||||||
registerProtocol(OstProto::Protocol::kIp6FieldNumber,
|
registerProtocol(OstProto::Protocol::kIp6FieldNumber,
|
||||||
(void*) Ip6Protocol::createInstance);
|
(void*) Ip6Protocol::createInstance);
|
||||||
|
@ -27,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
#include "eth2config.h"
|
#include "eth2config.h"
|
||||||
#include "dot3config.h"
|
#include "dot3config.h"
|
||||||
#include "llcconfig.h"
|
#include "llcconfig.h"
|
||||||
|
#include "dot2llcconfig.h"
|
||||||
#include "ip6config.h"
|
#include "ip6config.h"
|
||||||
|
|
||||||
ProtocolWidgetFactory *OstProtocolWidgetFactory;
|
ProtocolWidgetFactory *OstProtocolWidgetFactory;
|
||||||
@ -64,6 +65,9 @@ ProtocolWidgetFactory::ProtocolWidgetFactory()
|
|||||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||||
OstProto::Protocol::kLlcFieldNumber,
|
OstProto::Protocol::kLlcFieldNumber,
|
||||||
(void*) LlcConfigForm::createInstance);
|
(void*) LlcConfigForm::createInstance);
|
||||||
|
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||||
|
OstProto::Protocol::kDot2LlcFieldNumber,
|
||||||
|
(void*) Dot2LlcConfigForm::createInstance);
|
||||||
|
|
||||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||||
OstProto::Protocol::kIp6FieldNumber,
|
OstProto::Protocol::kIp6FieldNumber,
|
||||||
|
Loading…
Reference in New Issue
Block a user