#ifndef CLICK_AVAILABLERATES_HH #define CLICK_AVAILABLERATES_HH #include #include #include #include #include CLICK_DECLS /* =c AvailableRates() =s Wifi, Wireless Station, Wireless AccessPoint Tracks bit-rate capabilities of other stations. =d Tracks a list of bitrates other stations are capable of. =h insert write-only Inserts an ethernet address and a list of bitrates to the database. =h remove write-only Removes an ethernet address from the database. =h rates read-only Shows the entries in the database. =a BeaconScanner */ class AvailableRates : public Element { public: AvailableRates(); ~AvailableRates(); const char *class_name() const { return "AvailableRates"; } const char *port_count() const { return PORTS_0_0; } int configure(Vector &, ErrorHandler *); void *cast(const char *n); bool can_live_reconfigure() const { return true; } void add_handlers(); void take_state(Element *e, ErrorHandler *); Vector lookup(EtherAddress eth); int insert(EtherAddress eth, Vector); EtherAddress _bcast; bool _debug; int parse_and_insert(String s, ErrorHandler *errh); class DstInfo { public: EtherAddress _eth; Vector _rates; DstInfo() { memset(this, 0, sizeof(*this)); } DstInfo(EtherAddress eth) { memset(this, 0, sizeof(*this)); _eth = eth; } }; typedef HashMap RTable; typedef RTable::const_iterator RIter; RTable _rtable; Vector _default_rates; private: }; CLICK_ENDDECLS #endif