diff --git a/build_num b/build_num index ea02a37ba..c8111136d 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 10 +#define BUILD_NUM 15 diff --git a/doc/ChangeLog b/doc/ChangeLog index ff04c9a9b..1c961a345 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,13 @@ +2008-07-01 Vadim Kurland + + * ObjectManipulator.cpp (ObjectManipulator::newICMP6): Added + support for ICMP6Service object type in the GUI + + * ICMP6Service.cpp (ICMP6Service::ICMP6Service): Added class + ICMP6Service + + * fwbuilder.dtd.in: Added XML element ICMP6Service + 2008-06-30 Vadim Kurland * PolicyCompiler_PrintRule.cpp (PrintRule::_printProtocol): do not diff --git a/src/gui/DialogFactory.cpp b/src/gui/DialogFactory.cpp index 1ed0662d9..185afaaae 100644 --- a/src/gui/DialogFactory.cpp +++ b/src/gui/DialogFactory.cpp @@ -92,6 +92,7 @@ #include "fwbuilder/CustomService.h" #include "fwbuilder/IPService.h" #include "fwbuilder/ICMPService.h" +#include "fwbuilder/ICMP6Service.h" #include "fwbuilder/TCPService.h" #include "fwbuilder/UDPService.h" #include "fwbuilder/ServiceGroup.h" @@ -148,6 +149,8 @@ QWidget *DialogFactory::createDialog(ProjectPanel *project, QWidget *parent,cons if (objType==ICMPService::TYPENAME) return new ICMPServiceDialog(project, parent); + if (objType==ICMP6Service::TYPENAME) return new ICMPServiceDialog(project, parent); + if (objType==TCPService::TYPENAME) return new TCPServiceDialog(project, parent); if (objType==UDPService::TYPENAME) return new UDPServiceDialog(project, parent); diff --git a/src/gui/FWBTree.cpp b/src/gui/FWBTree.cpp index 5872d3148..87f37f313 100644 --- a/src/gui/FWBTree.cpp +++ b/src/gui/FWBTree.cpp @@ -50,6 +50,7 @@ #include "fwbuilder/CustomService.h" #include "fwbuilder/IPService.h" #include "fwbuilder/ICMPService.h" +#include "fwbuilder/ICMP6Service.h" #include "fwbuilder/TCPService.h" #include "fwbuilder/UDPService.h" #include "fwbuilder/UserService.h" @@ -110,6 +111,7 @@ FWBTree::FWBTree() systemGroupPaths[CustomService::TYPENAME] = "Services/Custom"; systemGroupPaths[IPService::TYPENAME] = "Services/IP"; systemGroupPaths[ICMPService::TYPENAME] = "Services/ICMP"; + systemGroupPaths[ICMP6Service::TYPENAME] = "Services/ICMP"; systemGroupPaths[TCPService::TYPENAME] = "Services/TCP"; systemGroupPaths[UDPService::TYPENAME] = "Services/UDP"; systemGroupPaths[UserService::TYPENAME] = "Services/Users"; @@ -161,6 +163,9 @@ FWBTree::FWBTree() systemGroupTypes[ICMPService::TYPENAME]= ServiceGroup::TYPENAME; systemGroupNames[ICMPService::TYPENAME]= "ICMP" ; + systemGroupTypes[ICMP6Service::TYPENAME]= ServiceGroup::TYPENAME; + systemGroupNames[ICMP6Service::TYPENAME]= "ICMP" ; + systemGroupTypes[UserService::TYPENAME]= UserService::TYPENAME; systemGroupNames[UserService::TYPENAME]= "Users" ; diff --git a/src/gui/FWObjectPropertiesFactory.cpp b/src/gui/FWObjectPropertiesFactory.cpp index b6853fc47..89917329f 100644 --- a/src/gui/FWObjectPropertiesFactory.cpp +++ b/src/gui/FWObjectPropertiesFactory.cpp @@ -62,6 +62,7 @@ #include "fwbuilder/CustomService.h" #include "fwbuilder/IPService.h" #include "fwbuilder/ICMPService.h" +#include "fwbuilder/ICMP6Service.h" #include "fwbuilder/TCPService.h" #include "fwbuilder/UDPService.h" #include "fwbuilder/TagService.h" @@ -192,7 +193,7 @@ QString FWObjectPropertiesFactory::getObjectProperties(FWObject *obj) { str << QObject::tr("protocol: %1").arg(obj->getStr("protocol_num").c_str()); - } else if (ICMPService::isA(obj)) + } else if (ICMPService::isA(obj) || ICMP6Service::isA(obj)) { str << QObject::tr("type: %1").arg(obj->getStr("type").c_str()) << " " @@ -486,7 +487,7 @@ QString FWObjectPropertiesFactory::getObjectPropertiesDetailed(FWObject *obj, if (showPath && !tooltip) str += "Path: " + path + "
\n"; str += QObject::tr("protocol ") + obj->getStr("protocol_num").c_str(); - } else if (ICMPService::isA(obj)) + } else if (ICMPService::isA(obj) || ICMP6Service::isA(obj)) { if (showPath && !tooltip) str += "Path: " + path + "
\n"; str += QObject::tr("type: ") + obj->getStr("type").c_str() diff --git a/src/gui/FWWindow.cpp b/src/gui/FWWindow.cpp index 4dc2dd887..f00352328 100644 --- a/src/gui/FWWindow.cpp +++ b/src/gui/FWWindow.cpp @@ -87,15 +87,6 @@ #include "fwbuilder/Interface.h" #include "fwbuilder/RuleSet.h" -#include "fwbuilder/CustomService.h" -#include "fwbuilder/IPService.h" -#include "fwbuilder/ICMPService.h" -#include "fwbuilder/TCPService.h" -#include "fwbuilder/UDPService.h" -#include "fwbuilder/ServiceGroup.h" - -#include "fwbuilder/Interval.h" -#include "fwbuilder/IntervalGroup.h" #include "fwbuilder/FWObject.h" #include diff --git a/src/gui/FWWindowPrint.cpp b/src/gui/FWWindowPrint.cpp index 6a9b980a9..8ac23afe0 100644 --- a/src/gui/FWWindowPrint.cpp +++ b/src/gui/FWWindowPrint.cpp @@ -68,6 +68,7 @@ #include "fwbuilder/Host.h" #include "fwbuilder/Network.h" #include "fwbuilder/IPv4.h" +#include "fwbuilder/IPv6.h" #include "fwbuilder/AddressRange.h" #include "fwbuilder/ObjectGroup.h" @@ -79,6 +80,7 @@ #include "fwbuilder/CustomService.h" #include "fwbuilder/IPService.h" #include "fwbuilder/ICMPService.h" +#include "fwbuilder/ICMP6Service.h" #include "fwbuilder/TCPService.h" #include "fwbuilder/UDPService.h" #include "fwbuilder/ServiceGroup.h" @@ -98,6 +100,7 @@ QString legendList[] = { Firewall::TYPENAME, QObject::tr("Firewall"), Host::TYPENAME, QObject::tr("Host"), IPv4::TYPENAME, QObject::tr("Address"), + IPv6::TYPENAME, QObject::tr("Address"), AddressRange::TYPENAME, QObject::tr("Addres Range"), Interface::TYPENAME, QObject::tr("Interface"), Network::TYPENAME, QObject::tr("Network"), @@ -105,6 +108,7 @@ QString legendList[] = { CustomService::TYPENAME, QObject::tr("Custom Service"), IPService::TYPENAME, QObject::tr("IP Service"), ICMPService::TYPENAME, QObject::tr("ICMP Service"), + ICMP6Service::TYPENAME, QObject::tr("ICMP Service"), TCPService::TYPENAME, QObject::tr("TCP Service"), UDPService::TYPENAME, QObject::tr("UDP Service"), ServiceGroup::TYPENAME, QObject::tr("Group of services"), @@ -690,7 +694,8 @@ void FWWindow::filePrint() objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),Firewall::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + Firewall::TYPENAME); added = addObjectsToTable(objects, &fwObjTbl, row, col); if (fwbdebug) qDebug("Objects table: added %d firewalls",added); @@ -721,7 +726,8 @@ void FWWindow::filePrint() added = 0; objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),Host::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + Host::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); if (fwbdebug) qDebug("Objects table: added %d hosts",added); if (added) @@ -734,9 +740,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),Network::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + Network::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d networks",added); + if (fwbdebug) + qDebug("Objects table: added %d networks",added); if (added) { if (col!=0) @@ -747,9 +755,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),IPv4::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + IPv4::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d addresses",added); + if (fwbdebug) + qDebug("Objects table: added %d addresses",added); if (added) { if (col!=0) @@ -760,9 +770,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),AddressRange::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + IPv6::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d address ranges",added); + if (fwbdebug) + qDebug("Objects table: added %d ipv6 addresses",added); if (added) { if (col!=0) @@ -773,9 +785,26 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),ObjectGroup::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + AddressRange::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d obj groups",added); + if (fwbdebug) + qDebug("Objects table: added %d address ranges",added); + if (added) + { + if (col!=0) + { + row++; col=0; + objTbl.insertRow(row); + } + } + + objects.clear(); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + ObjectGroup::TYPENAME); + added=addObjectsToTable(objects,&objTbl,row,col); + if (fwbdebug) + qDebug("Objects table: added %d obj groups",added); if (added) { if (col!=0) @@ -787,9 +816,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),IPService::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + IPService::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d ip services",added); + if (fwbdebug) + qDebug("Objects table: added %d ip services",added); if (added) { if (col!=0) @@ -800,9 +831,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),ICMPService::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + ICMPService::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d icmp services",added); + if (fwbdebug) + qDebug("Objects table: added %d icmp services",added); if (added) { if (col!=0) @@ -813,9 +846,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),TCPService::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + ICMP6Service::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d tcp services",added); + if (fwbdebug) + qDebug("Objects table: added %d icmp6 services",added); if (added) { if (col!=0) @@ -826,9 +861,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),UDPService::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + TCPService::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d udp services",added); + if (fwbdebug) + qDebug("Objects table: added %d tcp services",added); if (added) { if (col!=0) @@ -839,9 +876,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),CustomService::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + UDPService::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d custom services",added); + if (fwbdebug) + qDebug("Objects table: added %d udp services",added); if (added) { if (col!=0) @@ -852,9 +891,26 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),ServiceGroup::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + CustomService::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d srv groups",added); + if (fwbdebug) + qDebug("Objects table: added %d custom services",added); + if (added) + { + if (col!=0) + { + row++; col=0; + objTbl.insertRow(row); + } + } + + objects.clear(); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + ServiceGroup::TYPENAME); + added=addObjectsToTable(objects,&objTbl,row,col); + if (fwbdebug) + qDebug("Objects table: added %d srv groups",added); if (added) { if (col!=0) @@ -866,9 +922,11 @@ void FWWindow::filePrint() } objects.clear(); - findAllUsedByType(objects,activeProject()->getVisibleFirewall(),Interval::TYPENAME); + findAllUsedByType(objects,activeProject()->getVisibleFirewall(), + Interval::TYPENAME); added=addObjectsToTable(objects,&objTbl,row,col); - if (fwbdebug) qDebug("Objects table: added %d time intervals",added); + if (fwbdebug) + qDebug("Objects table: added %d time intervals",added); if (added) { if (col!=0) diff --git a/src/gui/ICMPServiceDialog.cpp b/src/gui/ICMPServiceDialog.cpp index 8dbd27451..5609b31d5 100644 --- a/src/gui/ICMPServiceDialog.cpp +++ b/src/gui/ICMPServiceDialog.cpp @@ -36,6 +36,7 @@ #include "fwbuilder/Library.h" #include "fwbuilder/ICMPService.h" +#include "fwbuilder/ICMP6Service.h" #include #include @@ -70,6 +71,11 @@ void ICMPServiceDialog::loadFWObject(FWObject *o) ICMPService *s = dynamic_cast(obj); assert(s!=NULL); + if (ICMP6Service::isA(o)) + m_dialog->editorTitle->setText("ICMP6 Service"); + else + m_dialog->editorTitle->setText("ICMP Service"); + init=true; m_dialog->obj_name->setText( QString::fromUtf8(s->getName().c_str()) ); diff --git a/src/gui/MainRes.qrc b/src/gui/MainRes.qrc index a6d5329ed..a766b9298 100644 --- a/src/gui/MainRes.qrc +++ b/src/gui/MainRes.qrc @@ -175,11 +175,22 @@ Icons/service-group-ref_25.png Icons/service-group_16.png Icons/service-group_25.png + + Icons/service-icmp-neg_25.png Icons/service-icmp-neg_16.png Icons/service-icmp-ref_25.png Icons/service-icmp_16.png Icons/service-icmp_25.png + + + Icons/service-icmp-neg_25.png + Icons/service-icmp-neg_16.png + Icons/service-icmp-ref_25.png + Icons/service-icmp_16.png + Icons/service-icmp_25.png + + Icons/service-ip-neg_25.png Icons/service-ip-ref_25.png Icons/service-ip-neg_16.png diff --git a/src/gui/ObjectEditor.cpp b/src/gui/ObjectEditor.cpp index c9d8646eb..edf512df4 100644 --- a/src/gui/ObjectEditor.cpp +++ b/src/gui/ObjectEditor.cpp @@ -71,6 +71,7 @@ #include "fwbuilder/CustomService.h" #include "fwbuilder/IPService.h" #include "fwbuilder/ICMPService.h" +#include "fwbuilder/ICMP6Service.h" #include "fwbuilder/TCPService.h" #include "fwbuilder/UDPService.h" #include "fwbuilder/ServiceGroup.h" @@ -174,6 +175,10 @@ ObjectEditor::ObjectEditor( QWidget *parent, ProjectPanel *project): stackIds[ICMPService::TYPENAME] = parentWidget->addWidget(w); dialogs[stackIds[ICMPService::TYPENAME]] = w; + w= DialogFactory::createDialog(m_project, parent,ICMP6Service::TYPENAME); + stackIds[ICMP6Service::TYPENAME] = parentWidget->addWidget(w); + dialogs[stackIds[ICMP6Service::TYPENAME]] = w; + w= DialogFactory::createDialog(m_project, parent,TCPService::TYPENAME); stackIds[TCPService::TYPENAME] = parentWidget->addWidget(w); dialogs[stackIds[TCPService::TYPENAME]] = w; diff --git a/src/gui/ObjectManipulator.cpp b/src/gui/ObjectManipulator.cpp index d4166f0df..46944c7c9 100644 --- a/src/gui/ObjectManipulator.cpp +++ b/src/gui/ObjectManipulator.cpp @@ -106,6 +106,7 @@ #include "fwbuilder/CustomService.h" #include "fwbuilder/IPService.h" #include "fwbuilder/ICMPService.h" +#include "fwbuilder/ICMP6Service.h" #include "fwbuilder/TCPService.h" #include "fwbuilder/UDPService.h" #include "fwbuilder/ServiceGroup.h" @@ -163,28 +164,29 @@ ObjectManipulator::ObjectManipulator( QWidget *parent): newObjectPopup->addSeparator(); - newObjectPopup->addAction(QIcon(icon_path+Firewall::TYPENAME+"/icon-tree"), tr( "New &Firewall" ), this, SLOT( newFirewall() )); - newObjectPopup->addAction(QIcon(icon_path+Host::TYPENAME+"/icon-tree"), tr( "New &Host" ), this, SLOT( newHost() )); - newObjectPopup->addAction(QIcon(icon_path+Interface::TYPENAME+"/icon-tree"), tr( "New &Interface" ), this, SLOT( newInterface() )); - newObjectPopup->addAction(QIcon(icon_path+Network::TYPENAME+"/icon-tree"), tr( "New &Network" ), this, SLOT( newNetwork() )); - newObjectPopup->addAction(QIcon(icon_path+NetworkIPv6::TYPENAME+"/icon-tree"), tr( "New Network IPv&6" ), this, SLOT( newNetworkIPv6() )); - newObjectPopup->addAction(QIcon(icon_path+IPv4::TYPENAME+"/icon-tree"), tr( "New &Address" ), this, SLOT( newAddress() )); - newObjectPopup->addAction(QIcon(icon_path+IPv6::TYPENAME+"/icon-tree"), tr( "New Address I&Pv6" ), this, SLOT( newAddressIPv6() )); - newObjectPopup->addAction(QIcon(icon_path+DNSName::TYPENAME+"/icon-tree"), tr( "New &DNS Name" ), this, SLOT( newDNSName() )); - newObjectPopup->addAction(QIcon(icon_path+AddressTable::TYPENAME+"/icon-tree"), tr( "New A&ddress Table" ), this, SLOT( newAddressTable() )); - newObjectPopup->addAction(QIcon(icon_path+AddressRange::TYPENAME+"/icon-tree"), tr( "New Address &Range" ), this, SLOT( newAddressRange() )); - newObjectPopup->addAction(QIcon(icon_path+ObjectGroup::TYPENAME+"/icon-tree"), tr( "New &Object Group" ), this, SLOT( newObjectGroup() )); + newObjectPopup->addAction(QIcon(icon_path+Firewall::TYPENAME+"/icon-tree"), tr( "New Firewall" ), this, SLOT( newFirewall() )); + newObjectPopup->addAction(QIcon(icon_path+Host::TYPENAME+"/icon-tree"), tr( "New Host" ), this, SLOT( newHost() )); + newObjectPopup->addAction(QIcon(icon_path+Interface::TYPENAME+"/icon-tree"), tr( "New Interface" ), this, SLOT( newInterface() )); + newObjectPopup->addAction(QIcon(icon_path+Network::TYPENAME+"/icon-tree"), tr( "New Network" ), this, SLOT( newNetwork() )); + newObjectPopup->addAction(QIcon(icon_path+NetworkIPv6::TYPENAME+"/icon-tree"), tr( "New Network IPv6" ), this, SLOT( newNetworkIPv6() )); + newObjectPopup->addAction(QIcon(icon_path+IPv4::TYPENAME+"/icon-tree"), tr( "New Address" ), this, SLOT( newAddress() )); + newObjectPopup->addAction(QIcon(icon_path+IPv6::TYPENAME+"/icon-tree"), tr( "New Address IPv6" ), this, SLOT( newAddressIPv6() )); + newObjectPopup->addAction(QIcon(icon_path+DNSName::TYPENAME+"/icon-tree"), tr( "New DNS Name" ), this, SLOT( newDNSName() )); + newObjectPopup->addAction(QIcon(icon_path+AddressTable::TYPENAME+"/icon-tree"), tr( "New Address Table" ), this, SLOT( newAddressTable() )); + newObjectPopup->addAction(QIcon(icon_path+AddressRange::TYPENAME+"/icon-tree"), tr( "New Address Range" ), this, SLOT( newAddressRange() )); + newObjectPopup->addAction(QIcon(icon_path+ObjectGroup::TYPENAME+"/icon-tree"), tr( "New Object Group" ), this, SLOT( newObjectGroup() )); newObjectPopup->addSeparator(); - newObjectPopup->addAction(QIcon(icon_path+CustomService::TYPENAME+"/icon-tree"), tr( "New &Custom Service" ), this, SLOT( newCustom() )); - newObjectPopup->addAction(QIcon(icon_path+IPService::TYPENAME+"/icon-tree"), tr( "New &IP Service" ), this, SLOT( newIP() )); - newObjectPopup->addAction(QIcon(icon_path+ICMPService::TYPENAME+"/icon-tree"), tr( "New IC&MP Service" ), this, SLOT( newICMP() )); - newObjectPopup->addAction(QIcon(icon_path+TCPService::TYPENAME+"/icon-tree"), tr( "New &TCP Serivce" ), this, SLOT( newTCP() )); - newObjectPopup->addAction(QIcon(icon_path+UDPService::TYPENAME+"/icon-tree"), tr( "New &UDP Service" ), this, SLOT( newUDP() )); - newObjectPopup->addAction(QIcon(icon_path+TagService::TYPENAME+"/icon-tree"), tr( "New &TagService" ), this, SLOT( newTagService() )); - newObjectPopup->addAction(QIcon(icon_path+UserService::TYPENAME+"/icon-tree"), tr( "New &User Service" ), this, SLOT( newUserService() )); - newObjectPopup->addAction(QIcon(icon_path+ServiceGroup::TYPENAME+"/icon-tree"), tr( "New &Service Group" ), this, SLOT( newServiceGroup() )); + newObjectPopup->addAction(QIcon(icon_path+CustomService::TYPENAME+"/icon-tree"), tr( "New Custom Service" ), this, SLOT( newCustom() )); + newObjectPopup->addAction(QIcon(icon_path+IPService::TYPENAME+"/icon-tree"), tr( "New IP Service" ), this, SLOT( newIP() )); + newObjectPopup->addAction(QIcon(icon_path+ICMPService::TYPENAME+"/icon-tree"), tr( "New ICMP Service" ), this, SLOT( newICMP() )); + newObjectPopup->addAction(QIcon(icon_path+ICMP6Service::TYPENAME+"/icon-tree"), tr( "New ICMP6 Service" ), this, SLOT( newICMP6() )); + newObjectPopup->addAction(QIcon(icon_path+TCPService::TYPENAME+"/icon-tree"), tr( "New TCP Serivce" ), this, SLOT( newTCP() )); + newObjectPopup->addAction(QIcon(icon_path+UDPService::TYPENAME+"/icon-tree"), tr( "New UDP Service" ), this, SLOT( newUDP() )); + newObjectPopup->addAction(QIcon(icon_path+TagService::TYPENAME+"/icon-tree"), tr( "New TagService" ), this, SLOT( newTagService() )); + newObjectPopup->addAction(QIcon(icon_path+UserService::TYPENAME+"/icon-tree"), tr( "New User Service" ), this, SLOT( newUserService() )); + newObjectPopup->addAction(QIcon(icon_path+ServiceGroup::TYPENAME+"/icon-tree"), tr( "New Service Group" ), this, SLOT( newServiceGroup() )); newObjectPopup->addSeparator(); - newObjectPopup->addAction(QIcon(icon_path+Interval::TYPENAME+"/icon-tree"), tr( "New Ti&me Interval" ), this, SLOT( newInterval() )); + newObjectPopup->addAction(QIcon(icon_path+Interval::TYPENAME+"/icon-tree"), tr( "New Time Interval" ), this, SLOT( newInterval() )); // QToolButton *btn = (QToolButton*)toolBar->child("newObjectAction_action_button"); @@ -1135,8 +1137,12 @@ QAction *movID; SLOT( newIP() ) ); if (currentObj->getPath(true)=="Services/ICMP") + { newID1=popup->addAction( tr("New ICMP Service"), this , SLOT( newICMP() ) ); + newID2=popup->addAction( tr("New ICMP6 Service"), this , + SLOT( newICMP6() ) ); + } if (currentObj->getPath(true)=="Services/TCP") newID1=popup->addAction( tr("New TCP Service"), this , @@ -3206,6 +3212,17 @@ void ObjectManipulator::newICMP() } } +void ObjectManipulator::newICMP6() +{ + FWObject *o; + o=createObject(ICMP6Service::TYPENAME,tr("New ICMP6 Service")); + if (o!=NULL) + { + openObject(o); + editObject(o); + } +} + void ObjectManipulator::newTCP() { FWObject *o; diff --git a/src/gui/ObjectManipulator.h b/src/gui/ObjectManipulator.h index 5757a2f4c..b6bd5500d 100644 --- a/src/gui/ObjectManipulator.h +++ b/src/gui/ObjectManipulator.h @@ -189,6 +189,7 @@ public slots: void newCustom(); void newIP(); void newICMP(); + void newICMP6(); void newTCP(); void newUDP(); void newTagService(); diff --git a/src/gui/ProjectPanel.cpp b/src/gui/ProjectPanel.cpp index 4bc773244..8a7bbc720 100644 --- a/src/gui/ProjectPanel.cpp +++ b/src/gui/ProjectPanel.cpp @@ -89,13 +89,6 @@ #include "fwbuilder/Interface.h" #include "fwbuilder/RuleSet.h" -#include "fwbuilder/CustomService.h" -#include "fwbuilder/IPService.h" -#include "fwbuilder/ICMPService.h" -#include "fwbuilder/TCPService.h" -#include "fwbuilder/UDPService.h" -#include "fwbuilder/ServiceGroup.h" - #include "fwbuilder/Interval.h" #include "fwbuilder/IntervalGroup.h" #include "fwbuilder/FWObject.h" diff --git a/src/res/objects_init.xml b/src/res/objects_init.xml index 7846c5067..0953a89d4 100644 --- a/src/res/objects_init.xml +++ b/src/res/objects_init.xml @@ -159,6 +159,9 @@ + + + diff --git a/src/res/objects_init.xml.in b/src/res/objects_init.xml.in index 58734ccb0..38fc07b6b 100644 --- a/src/res/objects_init.xml.in +++ b/src/res/objects_init.xml.in @@ -159,6 +159,9 @@ + + + diff --git a/src/res/resources.xml b/src/res/resources.xml index d4b4c3170..c1cd072d6 100644 --- a/src/res/resources.xml +++ b/src/res/resources.xml @@ -344,6 +344,14 @@ service-icmp_16.png + + ICMP6 + service-icmp_25.png + service-icmp-neg_25.png + service-icmp-ref_25.png + service-icmp_16.png + + TCP service-tcp_25.png diff --git a/src/res/resources.xml.in b/src/res/resources.xml.in index 9332367ef..f6d3df392 100644 --- a/src/res/resources.xml.in +++ b/src/res/resources.xml.in @@ -344,6 +344,14 @@ service-icmp_16.png + + ICMP6 + service-icmp_25.png + service-icmp-neg_25.png + service-icmp-ref_25.png + service-icmp_16.png + + TCP service-tcp_25.png