Intel® Business Client Software Development
Support for Intel® vPro™ software development and technologies associated with Intel vPro platforms.

Help on Create Filter For UDP Filter Type

ravi
Beginner
489 Views
Hi,
In Circuit Breaker concept we are creating a one sample filter for UDP,
using CreateFilter API , it giving a Error

Error: failed while calling CbFilterCreate
PT_STATUS_INVALID_PARAMETER: Specified parameter is invalid.
response.Status:36..

Code :
filter->FilterDirection =_0;
filter->FilterProfile = _3;
if(filter->FilterProfile == _2)
{
filter->FilterProfileData = 200;
}
else
{
filter->FilterProfileData = 0; // if
}

filter->ActionEventOnMatch = false;
filter->FilterPacket = new ns1__CircuitBreakerPacketType;

if(filter->FilterPacket != NULL)
{
// UDP Packet
//
memset(&(filter->FilterPacket->union_3), 0, sizeof(union ns1__union_3));
filter->FilterPacket->__union_3 = SOAP_UNION_ns1__union_3_PacketUDP;

filter->FilterPacket->union_3.PacketUDP = new ns1__CircuitBreakerPacketUDPType;
if(filter->FilterPacket->union_3.PacketUDP != NULL)
{
filter->FilterPacket->union_3.PacketIP->IPPacket = new ns1__CircuitBreakerIPPacketType;

filter->FilterPacket->union_3.PacketUDP->IPPacket->__union_2 = SOAP_UNION_ns1__union_2_IPv4;

filter->FilterPacket->union_3.PacketUDP->IPPacket->union_2.IPv4 = new ns1__CircuitBreakerIPv4Type;
filter->FilterPacket->union_3.PacketUDP->IPPacket->union_2.IPv4->IPv4Desc = new ns1__CircuitBreakerIPv4AddressAndMaskType;

filter->FilterPacket->union_3.PacketUDP->IPPacket->union_2.IPv4->IPv4Desc->Address = "192.168.0.56";
filter->FilterPacket->union_3.PacketUDP->IPPacket->union_2.IPv4->IPv4Desc->AddressMask ="255.255.255.1";
filter->FilterPacket->union_3.PacketUDP->IPPacket->union_2.IPv4->IPv4Desc->IPAddressDirection =_1_;

int nOption = 2;
switch(nOption)
{
default:
case 0:

// filter->FilterPacket->union_3.PacketUDP->IPLayeredPort = NULL;
//filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortSimple = NULL;

break;

case 1:
// (OR)

//ns1__CircuitBreakerIPLayeredPortSimpleType

filter->FilterPacket->union_3.PacketUDP->IPLayeredPort = new ns1__CircuitBreakerIPLayeredPortType;

filter->FilterPacket->union_3.PacketUDP->IPLayeredPo rt->__union_1 = SOAP_UNION_ns1__union_1_IPLayeredPortSimple;
filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortSimple =
new ns1__CircuitBreakerIPLayeredPortSimpleType;

filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortSimple->SourcePort =1000;
filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortSimple->DestinationPort=1000;
break;

case 2:
// (OR)
filter->FilterPacket->union_3.PacketUDP->IPLayeredPort = new ns1__CircuitBreakerIPLayeredPortType;

filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->__union_1 = SOAP_UNION_ns1__union_1_IPLayeredPortRangeSource;
filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortRangeSource =
new ns1__CircuitBreakerIPLayeredPortRangeType;

filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortRangeSource->PortMin = 100;
filter->FilterPacket->union_3.PacketUDP->IPLayere dPort->union_1.IPLayeredPortRangeSource->PortMax = 1000;
break;

case 3:
// (OR)
filter->FilterPacket->union_3.PacketUDP->IPLayeredPort = new ns1__CircuitBreakerIPLayeredPortType;

filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->__union_1 = SOAP_UNION_ns1__union_1_IPLayeredPortRangeDestination;
filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortRangeSource =
new ns1__CircuitBreakerIPLayeredPortRangeType;

filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortRangeDestination->PortMin =100;
filter->FilterPacket->union_3.PacketUDP->IPLayeredPort->union_1.IPLayeredPortRangeDestination->PortMax =1000;
}

}
else
{
delete filter->FilterPacket;
success = false;
}
}

Help on this would be appreciated.


Thanks & Regards,
Ravi
0 Kudos
1 Reply
ravi
Beginner
489 Views

Hi,

We are able to create a filter .

Mistake is wrong Subnet mask - insteadof 255.255.255.0 we given 255.255.255.1

Thanks & Regards,

Ravi

0 Kudos
Reply