[Click] [click]error:class_name method malformed

Eddie Kohler kohler at cs.ucla.edu
Fri Mar 27 02:44:34 EDT 2009


Pradeep,

You can get rid of this error by using the newest click sources (just checked 
in a little fix), or by usign a single space after the "return" in the 
class_name() definition.

E


Pradeep Pradeep wrote:
> Hi,
>   I am trying compile click after adding an element in click/elements/local.I am getting an error
> 
> --------------------------
> [kaddada at r1 ~/click-1.6.0]$ sudo make elemlist
> make[1]: Entering directory `/users/kaddada/click-1.6.0/userlevel'
> ../click-buildtool elem2make -x "addressinfo.o alignmentinfo.o errorelement.o portinfo.o scheduleinfo.o" < elements.conf > elements.mk
> make[1]: Leaving directory `/users/kaddada/click-1.6.0/userlevel'
> make[1]: Entering directory `/users/kaddada/click-1.6.0/userlevel'
> make[1]: Warning: File `elements.mk' has modification time 1e+02 s in the future
> make[2]: Entering directory `/users/kaddada/click-1.6.0/userlevel'
> make[2]: Warning: File `elements.mk' has modification time 1e+02 s in the future
> echo "userlevel  app aqm ethernet icmp ip local standard tcpudp" | ../click-buildtool findelem -r userlevel -p .. > elements.conf
> ../elements/local/flowlookup.hh: FlowLookup::class_name method malformed
>   (class_name methods must be written on a single line.)
> make[2]: *** [elements.conf] Error 1
> make[2]: Leaving directory `/users/kaddada/click-1.6.0/userlevel'
> make[1]: *** [elemlist] Error 2
> make[1]: Leaving directory `/users/kaddada/click-1.6.0/userlevel'
> make: *** [elemlist] Error 1
> -------------------------------------------------
> 
> I am attaching the header file.
> -----------------------------------
> #ifndef CLICK_FLOWLOOKUP_HH
> #define CLICK_FLOWLOOKUP_HH
> #include <click/element.hh>
> #include <click/string.hh>
> #include <click/glue.hh>
> #include <click/timer.hh>
> #include <click/vector.hh>
> #include "tables.hh"
> #include "qossignalpacketformat.hh"
> #include "ipflowroutetable.hh"
> #include <vector>
> #include <string>
> #include <map>
> #include <stdio.h>
> #include <assert.h>
> CLICK_DECLS
> #define IP_RT_CACHE2 1
> class FlowLookup:public IPFlowRouteTable
> {
> public:
> 
> FlowLookup();
> ~FlowLookup ();
>   struct flow_entry *
>   temp, *
>   temp1, *
>     temp2;
>   const char *  class_name ()  const {    return  "FlowLookup";  }
>   const char *  port_count ()  const {    return      "1/-";     }
>   const char *  processing ()  const {    return      PUSH;      }
>   int
>   initialize (ErrorHandler *);
>   void
>   push (int i, Packet * p);
>   int
>   add_route (const IPFlowRoute &, bool, IPFlowRoute *, ErrorHandler *);
>   int
>   remove_route (const IPFlowRoute &, IPFlowRoute *, ErrorHandler *);
>   int
>   lookup_route (IPAddress, IPAddress &) const;
>   String
>   dump_routes ();
>   bool
>   check () const;
> int gateway_cnt(IPAddress);
> void inc_gateway_cnt(IPAddress);
> void dec_gateway_cnt(IPAddress);
>   void
>   print_qos_session ();
>   void
>   insert_update_session (uint32_t, int, int, int, int*,IPAddress*);
>   int
>   search_session_port (uint32_t, int, int, int);
>   void
>   check_qos_session ();
>   int
>   hash_index (uint32_t);
>   struct flow_entry *
>   find_entry (uint32_t, int);
>   IPAddress get_gateway(uint32_t,int);
> int
>    priority,type,fp,ei;
> IPAddress a;
>   void
>   run_timer (Timer *);
> 
>   int
>     len;
> 
>   ErrorHandler *
>     _errh;
>   Timer
>     _timer;
> private:
>  float gw0_priority,gw1_priority,gw2_priority,gw3_priority;
> 
>   FILE *
>     logfl;                      // log file pointer
> protected:
>   Vector < IPFlowRoute > _t;
>   int
>     _zero_route;
>     IPAddress
>     _last_addr;
>   int
>     _last_entry;
> 
> #ifdef IP_RT_CACHE2
>   IPAddress
>     _last_addr2;
>   int
>     _last_entry2;
> #endif
> 
>   int
>   lookup_entry (IPAddress) const;
> 
> };
> 
> CLICK_ENDDECLS
> #endif
> -------------------------------------------
> 
> Let me know what went wrong?
> 
> Regards,
> Krishna.
>                                                                
> 
> 
> 
>       Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list