📄 ripsend.hh
字号:
#ifndef CLICK_RIPSEND_HH#define CLICK_RIPSEND_HH#include <click/element.hh>#include <click/timer.hh>#include <click/ipaddress.hh>CLICK_DECLS/* * =c * RIPSend(SRC, DST, WHAT/MASK, METRIC) * =s IP, sources * periodically generates specified RIP II packet * =d * Sends periodic RIP II packets with specified contents, * including UDP and IP headers. * =e * Send out advertisements to net 18.26.4, indicating that * route 18.26.4.24 knows how to get to net 10 with hop * count 10: * * RIPSend(18.26.4.24, 18.26.4.255, 10.0.0.0/8, 10) -> * EtherEncap(0x0008, 00:00:c0:ae:67:ef, ff:ff:ff:ff:ff:ff) -> * ToDevice(eth0); * =n * Note that this is just a tiny piece of a full RIP implementation. */class RIPSend : public Element { IPAddress _src; // IP header src field IPAddress _dst; // IP header dst field IPAddress _what; // Route to advertise IPAddress _mask; int _metric; Timer _timer; public: RIPSend(); ~RIPSend(); const char *class_name() const { return "RIPSend"; } const char *processing() const { return PUSH; } int configure(Vector<String> &, ErrorHandler *); int initialize(ErrorHandler *); void run_timer(); };CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -