Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120571955
checkorder.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 5, 07:57
Size
1 KB
Mime Type
text/x-c++
Expires
Mon, Jul 7, 07:57 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27185804
Attached To
R6591 HyMAB
checkorder.hh
View Options
#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
Log In to Comment