I have been trying to develop an application to stop packets from reaching a particular IP address. However I am getting the following 2 errors:
1) Multiple markers at this line
- The left-hand side of an assignment must be a
variable - Syntax error on token ".0", invalid AssignmentOperator
for targetIp = 0.0.0.0; (I have changed it from String as I need to compare it later on to DestinationIP)
2) Multiple markers at this line
- Syntax error on token "p", delete this
token - Packet cannot be resolved to a variable
for line: getLayerHandler().getTransportLayer().receive(Packet p, sourceIP, destinationIP);
The code(modified of Simpleportscanner application) to get the above result is:
Well this are standard Java implementation error and actual the errors messages already point to the solution, e.g.: getLayerHandler().getTransportLayer().receive(Packet p, sourceIP, destinationIP); ==> getLayerHandler().getTransportLayer().receive(p, sourceIP, destinationIP);
Which still would not work since there is no p anywhere in that method.
NeSSi2 already ships with a few example applications, one is a firewall. You could us that implementation as a hint, see de.dailab.nessi.applications.firewall.FirewallApp. This is located in:
I have been trying to develop an application to stop packets from reaching a particular IP address. However I am getting the following 2 errors:
1) Multiple markers at this line
- The left-hand side of an assignment must be a
variable - Syntax error on token ".0", invalid AssignmentOperator
for targetIp = 0.0.0.0; (I have changed it from String as I need to compare it later on to DestinationIP)
2) Multiple markers at this line
- Syntax error on token "p", delete this
token - Packet cannot be resolved to a variable
for line: getLayerHandler().getTransportLayer().receive(Packet p, sourceIP, destinationIP);
The code(modified of Simpleportscanner application) to get the above result is:
public class nnew extends IPApplication
{
}
Kindly help! Thank you!
Well this are standard Java implementation error and actual the errors messages already point to the solution, e.g.: getLayerHandler().getTransportLayer().receive(Packet p, sourceIP, destinationIP); ==> getLayerHandler().getTransportLayer().receive(p, sourceIP, destinationIP);
Which still would not work since there is no p anywhere in that method.
NeSSi2 already ships with a few example applications, one is a firewall. You could us that implementation as a hint, see de.dailab.nessi.applications.firewall.FirewallApp. This is located in:
Hope that helps.