#ifndef __PACKET_HANDLER_H #define __PACKET_HANDLER_H #include "constants.h" #include "conn_table.h" #include "ports.h" /* Return TRUE for applications that can have multiple transactions over the same connection, and should follow request/reply paradigm */ int followRequestReply(enum app tapp); /* Return minimum inactive delay for applications that can have multiple transactions over the same connection, and follow request/reply paradigm but we should use a period of inactivity to detect start of new transactions */ double detectInactive(enum app tapp); void getTypeAndApp(int dport, enum type* ttype, enum app* tapp); void handle_TCP_packet(double dtime, unsigned int srcIP, unsigned int dstIP, unsigned short sport, unsigned short dport, unsigned int seqnum, unsigned int acknum, unsigned short syn, unsigned short ack, unsigned short fin, unsigned short reset, int len, int hlen, double owdelay, unsigned short dataport); void handle_UDP_packet(double dtime, unsigned int srcIP, unsigned int dstIP, unsigned short sport, unsigned short dport, int len, int hlen, int identification, double owdelay, int req); void handle_ICMP_packet(double dtime, unsigned int srcIP, unsigned int dstIP, unsigned short dport, unsigned short sport, int len, int hlen, int identification, int type, double owdelay); void closeTransactions(double lasttime); void resetTransactions(); /* Return TRUE for sources that are from a given range */ int compare(unsigned int address); #endif