Re: [PATCH net-next v2 1/7] docs: add more netlink docs (incl. spec docs)
From: Guillaume Nault <hidden>
Date: 2022-10-10 09:56:56
Also in:
linux-doc
On Thu, Sep 29, 2022 at 07:34:12PM -0700, Jakub Kicinski wrote:
+============================== +Netlink spec C code generation +============================== + +This document describes how Netlink specifications are used to render +C code (uAPI, policies etc.). It also defines the additional properties +allowed in older families by the ``genetlink-c`` protocol level, +to control the naming. + +For brevity this document refers to ``name`` properties of various +objects by the object type. For example ``$attr`` is the value +of ``name`` in an attribute, and ``$family`` is the name of the +family (the global ``name`` property). + +The upper case is used to denote literal values, e.g. ``$family-CMD`` +means the concatenation of ``$family``, a dash character, and the literal +``CMD``. + +The names of ``#defines`` and enum values are always converted to upper case, +and with dashes (``-``) replaced by underscores (``_``). + +If the constructured name is a C keyword, an extra underscore is
s/constructured/constructed/ [...]
+header +~~~~~~ + +For C-compatible languages, header which already defines this value. +In case the definition is shared by multiple families (e.g. ``IFNAMSIZ``) +code generators for C-compabile languages may prefer to add an appropriate
s/C-compabile/C-compatible/