summaryrefslogtreecommitdiff
path: root/doc/developer
diff options
context:
space:
mode:
Diffstat (limited to 'doc/developer')
-rw-r--r--doc/developer/building-frr-for-fedora.rst2
-rw-r--r--doc/developer/building-frr-for-opensuse.rst2
-rw-r--r--doc/developer/lists.rst6
-rw-r--r--doc/developer/static-linking.rst2
-rw-r--r--doc/developer/workflow.rst22
5 files changed, 28 insertions, 6 deletions
diff --git a/doc/developer/building-frr-for-fedora.rst b/doc/developer/building-frr-for-fedora.rst
index dc869ece10..aa10f1118d 100644
--- a/doc/developer/building-frr-for-fedora.rst
+++ b/doc/developer/building-frr-for-fedora.rst
@@ -81,7 +81,7 @@ content:
MPLS must be invidividually enabled on each interface that requires it. See
the example in the config block above.
-Load the modifed sysctls on the system:
+Load the modified sysctls on the system:
.. code-block:: console
diff --git a/doc/developer/building-frr-for-opensuse.rst b/doc/developer/building-frr-for-opensuse.rst
index d9800a1638..38346fe881 100644
--- a/doc/developer/building-frr-for-opensuse.rst
+++ b/doc/developer/building-frr-for-opensuse.rst
@@ -85,7 +85,7 @@ content:
MPLS must be invidividually enabled on each interface that requires it. See
the example in the config block above.
-Load the modifed sysctls on the system:
+Load the modified sysctls on the system:
.. code-block:: console
diff --git a/doc/developer/lists.rst b/doc/developer/lists.rst
index 4eaa85115e..ccac10aab9 100644
--- a/doc/developer/lists.rst
+++ b/doc/developer/lists.rst
@@ -62,7 +62,7 @@ in the future:
The APIs are all designed to be as type-safe as possible. This means that
there will be a compiler warning when an item doesn't match the container, or
the return value has a different type, or other similar situations. **You
-should never use casts with these APIs.** If a cast is neccessary in relation
+should never use casts with these APIs.** If a cast is necessary in relation
to these APIs, there is probably something wrong with the overall design.
Only the following pieces use dynamically allocated memory:
@@ -143,7 +143,7 @@ Each of the data structures has a ``PREDECL_*`` and a ``DECLARE_*`` macro to
set up an "instantiation" of the container. This works somewhat similar to C++
templating, though much simpler.
-**In all following text, the Z prefix is replaced with a name choosen
+**In all following text, the Z prefix is replaced with a name chosen
for the instance of the datastructure.**
The common setup pattern will look like this:
@@ -650,7 +650,7 @@ Atomic lists
`atomlist.h` provides an unsorted and a sorted atomic single-linked list.
Since atomic memory accesses can be considerably slower than plain memory
accessses (depending on the CPU type), these lists should only be used where
-neccessary.
+necessary.
The following guarantees are provided regarding concurrent access:
diff --git a/doc/developer/static-linking.rst b/doc/developer/static-linking.rst
index 1e45c48dc3..5342fbfbf6 100644
--- a/doc/developer/static-linking.rst
+++ b/doc/developer/static-linking.rst
@@ -64,7 +64,7 @@ like this:
Hopefully you get a nice, usable, PIC ``libpcre.a``.
So now we have to link all these static libraries into FRR. Rather than modify
-FRR to accomodate this, the best option is to create an archive with all of
+FRR to accommodate this, the best option is to create an archive with all of
libyang's dependencies. Then to avoid making any changes to FRR build foo,
rename this ``libyang.a`` and copy it over the usual static library location.
Ugly but it works. To do this, go into your libyang build directory, which
diff --git a/doc/developer/workflow.rst b/doc/developer/workflow.rst
index af8756a909..adab9725d9 100644
--- a/doc/developer/workflow.rst
+++ b/doc/developer/workflow.rst
@@ -623,6 +623,8 @@ Please copy-paste this header verbatim. In particular:
- Do not replace "This program" with "FRR"
- Do not change the address of the FSF
+- keep ``#include <zebra.h>``. The absolute first header included in any C
+ file **must** be either ``zebra.h`` or ``config.h`` (with HAVE_CONFIG_H guard)
Adding Copyright Claims to Existing Files
-----------------------------------------
@@ -895,6 +897,26 @@ necessary replacements.
| u_long | unsigned long |
+-----------+--------------------------+
+FRR also uses unnamed struct fields, enabled with ``-fms-extensions`` (cf.
+https://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html). The following two
+patterns can/should be used where contextually appropriate:
+
+.. code-block:: c
+
+ struct outer {
+ struct inner;
+ };
+
+.. code-block:: c
+
+ struct outer {
+ union {
+ struct inner;
+ struct inner inner_name;
+ };
+ };
+
+
.. _style-exceptions:
Exceptions