diff --git a/common/ip4over6config.h b/common/ip4over6config.h new file mode 100644 index 0000000..b0ccf63 --- /dev/null +++ b/common/ip4over6config.h @@ -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 +*/ + +#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 diff --git a/common/ip6over4config.h b/common/ip6over4config.h new file mode 100644 index 0000000..b3c2390 --- /dev/null +++ b/common/ip6over4config.h @@ -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 +*/ + +#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 diff --git a/common/ip6over6config.h b/common/ip6over6config.h new file mode 100644 index 0000000..4324fe7 --- /dev/null +++ b/common/ip6over6config.h @@ -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 +*/ + +#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 diff --git a/common/ostproto.pro b/common/ostproto.pro index 42bfb59..2d7265f 100644 --- a/common/ostproto.pro +++ b/common/ostproto.pro @@ -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 \ diff --git a/common/protocolmanager.cpp b/common/protocolmanager.cpp index 35e7340..175864e 100644 --- a/common/protocolmanager.cpp +++ b/common/protocolmanager.cpp @@ -22,9 +22,6 @@ along with this program. If not, see #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 #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(); } diff --git a/common/protocolwidgetfactory.cpp b/common/protocolwidgetfactory.cpp index 3962a90..1d7f5bb 100644 --- a/common/protocolwidgetfactory.cpp +++ b/common/protocolwidgetfactory.cpp @@ -34,6 +34,9 @@ along with this program. If not, see #include "ip4config.h" #include "ip6config.h" #include "ip4over4config.h" +#include "ip4over6config.h" +#include "ip6over4config.h" +#include "ip6over6config.h" ProtocolWidgetFactory *OstProtocolWidgetFactory; QMap 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()