]> git.puffer.fish Git - mirror/frr.git/commitdiff
doc: add cmd line param section to modules.rst 2692/head
authorEmanuele Di Pascale <emanuele@voltanet.io>
Thu, 19 Jul 2018 16:28:25 +0000 (18:28 +0200)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Thu, 19 Jul 2018 16:28:25 +0000 (18:28 +0200)
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
doc/developer/modules.rst

index b832413a6cc1e6521e989123ba67d0f6231a1ed5..bde7682e4e30bd740c602a60cd69bdfcaa8f84d0 100644 (file)
@@ -100,6 +100,15 @@ a function that removes all of a module's installed hooks.
 There's also the ``frr_module`` symbol in modules, pretty much a
 standard entry point for loadable modules.
 
+Command line parameters
+-----------------------
+
+Command line parameters can be passed directly to a module by appending a 
+colon to the module name when loading it, e.g. ``-M mymodule:myparameter``. 
+The text after the colon will be accessible in the module's code through 
+``THIS_MODULE->load_args``. For example, see how the format parameter is
+configured in the ``zfpm_init()`` function inside ``zebra_fpm.c``.
+
 Hooks
 -----