Page MenuHomec4science

checkorder.hh
No OneTemporary

File Metadata

Created
Sat, Jul 5, 07:57

checkorder.hh

#ifndef CLICK_CHECKORDER_HH
#define CLICK_CHECKORDER_HH
#include <click/element.hh>
#include <clicknet/tcp.h>
#include <click/error.hh>
#include <click/timer.hh>
#include "util.hh"
CLICK_DECLS
class CheckOrder : public Element {
public:
CheckOrder();
~CheckOrder();
// analyze a TCP flows (timeouts, duplicate acks, etc.)
// it assumes that sequence number will not wrap, so do not run it too long!
const char *class_name() const { return "CheckOrder"; }
const char *port_count() const { return "1/1"; }
int configure(Vector<String> &, ErrorHandler *);
int initialize(ErrorHandler *);
void push(int,Packet *);
void run_timer(Timer*);
// Handlers
void add_handlers();
static int debug_handler(const String &, Element *, void *,ErrorHandler *);
static int active_handler(const String &, Element *, void *,ErrorHandler *);
void set_active(bool b) {_active=b;}
void set_debug(bool b) {_debug = b;}
void set_verb_debug(bool b) {_verb_debug = b;}
private:
// TODO: replace IPAddress with flow information (e.g. src_ip:src_port, dst_ip_dst:port)
bool _debug;
bool _verb_debug;
bool _active;
bool _only_tcp;
HashTable<IPAddress, uint16_t> _last_acne_seq;
HashTable<IPAddress, uint32_t> _last_tcp_seq;
HashTable<IPAddress, int> _received;
HashTable<IPAddress, int> _received_tcp;
HashTable<IPAddress, int> _ooo;
HashTable<IPAddress, int> _ooo_tcp;
Timestamp _now;
Timer _timer;
};
CLICK_ENDDECLS
#endif

Event Timeline