1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-06-25 02:19:37 +02:00

added support for attributes tos and dscp in IPService

This commit is contained in:
Vadim Kurland
2008-07-05 23:24:18 +00:00
parent 7bcb9c6f75
commit 51e7888629
5 changed files with 49 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2008-07-05 Vadim Kurland <vadim@vk.crocodile.org>
* fwbuilder.dtd.in: Added attributes for TOS and DSCP codes to
IPService xml element
2008-07-02 Vadim Kurland <vadim@vk.crocodile.org>
* InterfaceData.h (libfwbuilder): InterfaceData moved from

View File

@@ -437,6 +437,8 @@ Interface can have the following attributes:
short_fragm %BOOLEAN; #IMPLIED
ssrr %BOOLEAN; #IMPLIED
ts %BOOLEAN; #IMPLIED
tos %STRING; #IMPLIED
dscp %STRING; #IMPLIED
>
<!ELEMENT TCPService EMPTY>

View File

@@ -437,6 +437,8 @@ Interface can have the following attributes:
short_fragm %BOOLEAN; #IMPLIED
ssrr %BOOLEAN; #IMPLIED
ts %BOOLEAN; #IMPLIED
tos %STRING; #IMPLIED
dscp %STRING; #IMPLIED
>
<!ELEMENT TCPService EMPTY>

View File

@@ -113,6 +113,40 @@ void IPService::fromXML(xmlNodePtr root) throw(FWException)
setStr("ts", n);
FREEXMLBUFF(n);
}
n=FROMXMLCAST(xmlGetProp(root,TOXMLCAST("tos")));
if(n!=NULL)
{
setStr("tos", n);
FREEXMLBUFF(n);
}
n=FROMXMLCAST(xmlGetProp(root,TOXMLCAST("dscp")));
if(n!=NULL)
{
setStr("dscp", n);
FREEXMLBUFF(n);
}
}
string IPService::getTOSCode()
{
return getStr("tos");
}
void IPService::setTOSCode(const string &c)
{
setStr("tos", c);
}
string IPService::getDSCPCode()
{
return getStr("dscp");
}
void IPService::setDSCPCode(const string &c)
{
setStr("dscp", c);
}

View File

@@ -50,6 +50,12 @@ class IPService : public Service
virtual std::string getProtocolName();
virtual int getProtocolNumber();
std::string getTOSCode();
void setTOSCode(const std::string &c);
std::string getDSCPCode();
void setDSCPCode(const std::string &c);
};
}