Page MenuHomec4science

dstcheck.hh
No OneTemporary

File Metadata

Created
Mon, Jul 21, 20:39

dstcheck.hh

#ifndef CLICK_DSTCHECK_HH
#define CLICK_DSTCHECK_HH
#include <click/element.hh>
#include <click/notifier.hh>
#include <click/router.hh>
#include <click/confparse.hh>
#include <click/error.hh>
#include <click/etheraddress.hh>
#include <click/config.h>
#include <click/args.hh>
//#include <stdio.h>
//#include <stdlib.h>
#include "util.hh"
//For debug_output:
#ifdef CLICK_USERLEVEL
# include <stdarg.h>
#endif
CLICK_DECLS
/*
* class Dstcheck:
* Click element in charge of filtering traffic for this destination
*/
class Dstcheck : public Element {
public:
Dstcheck();
~Dstcheck();
//This is to return _notifier
void *cast(const char *);
const char *class_name() const { return "Dstcheck"; }
// one input, two outputs
const char *port_count() const { return "1/2"; }
//push input 0 : packets from wifi and plc devices
//push output 0 : packets that are not destined to this node (and should be forwarded)
//push output 1 : packets that are destined to this node (and processed accordingly)
const char *processing() const { return "h/hh"; }
int configure(Vector<String> &, ErrorHandler *);
int initialize(ErrorHandler *);
void push(int, Packet*);
private:
ActiveNotifier _notifier;
bool _debug;
int _node_index;
//my MAC addresses
EtherAddress _addr_int1;
EtherAddress _addr_int2;
LastAddrBytes _lb_int1;
LastAddrBytes _lb_int2;
};
CLICK_ENDDECLS
#endif

Event Timeline