NOX: IPv4over6, IPv6over4, IPv6over6 - separated protocol and widget as per new framework
This commit is contained in:
parent
710b295d74
commit
3ba67e9ee3
35
common/ip4over6config.h
Normal file
35
common/ip4over6config.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
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 _IP_4_OVER_6_CONFIG_H
|
||||
#define _IP_4_OVER_6_CONFIG_H
|
||||
|
||||
#include "comboprotocolconfig.h"
|
||||
#include "ip4config.h"
|
||||
#include "ip6config.h"
|
||||
#include "ip4.h"
|
||||
#include "ip6.h"
|
||||
|
||||
typedef ComboProtocolConfigForm <
|
||||
OstProto::Protocol::kIp4over6FieldNumber,
|
||||
Ip6ConfigForm, Ip4ConfigForm,
|
||||
Ip6Protocol, Ip4Protocol
|
||||
> Ip4over6ConfigForm;
|
||||
|
||||
#endif
|
35
common/ip6over4config.h
Normal file
35
common/ip6over4config.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
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 _IP_6_OVER_4_CONFIG_H
|
||||
#define _IP_6_OVER_4_CONFIG_H
|
||||
|
||||
#include "comboprotocolconfig.h"
|
||||
#include "ip4config.h"
|
||||
#include "ip6config.h"
|
||||
#include "ip4.h"
|
||||
#include "ip6.h"
|
||||
|
||||
typedef ComboProtocolConfigForm <
|
||||
OstProto::Protocol::kIp6over4FieldNumber,
|
||||
Ip4ConfigForm, Ip6ConfigForm,
|
||||
Ip4Protocol, Ip6Protocol
|
||||
> Ip6over4ConfigForm;
|
||||
|
||||
#endif
|
33
common/ip6over6config.h
Normal file
33
common/ip6over6config.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
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 _IP_6_OVER_6_CONFIG_H
|
||||
#define _IP_6_OVER_6_CONFIG_H
|
||||
|
||||
#include "comboprotocolconfig.h"
|
||||
#include "ip6config.h"
|
||||
#include "ip6.h"
|
||||
|
||||
typedef ComboProtocolConfigForm <
|
||||
OstProto::Protocol::kIp6over6FieldNumber,
|
||||
Ip6ConfigForm, Ip6ConfigForm,
|
||||
Ip6Protocol, Ip6Protocol
|
||||
> Ip6over6ConfigForm;
|
||||
|
||||
#endif
|
@ -59,14 +59,14 @@ HEADERS += \
|
||||
arp.h \
|
||||
ip4.h \
|
||||
ip6.h \
|
||||
ip4over4.h
|
||||
ip4over4.h \
|
||||
ip4over6.h \
|
||||
ip6over4.h \
|
||||
ip6over6.h
|
||||
|
||||
HEADERS1 += \
|
||||
ipv4addressdelegate.h \
|
||||
ipv6addressdelegate.h \
|
||||
ip6over4.h \
|
||||
ip4over6.h \
|
||||
ip6over6.h \
|
||||
icmp.h \
|
||||
gmp.h \
|
||||
igmp.h \
|
||||
|
@ -22,9 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
#include "protocol.pb.h"
|
||||
#if 0
|
||||
#include "ip6over4.h"
|
||||
#include "ip4over6.h"
|
||||
#include "ip6over6.h"
|
||||
#include "icmp.h"
|
||||
#include "igmp.h"
|
||||
#include "mld.h"
|
||||
@ -50,6 +47,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#include "ip4.h"
|
||||
#include "ip6.h"
|
||||
#include "ip4over4.h"
|
||||
#include "ip4over6.h"
|
||||
#include "ip6over4.h"
|
||||
#include "ip6over6.h"
|
||||
#endif
|
||||
|
||||
ProtocolManager *OstProtocolManager;
|
||||
@ -60,13 +60,6 @@ ProtocolManager::ProtocolManager()
|
||||
themselves (once this is done remove the #includes for all the protocols)
|
||||
*/
|
||||
#if 0
|
||||
registerProtocol(OstProto::Protocol::kIp6over4FieldNumber,
|
||||
(void*) Ip6over4Protocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kIp4over6FieldNumber,
|
||||
(void*) Ip4over6Protocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kIp6over6FieldNumber,
|
||||
(void*) Ip6over6Protocol::createInstance);
|
||||
|
||||
registerProtocol(OstProto::Protocol::kIcmpFieldNumber,
|
||||
(void*) IcmpProtocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kIgmpFieldNumber,
|
||||
@ -122,6 +115,12 @@ ProtocolManager::ProtocolManager()
|
||||
|
||||
registerProtocol(OstProto::Protocol::kIp4over4FieldNumber,
|
||||
(void*) Ip4over4Protocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kIp4over6FieldNumber,
|
||||
(void*) Ip4over6Protocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kIp6over4FieldNumber,
|
||||
(void*) Ip6over4Protocol::createInstance);
|
||||
registerProtocol(OstProto::Protocol::kIp6over6FieldNumber,
|
||||
(void*) Ip6over6Protocol::createInstance);
|
||||
#endif
|
||||
populateNeighbourProtocols();
|
||||
}
|
||||
|
@ -34,6 +34,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#include "ip4config.h"
|
||||
#include "ip6config.h"
|
||||
#include "ip4over4config.h"
|
||||
#include "ip4over6config.h"
|
||||
#include "ip6over4config.h"
|
||||
#include "ip6over6config.h"
|
||||
|
||||
ProtocolWidgetFactory *OstProtocolWidgetFactory;
|
||||
QMap<int, void*> ProtocolWidgetFactory::configWidgetFactory;
|
||||
@ -93,6 +96,15 @@ ProtocolWidgetFactory::ProtocolWidgetFactory()
|
||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||
OstProto::Protocol::kIp4over4FieldNumber,
|
||||
(void*) Ip4over4ConfigForm::createInstance);
|
||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||
OstProto::Protocol::kIp4over6FieldNumber,
|
||||
(void*) Ip4over6ConfigForm::createInstance);
|
||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||
OstProto::Protocol::kIp6over4FieldNumber,
|
||||
(void*) Ip6over4ConfigForm::createInstance);
|
||||
OstProtocolWidgetFactory->registerProtocolConfigWidget(
|
||||
OstProto::Protocol::kIp6over6FieldNumber,
|
||||
(void*) Ip6over6ConfigForm::createInstance);
|
||||
}
|
||||
|
||||
ProtocolWidgetFactory::~ProtocolWidgetFactory()
|
||||
|
Loading…
Reference in New Issue
Block a user