[Click] Elements interconnection
Eddie Kohler
kohler at cs.ucla.edu
Mon Feb 8 16:34:17 EST 2010
David,
The bug is:
David Sesmero Sáez wrote:
> int
> VlanEncap::configure(Vector<String> &conf, ErrorHandler *errh)
> {
> if (cp_va_kparse(conf, this, errh,
> "VLAN_MODE",cpkP+cpkM,cpInteger,&vlan_mode,
> "TABLES", cpElement, "tables", &tables,
The "TABLES" line is not good syntax.
You are missing "cpkP+cpkM".
The line should read something like:
"TABLES", cpkP+cpkM, cpElement, &tables,
or:
"TABLES", cpkP+cpkM, cpElementCast, "VlanTables", &tables,
Eddie
> cpEnd) < 0){
> return -1;
> }
> }
>
> void
> VlanEncap::push(int source, Packet *p)
> {
> VlanTables *vlan_tables = static_cast<VlanTables *>(tables);
> if (int var = vlan_tables->num_ports)
> {
> click_chatter("Valor: %d",var);
> }
> else{
> click_chatter("Error");
> }
> }
>
> When I compile the code there are no errors but when I run the .click, I have "Segmentation Fail" error.
>
> Anyone can help me please?
>
>
> Thanks,
> David Sesmero.
>
>
> _________________________________________________________________
> Los auténticos Hotmail y Messenger en tu Blackberry con Movistar. ¡Descárgatelos ya!
> http://serviciosmoviles.es.msn.com/messenger/blackberry.aspx
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list