I am having some problems with an if statement and I am wondering if
there is a problem in the NASL interpreter. Here is the code snippet:


if(pkt_type == IPPROTO_ICMP) 
{
        display("ICMP pkt received.\n");
}
else if(pkt_type == IPPROTO_UDP)
{
        display("UDP pkt received.\n");
}
else
{
        display("Should never get here!\n");
};


When I run this script with the commandline NASL interpreter I get a
message like so:

Error ! Function "else{display" does not exist

I've not been able to find another similar use of the if-statement in
the rest of the plugin codebase nor have I been able to find anything in
the NASL reference that deals with if-statement syntax. This looks like
a problem with the NASL tokenizer, no? 

This is with the latest experimental release compiled with the install
sh script about two weeks ago. 


-- 
---
Nathan Valentine - [EMAIL PROTECTED]
Jabber: NRVesKY AIM: NRVesKY ICQ: 39023424

Attachment: msg00088/pgp00000.pgp
Description: PGP signature

Reply via email to