⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 enchostetherfilter.hh

📁 COPE the first practical network coding scheme which is developped on click
💻 HH
字号:
#ifndef CLICK_ENCHOSTETHERFILTER_HH#define CLICK_ENCHOSTETHERFILTER_HH#include <click/element.hh>#include <elements/ethernet/hostetherfilter.hh>//#include <elements/wifi/arptable.hh>#include <click/ipaddress.hh>#include "aliastable.hh"CLICK_DECLS// ***sort out manual page later!/*=cEncHostEtherFilter(ETHER [, DROP_OWN, DROP_OTHER, I<KEYWORDS>])=s dropping, Ethernetdrops Ethernet packets sent to other machines. More or less the same as HostEtherFilter, with an extra twist to deal with encoded packets=dExpects Ethernet packets as input. Acts basically like Ethernet input hardwarefor a device with address ETHER.In particular, HostEtherFilter sets each packet's packet type annotation toHOST, BROADCAST, MULTICAST, or OTHERHOST based on its Ethernet destinationaddress. Emits most packets on the first output. If DROP_OWN is true, dropspackets whose source address is ETHER; defaults to false. If DROP_OTHER istrue, drops packets sent to hosts other than ETHER (that is, packets withunicast destination addresses not equal to ETHER); defaults to true. If theelement has two outputs, filtered packets are emitted on the second outputrather than dropped.Keyword arguments are:=over 8=item DROP_OWNSame as the DROP_OWN parameter.=item DROP_OTHERSame as the DROP_OTHER parameter.=item OFFSETThe ethernet header starts OFFSET bytes into the packet. Default OFFSET is 0.=back=a HostEtherFilter*/class EncHostEtherFilter : public HostEtherFilter { public:    EncHostEtherFilter();  ~EncHostEtherFilter();  const char *class_name() const		{ return "EncHostEtherFilter"; }  const char *processing() const		{ return "a/ah"; }  //void notify_noutputs(int);  int configure(Vector<String> &, ErrorHandler *);  Packet *simple_action(Packet *);   private:  bool _drop_own : 1;  bool _drop_other : 1;  int _offset;  EtherAddress _myea;      // my ether address  AliasTable *_aliases;    // alias table  uint8_t _myalias;        // my alias  inline Packet *drop(Packet *);  };CLICK_ENDDECLS#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -