ripsend.hh
来自「COPE the first practical network coding 」· HH 代码 · 共 55 行
HH
55 行
#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 + =
减小字号Ctrl + -
显示快捷键?