#include<stdio.h>

#include"zither_lint.h"
#include<almemsys/almemsys.h>


int protocheck(int ch, char * data)
{
int ret;
ret = -1;

if(ch ==0){
   if(0 == self_memcmp(data, "ICMP")){ ret = 0; } 
   else if(0 == self_memcmp(data, "UDP")){ ret = 0; } 
   else if(0 == self_memcmp(data, "TCP")){ ret = 0; } 
   else if(0 == self_memcmp(data, "URL")){ ret = 0; } 
   else if(0 == self_memcmp(data, "SMTP")){ ret = 0; } 
   else if(0 == self_memcmp(data, "DHW")){ ret = 0; } 
   else if(0 == self_memcmp(data, "SNTP")){ ret = 0; } 
   else if(0 == self_memcmp(data, "HOST")){ ret = 0; } 
   else if(0 == self_memcmp(data, "NOT")){ ret = 0; } 
   else if(0 == self_memcmp(data, "NON")){ ret = 0; } 
   else { ret = -1; }
   }
else if(ch ==2){
   if(0 == self_memcmp(data, "NON")){ ret = 0; } 
   else if(0 == self_memcmp(data, "NOT")){ ret = 0; } 
   else if(0 == self_memcmp(data, "FOR")){ ret = 0; } 
   else if(0 == self_memcmp(data, "JUST")){ ret = 0; } 
   else if(0 == self_memcmp(data, "RES")){ ret = 0; } 
   else { ret = -1; }
   }
else if(ch ==3){
   if(0 == self_memcmp(data, "ON")){ ret = 0; } 
   else if(0 == self_memcmp(data, "OFF")){ ret = 0; } 
   else if(0 == self_memcmp(data, "MID")){ ret = 0; } 
   else if(0 == self_memcmp(data, "MIX")){ ret = 0; } 
   else { ret = -1; }
   }
else{
   ret = 0;
   }

return ret;
}

