Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122735860
dstcheck.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
Mon, Jul 21, 20:39
Size
1 KB
Mime Type
text/x-c++
Expires
Wed, Jul 23, 20:39 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27533898
Attached To
R1252 EMPoWER
dstcheck.hh
View Options
#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
Log In to Comment