Added support for ICMP6Service

This commit is contained in:
Vadim Kurland
2008-07-02 01:17:30 +00:00
parent f93455e445
commit 1dc6a8779d
17 changed files with 186 additions and 63 deletions
+1 -1
View File
@@ -1 +1 @@
#define BUILD_NUM 10 #define BUILD_NUM 15
+10
View File
@@ -1,3 +1,13 @@
2008-07-01 Vadim Kurland <vadim@vk.crocodile.org>
* 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 <vadim@vk.crocodile.org> 2008-06-30 Vadim Kurland <vadim@vk.crocodile.org>
* PolicyCompiler_PrintRule.cpp (PrintRule::_printProtocol): do not * PolicyCompiler_PrintRule.cpp (PrintRule::_printProtocol): do not
+3
View File
@@ -92,6 +92,7 @@
#include "fwbuilder/CustomService.h" #include "fwbuilder/CustomService.h"
#include "fwbuilder/IPService.h" #include "fwbuilder/IPService.h"
#include "fwbuilder/ICMPService.h" #include "fwbuilder/ICMPService.h"
#include "fwbuilder/ICMP6Service.h"
#include "fwbuilder/TCPService.h" #include "fwbuilder/TCPService.h"
#include "fwbuilder/UDPService.h" #include "fwbuilder/UDPService.h"
#include "fwbuilder/ServiceGroup.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==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==TCPService::TYPENAME) return new TCPServiceDialog(project, parent);
if (objType==UDPService::TYPENAME) return new UDPServiceDialog(project, parent); if (objType==UDPService::TYPENAME) return new UDPServiceDialog(project, parent);
+5
View File
@@ -50,6 +50,7 @@
#include "fwbuilder/CustomService.h" #include "fwbuilder/CustomService.h"
#include "fwbuilder/IPService.h" #include "fwbuilder/IPService.h"
#include "fwbuilder/ICMPService.h" #include "fwbuilder/ICMPService.h"
#include "fwbuilder/ICMP6Service.h"
#include "fwbuilder/TCPService.h" #include "fwbuilder/TCPService.h"
#include "fwbuilder/UDPService.h" #include "fwbuilder/UDPService.h"
#include "fwbuilder/UserService.h" #include "fwbuilder/UserService.h"
@@ -110,6 +111,7 @@ FWBTree::FWBTree()
systemGroupPaths[CustomService::TYPENAME] = "Services/Custom"; systemGroupPaths[CustomService::TYPENAME] = "Services/Custom";
systemGroupPaths[IPService::TYPENAME] = "Services/IP"; systemGroupPaths[IPService::TYPENAME] = "Services/IP";
systemGroupPaths[ICMPService::TYPENAME] = "Services/ICMP"; systemGroupPaths[ICMPService::TYPENAME] = "Services/ICMP";
systemGroupPaths[ICMP6Service::TYPENAME] = "Services/ICMP";
systemGroupPaths[TCPService::TYPENAME] = "Services/TCP"; systemGroupPaths[TCPService::TYPENAME] = "Services/TCP";
systemGroupPaths[UDPService::TYPENAME] = "Services/UDP"; systemGroupPaths[UDPService::TYPENAME] = "Services/UDP";
systemGroupPaths[UserService::TYPENAME] = "Services/Users"; systemGroupPaths[UserService::TYPENAME] = "Services/Users";
@@ -161,6 +163,9 @@ FWBTree::FWBTree()
systemGroupTypes[ICMPService::TYPENAME]= ServiceGroup::TYPENAME; systemGroupTypes[ICMPService::TYPENAME]= ServiceGroup::TYPENAME;
systemGroupNames[ICMPService::TYPENAME]= "ICMP" ; systemGroupNames[ICMPService::TYPENAME]= "ICMP" ;
systemGroupTypes[ICMP6Service::TYPENAME]= ServiceGroup::TYPENAME;
systemGroupNames[ICMP6Service::TYPENAME]= "ICMP" ;
systemGroupTypes[UserService::TYPENAME]= UserService::TYPENAME; systemGroupTypes[UserService::TYPENAME]= UserService::TYPENAME;
systemGroupNames[UserService::TYPENAME]= "Users" ; systemGroupNames[UserService::TYPENAME]= "Users" ;
+3 -2
View File
@@ -62,6 +62,7 @@
#include "fwbuilder/CustomService.h" #include "fwbuilder/CustomService.h"
#include "fwbuilder/IPService.h" #include "fwbuilder/IPService.h"
#include "fwbuilder/ICMPService.h" #include "fwbuilder/ICMPService.h"
#include "fwbuilder/ICMP6Service.h"
#include "fwbuilder/TCPService.h" #include "fwbuilder/TCPService.h"
#include "fwbuilder/UDPService.h" #include "fwbuilder/UDPService.h"
#include "fwbuilder/TagService.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()); 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()) str << QObject::tr("type: %1").arg(obj->getStr("type").c_str())
<< " " << " "
@@ -486,7 +487,7 @@ QString FWObjectPropertiesFactory::getObjectPropertiesDetailed(FWObject *obj,
if (showPath && !tooltip) str += "<b>Path: </b>" + path + "<br>\n"; if (showPath && !tooltip) str += "<b>Path: </b>" + path + "<br>\n";
str += QObject::tr("protocol ") + obj->getStr("protocol_num").c_str(); 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 += "<b>Path: </b>" + path + "<br>\n"; if (showPath && !tooltip) str += "<b>Path: </b>" + path + "<br>\n";
str += QObject::tr("type: ") + obj->getStr("type").c_str() str += QObject::tr("type: ") + obj->getStr("type").c_str()
-9
View File
@@ -87,15 +87,6 @@
#include "fwbuilder/Interface.h" #include "fwbuilder/Interface.h"
#include "fwbuilder/RuleSet.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 "fwbuilder/FWObject.h"
#include <sys/types.h> #include <sys/types.h>
+82 -24
View File
@@ -68,6 +68,7 @@
#include "fwbuilder/Host.h" #include "fwbuilder/Host.h"
#include "fwbuilder/Network.h" #include "fwbuilder/Network.h"
#include "fwbuilder/IPv4.h" #include "fwbuilder/IPv4.h"
#include "fwbuilder/IPv6.h"
#include "fwbuilder/AddressRange.h" #include "fwbuilder/AddressRange.h"
#include "fwbuilder/ObjectGroup.h" #include "fwbuilder/ObjectGroup.h"
@@ -79,6 +80,7 @@
#include "fwbuilder/CustomService.h" #include "fwbuilder/CustomService.h"
#include "fwbuilder/IPService.h" #include "fwbuilder/IPService.h"
#include "fwbuilder/ICMPService.h" #include "fwbuilder/ICMPService.h"
#include "fwbuilder/ICMP6Service.h"
#include "fwbuilder/TCPService.h" #include "fwbuilder/TCPService.h"
#include "fwbuilder/UDPService.h" #include "fwbuilder/UDPService.h"
#include "fwbuilder/ServiceGroup.h" #include "fwbuilder/ServiceGroup.h"
@@ -98,6 +100,7 @@ QString legendList[] = {
Firewall::TYPENAME, QObject::tr("Firewall"), Firewall::TYPENAME, QObject::tr("Firewall"),
Host::TYPENAME, QObject::tr("Host"), Host::TYPENAME, QObject::tr("Host"),
IPv4::TYPENAME, QObject::tr("Address"), IPv4::TYPENAME, QObject::tr("Address"),
IPv6::TYPENAME, QObject::tr("Address"),
AddressRange::TYPENAME, QObject::tr("Addres Range"), AddressRange::TYPENAME, QObject::tr("Addres Range"),
Interface::TYPENAME, QObject::tr("Interface"), Interface::TYPENAME, QObject::tr("Interface"),
Network::TYPENAME, QObject::tr("Network"), Network::TYPENAME, QObject::tr("Network"),
@@ -105,6 +108,7 @@ QString legendList[] = {
CustomService::TYPENAME, QObject::tr("Custom Service"), CustomService::TYPENAME, QObject::tr("Custom Service"),
IPService::TYPENAME, QObject::tr("IP Service"), IPService::TYPENAME, QObject::tr("IP Service"),
ICMPService::TYPENAME, QObject::tr("ICMP Service"), ICMPService::TYPENAME, QObject::tr("ICMP Service"),
ICMP6Service::TYPENAME, QObject::tr("ICMP Service"),
TCPService::TYPENAME, QObject::tr("TCP Service"), TCPService::TYPENAME, QObject::tr("TCP Service"),
UDPService::TYPENAME, QObject::tr("UDP Service"), UDPService::TYPENAME, QObject::tr("UDP Service"),
ServiceGroup::TYPENAME, QObject::tr("Group of services"), ServiceGroup::TYPENAME, QObject::tr("Group of services"),
@@ -690,7 +694,8 @@ void FWWindow::filePrint()
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),Firewall::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
Firewall::TYPENAME);
added = addObjectsToTable(objects, &fwObjTbl, row, col); added = addObjectsToTable(objects, &fwObjTbl, row, col);
if (fwbdebug) qDebug("Objects table: added %d firewalls",added); if (fwbdebug) qDebug("Objects table: added %d firewalls",added);
@@ -721,7 +726,8 @@ void FWWindow::filePrint()
added = 0; added = 0;
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),Host::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
Host::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); added=addObjectsToTable(objects,&objTbl,row,col);
if (fwbdebug) qDebug("Objects table: added %d hosts",added); if (fwbdebug) qDebug("Objects table: added %d hosts",added);
if (added) if (added)
@@ -734,9 +740,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),Network::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
Network::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -747,9 +755,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),IPv4::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
IPv4::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -760,9 +770,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),AddressRange::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
IPv6::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -773,9 +785,26 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),ObjectGroup::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
AddressRange::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -787,9 +816,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),IPService::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
IPService::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -800,9 +831,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),ICMPService::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
ICMPService::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -813,9 +846,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),TCPService::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
ICMP6Service::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -826,9 +861,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),UDPService::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
TCPService::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -839,9 +876,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),CustomService::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
UDPService::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -852,9 +891,26 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),ServiceGroup::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
CustomService::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
@@ -866,9 +922,11 @@ void FWWindow::filePrint()
} }
objects.clear(); objects.clear();
findAllUsedByType(objects,activeProject()->getVisibleFirewall(),Interval::TYPENAME); findAllUsedByType(objects,activeProject()->getVisibleFirewall(),
Interval::TYPENAME);
added=addObjectsToTable(objects,&objTbl,row,col); 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 (added)
{ {
if (col!=0) if (col!=0)
+6
View File
@@ -36,6 +36,7 @@
#include "fwbuilder/Library.h" #include "fwbuilder/Library.h"
#include "fwbuilder/ICMPService.h" #include "fwbuilder/ICMPService.h"
#include "fwbuilder/ICMP6Service.h"
#include <qlineedit.h> #include <qlineedit.h>
#include <qspinbox.h> #include <qspinbox.h>
@@ -70,6 +71,11 @@ void ICMPServiceDialog::loadFWObject(FWObject *o)
ICMPService *s = dynamic_cast<ICMPService*>(obj); ICMPService *s = dynamic_cast<ICMPService*>(obj);
assert(s!=NULL); assert(s!=NULL);
if (ICMP6Service::isA(o))
m_dialog->editorTitle->setText("ICMP6 Service");
else
m_dialog->editorTitle->setText("ICMP Service");
init=true; init=true;
m_dialog->obj_name->setText( QString::fromUtf8(s->getName().c_str()) ); m_dialog->obj_name->setText( QString::fromUtf8(s->getName().c_str()) );
+11
View File
@@ -175,11 +175,22 @@
<file alias="Icons/ServiceGroup/icon-ref">Icons/service-group-ref_25.png</file> <file alias="Icons/ServiceGroup/icon-ref">Icons/service-group-ref_25.png</file>
<file alias="Icons/ServiceGroup/icon-tree">Icons/service-group_16.png</file> <file alias="Icons/ServiceGroup/icon-tree">Icons/service-group_16.png</file>
<file alias="Icons/ServiceGroup/icon">Icons/service-group_25.png</file> <file alias="Icons/ServiceGroup/icon">Icons/service-group_25.png</file>
<file alias="Icons/ICMPService/icon-neg">Icons/service-icmp-neg_25.png</file> <file alias="Icons/ICMPService/icon-neg">Icons/service-icmp-neg_25.png</file>
<file alias="Icons/ICMPService/icon-neg-tree">Icons/service-icmp-neg_16.png</file> <file alias="Icons/ICMPService/icon-neg-tree">Icons/service-icmp-neg_16.png</file>
<file alias="Icons/ICMPService/icon-ref">Icons/service-icmp-ref_25.png</file> <file alias="Icons/ICMPService/icon-ref">Icons/service-icmp-ref_25.png</file>
<file alias="Icons/ICMPService/icon-tree">Icons/service-icmp_16.png</file> <file alias="Icons/ICMPService/icon-tree">Icons/service-icmp_16.png</file>
<file alias="Icons/ICMPService/icon">Icons/service-icmp_25.png</file> <file alias="Icons/ICMPService/icon">Icons/service-icmp_25.png</file>
<file alias="Icons/ICMP6Service/icon-neg">Icons/service-icmp-neg_25.png</file>
<file alias="Icons/ICMP6Service/icon-neg-tree">Icons/service-icmp-neg_16.png</file>
<file alias="Icons/ICMP6Service/icon-ref">Icons/service-icmp-ref_25.png</file>
<file alias="Icons/ICMP6Service/icon-tree">Icons/service-icmp_16.png</file>
<file alias="Icons/ICMP6Service/icon">Icons/service-icmp_25.png</file>
<file alias="Icons/IPService/icon-neg">Icons/service-ip-neg_25.png</file> <file alias="Icons/IPService/icon-neg">Icons/service-ip-neg_25.png</file>
<file alias="Icons/IPService/icon-ref">Icons/service-ip-ref_25.png</file> <file alias="Icons/IPService/icon-ref">Icons/service-ip-ref_25.png</file>
<file alias="Icons/IPService/icon-neg-tree">Icons/service-ip-neg_16.png</file> <file alias="Icons/IPService/icon-neg-tree">Icons/service-ip-neg_16.png</file>
+5
View File
@@ -71,6 +71,7 @@
#include "fwbuilder/CustomService.h" #include "fwbuilder/CustomService.h"
#include "fwbuilder/IPService.h" #include "fwbuilder/IPService.h"
#include "fwbuilder/ICMPService.h" #include "fwbuilder/ICMPService.h"
#include "fwbuilder/ICMP6Service.h"
#include "fwbuilder/TCPService.h" #include "fwbuilder/TCPService.h"
#include "fwbuilder/UDPService.h" #include "fwbuilder/UDPService.h"
#include "fwbuilder/ServiceGroup.h" #include "fwbuilder/ServiceGroup.h"
@@ -174,6 +175,10 @@ ObjectEditor::ObjectEditor( QWidget *parent, ProjectPanel *project):
stackIds[ICMPService::TYPENAME] = parentWidget->addWidget(w); stackIds[ICMPService::TYPENAME] = parentWidget->addWidget(w);
dialogs[stackIds[ICMPService::TYPENAME]] = 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); w= DialogFactory::createDialog(m_project, parent,TCPService::TYPENAME);
stackIds[TCPService::TYPENAME] = parentWidget->addWidget(w); stackIds[TCPService::TYPENAME] = parentWidget->addWidget(w);
dialogs[stackIds[TCPService::TYPENAME]] = w; dialogs[stackIds[TCPService::TYPENAME]] = w;
+37 -20
View File
@@ -106,6 +106,7 @@
#include "fwbuilder/CustomService.h" #include "fwbuilder/CustomService.h"
#include "fwbuilder/IPService.h" #include "fwbuilder/IPService.h"
#include "fwbuilder/ICMPService.h" #include "fwbuilder/ICMPService.h"
#include "fwbuilder/ICMP6Service.h"
#include "fwbuilder/TCPService.h" #include "fwbuilder/TCPService.h"
#include "fwbuilder/UDPService.h" #include "fwbuilder/UDPService.h"
#include "fwbuilder/ServiceGroup.h" #include "fwbuilder/ServiceGroup.h"
@@ -163,28 +164,29 @@ ObjectManipulator::ObjectManipulator( QWidget *parent):
newObjectPopup->addSeparator(); newObjectPopup->addSeparator();
newObjectPopup->addAction(QIcon(icon_path+Firewall::TYPENAME+"/icon-tree"), tr( "New &Firewall" ), this, SLOT( newFirewall() )); 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+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+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+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+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+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+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+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+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+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+ObjectGroup::TYPENAME+"/icon-tree"), tr( "New Object Group" ), this, SLOT( newObjectGroup() ));
newObjectPopup->addSeparator(); newObjectPopup->addSeparator();
newObjectPopup->addAction(QIcon(icon_path+CustomService::TYPENAME+"/icon-tree"), tr( "New &Custom Service" ), this, SLOT( newCustom() )); 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+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+ICMPService::TYPENAME+"/icon-tree"), tr( "New ICMP 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+ICMP6Service::TYPENAME+"/icon-tree"), tr( "New ICMP6 Service" ), this, SLOT( newICMP6() ));
newObjectPopup->addAction(QIcon(icon_path+UDPService::TYPENAME+"/icon-tree"), tr( "New &UDP Service" ), this, SLOT( newUDP() )); newObjectPopup->addAction(QIcon(icon_path+TCPService::TYPENAME+"/icon-tree"), tr( "New TCP Serivce" ), this, SLOT( newTCP() ));
newObjectPopup->addAction(QIcon(icon_path+TagService::TYPENAME+"/icon-tree"), tr( "New &TagService" ), this, SLOT( newTagService() )); newObjectPopup->addAction(QIcon(icon_path+UDPService::TYPENAME+"/icon-tree"), tr( "New UDP Service" ), this, SLOT( newUDP() ));
newObjectPopup->addAction(QIcon(icon_path+UserService::TYPENAME+"/icon-tree"), tr( "New &User Service" ), this, SLOT( newUserService() )); newObjectPopup->addAction(QIcon(icon_path+TagService::TYPENAME+"/icon-tree"), tr( "New TagService" ), this, SLOT( newTagService() ));
newObjectPopup->addAction(QIcon(icon_path+ServiceGroup::TYPENAME+"/icon-tree"), tr( "New &Service Group" ), this, SLOT( newServiceGroup() )); 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->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"); // QToolButton *btn = (QToolButton*)toolBar->child("newObjectAction_action_button");
@@ -1135,8 +1137,12 @@ QAction *movID;
SLOT( newIP() ) ); SLOT( newIP() ) );
if (currentObj->getPath(true)=="Services/ICMP") if (currentObj->getPath(true)=="Services/ICMP")
{
newID1=popup->addAction( tr("New ICMP Service"), this , newID1=popup->addAction( tr("New ICMP Service"), this ,
SLOT( newICMP() ) ); SLOT( newICMP() ) );
newID2=popup->addAction( tr("New ICMP6 Service"), this ,
SLOT( newICMP6() ) );
}
if (currentObj->getPath(true)=="Services/TCP") if (currentObj->getPath(true)=="Services/TCP")
newID1=popup->addAction( tr("New TCP Service"), this , 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() void ObjectManipulator::newTCP()
{ {
FWObject *o; FWObject *o;
+1
View File
@@ -189,6 +189,7 @@ public slots:
void newCustom(); void newCustom();
void newIP(); void newIP();
void newICMP(); void newICMP();
void newICMP6();
void newTCP(); void newTCP();
void newUDP(); void newUDP();
void newTagService(); void newTagService();
-7
View File
@@ -89,13 +89,6 @@
#include "fwbuilder/Interface.h" #include "fwbuilder/Interface.h"
#include "fwbuilder/RuleSet.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/Interval.h"
#include "fwbuilder/IntervalGroup.h" #include "fwbuilder/IntervalGroup.h"
#include "fwbuilder/FWObject.h" #include "fwbuilder/FWObject.h"
+3
View File
@@ -159,6 +159,9 @@
<ICMPService code="3" comment="Port unreachable" id="icmp-Port_unreach" name="port unreach" type="3"/> <ICMPService code="3" comment="Port unreachable" id="icmp-Port_unreach" name="port unreach" type="3"/>
<ICMPService code="0" comment="ICMP messages of this type are needed for traceroute" id="icmp-Time_exceeded" name="time exceeded" type="11"/> <ICMPService code="0" comment="ICMP messages of this type are needed for traceroute" id="icmp-Time_exceeded" name="time exceeded" type="11"/>
<ICMPService code="1" comment="" id="icmp-Time_exceeded_in_transit" name="time exceeded in transit" type="11"/> <ICMPService code="1" comment="" id="icmp-Time_exceeded_in_transit" name="time exceeded in transit" type="11"/>
<ICMP6Service code="0" comment="IPv6 ping request" id="ipv6-icmp-ping_request" name="ipv6 ping request" type="128"/>
<ICMP6Service code="0" comment="IPv6 ping reply" id="ipv6-icmp-ping_reply" name="ipv6 ping reply" type="129"/>
</ServiceGroup> </ServiceGroup>
<ServiceGroup id="stdid06" name="IP"> <ServiceGroup id="stdid06" name="IP">
<IPService comment="IPSEC Authentication Header Protocol" fragm="False" id="id3CB12797" lsrr="False" name="AH" protocol_num="51" rr="False" short_fragm="False" ssrr="False" ts="False"/> <IPService comment="IPSEC Authentication Header Protocol" fragm="False" id="id3CB12797" lsrr="False" name="AH" protocol_num="51" rr="False" short_fragm="False" ssrr="False" ts="False"/>
+3
View File
@@ -159,6 +159,9 @@
<ICMPService code="3" comment="Port unreachable" id="icmp-Port_unreach" name="port unreach" type="3"/> <ICMPService code="3" comment="Port unreachable" id="icmp-Port_unreach" name="port unreach" type="3"/>
<ICMPService code="0" comment="ICMP messages of this type are needed for traceroute" id="icmp-Time_exceeded" name="time exceeded" type="11"/> <ICMPService code="0" comment="ICMP messages of this type are needed for traceroute" id="icmp-Time_exceeded" name="time exceeded" type="11"/>
<ICMPService code="1" comment="" id="icmp-Time_exceeded_in_transit" name="time exceeded in transit" type="11"/> <ICMPService code="1" comment="" id="icmp-Time_exceeded_in_transit" name="time exceeded in transit" type="11"/>
<ICMP6Service code="0" comment="IPv6 ping request" id="ipv6-icmp-ping_request" name="ipv6 ping request" type="128"/>
<ICMP6Service code="0" comment="IPv6 ping reply" id="ipv6-icmp-ping_reply" name="ipv6 ping reply" type="129"/>
</ServiceGroup> </ServiceGroup>
<ServiceGroup id="stdid06" name="IP"> <ServiceGroup id="stdid06" name="IP">
<IPService comment="IPSEC Authentication Header Protocol" fragm="False" id="id3CB12797" lsrr="False" name="AH" protocol_num="51" rr="False" short_fragm="False" ssrr="False" ts="False"/> <IPService comment="IPSEC Authentication Header Protocol" fragm="False" id="id3CB12797" lsrr="False" name="AH" protocol_num="51" rr="False" short_fragm="False" ssrr="False" ts="False"/>
+8
View File
@@ -344,6 +344,14 @@
<icon-tree>service-icmp_16.png</icon-tree> <icon-tree>service-icmp_16.png</icon-tree>
</ICMPService> </ICMPService>
<ICMP6Service>
<description>ICMP6</description>
<icon>service-icmp_25.png</icon>
<icon-neg>service-icmp-neg_25.png</icon-neg>
<icon-ref>service-icmp-ref_25.png</icon-ref>
<icon-tree>service-icmp_16.png</icon-tree>
</ICMP6Service>
<TCPService> <TCPService>
<description>TCP</description> <description>TCP</description>
<icon>service-tcp_25.png</icon> <icon>service-tcp_25.png</icon>
+8
View File
@@ -344,6 +344,14 @@
<icon-tree>service-icmp_16.png</icon-tree> <icon-tree>service-icmp_16.png</icon-tree>
</ICMPService> </ICMPService>
<ICMP6Service>
<description>ICMP6</description>
<icon>service-icmp_25.png</icon>
<icon-neg>service-icmp-neg_25.png</icon-neg>
<icon-ref>service-icmp-ref_25.png</icon-ref>
<icon-tree>service-icmp_16.png</icon-tree>
</ICMP6Service>
<TCPService> <TCPService>
<description>TCP</description> <description>TCP</description>
<icon>service-tcp_25.png</icon> <icon>service-tcp_25.png</icon>