An extension to the ICMP analyzer to handle redirects.

The analyzer now raises icmp_redirect() events that come with the
redirection address.

By Julien Sentier.
This commit is contained in:
Robin Sommer 2011-05-13 18:47:50 -07:00
parent 437ac29ca9
commit 1199085b27
6 changed files with 49 additions and 1 deletions

View file

@ -74,6 +74,22 @@ protected:
int len, int caplen, const u_char*& data);
};
class ICMP_Redir_Analyzer : public ICMP_Analyzer {
public:
ICMP_Redir_Analyzer(Connection* conn);
static Analyzer* InstantiateAnalyzer(Connection* conn)
{ return new ICMP_Redir_Analyzer(conn); }
static bool Available() { return icmp_redirect; }
protected:
ICMP_Redir_Analyzer() { }
virtual void NextICMP(double t, const struct icmp* icmpp,
int len, int caplen, const u_char*& data);
};
class ICMP_Context_Analyzer : public ICMP_Analyzer {
public:
ICMP_Context_Analyzer(AnalyzerTag::Tag tag, Connection* conn)