[Xorp-users] MfeaVif flags_strings mod

Pavlin Radoslavov pavlin at icir.org
Wed Aug 9 14:45:13 PDT 2006


>   I want to be able to add another attribute to the Mfea Vif from the 
> config.boot file; but am not sure what is the best way to do so. I am not 
> familiar with the templates, but I suppose a characteristic 
> (enable/disable) has to be added in "mfea4.tp" and corresponding logic in 
> the fea/mfea_vif.cc and .hh files
> 
>   Is there a help file/document that describes how to do so. Or can anyone 
> provide any helpful pointers so I could ramp up quickly ?

This is going to be a bit tricky, because you would have to modify
several things:

1. Modify the etc/templates/mfea4.tp template to include your flag
   and the appropriate XRL to set it.
   Use the "disable" flag as a reference (or implementation for the
   deprecated "enable" flag).

2. Implement that XRL as part of the MFEA XRL interface:
   xrl/interfaces/mfea.xif
   Use the "enable_vif" XRL as a reference.

3. Implement the mechanism inside the MFEA to set the flag per vif.
   Use the MfeaNode::enable_vif() implementation as a reference.
   However, in addition you would need to modify
   Mfea::set_config_vif_flags() to include support for your new
   flag, and then you need to call that method to set your flag
   when modified. Finally, the set_config_vif_flags() call should be
   followed by a call to set_config_all_vifs_done().

4. The mfea_client/0.1/set_vif_flags XRL should be modified to
   include your flag.

5. The receiving side of mfea_client/0.1/set_vif_flags (IGMP/MLD and
   PIM-SM) should process that flag as any of the other vif flags,
   and update the local vif copy.

If you need that flag only in the MFEA and you don't need it
propagated to the IGMP/MLD or PIM modules, then you don't need to
implement (4) and (5).

Hope that helps,
Pavlin



More information about the Xorp-users mailing list