Page MenuHomec4science

acker.hh
No OneTemporary

File Metadata

Created
Sun, Jul 6, 23:41

acker.hh

#ifndef CLICK_ACKER_HH
#define CLICK_ACKER_HH
#include <click/element.hh>
//#include <click/notifier.hh>
#include <click/router.hh>
#include <click/confparse.hh>
#include <click/timestamp.hh>
#include <click/error.hh>
#include <click/config.h>
#include <click/args.hh>
#include "util.hh"
#include "routingpaths.hh"
//For debug_output:
#ifdef CLICK_USERLEVEL
# include <stdarg.h>
#endif
CLICK_DECLS
class Acker : public Element {
public:
Acker();
~Acker();
//This is to return _notifier
//void *cast(const char *);
const char *class_name() const { return "Acker"; }
const char *port_count() const { return "1/2"; }
//push input 0 : packets to forward to the host
//push output 0 : packet to host
//push output 1 : acks to forwarder element
//TODO priority-queue against lb queue vs to-leaky-bucket
const char *processing() const { return "h/hh"; }
int configure(Vector<String> &, ErrorHandler *);
int initialize(ErrorHandler *);
void push(int, Packet*);
void set_debug(bool debug) {_debug=debug;}
static int debug_handler(const String &, Element *, void *,ErrorHandler *);
void add_handlers();
private:
//////////// variables : ///////////////////
/*
* General notes about variables:
* It may happen that changing the class variables causes a segfault.
* This can be solved by "make clean" before "make".
* An other way to solve this is to use pointers and dynamic memory allocation.
*
* The best solution would actually be to solve the compilation issues by playing with the Makefiles
* and "REQUIRES" and "PROVIDES" closes
*/
//ActiveNotifier _notifier;
bool _debug;
uint32_t _ack_period_ms;
Timestamp _time;
HashTable<FormatedRoute,Timestamp> _lastTimestamp;
String _routingPaths_name;
RoutingPaths* _routingPaths_element;
};
CLICK_ENDDECLS
#endif

Event Timeline