- Description:[feature] libnl build optimization: import libnl 3_11_0 upstream
- Bug: #43 - Test: calculate the SHA256 checksum for the libnl upstream tarball and compare it with the upstream SHA256 value Signed-off-by: Jinguang Dong <dongjinguang@huawei.com>
@@ -1,83 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
|
||||
All configurations in this file will be merged to OAT-Default.xml, if you have any questions or concerns, please create issue in OpenHarmony/tools_oat and @jalenchen or chenyaxun.
|
||||
|
||||
licensefile:
|
||||
1.If the project don't have "LICENSE" in root dir, please define all the license files in this project in , OAT will check license files according to this rule.
|
||||
|
||||
policylist:
|
||||
1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
|
||||
2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
|
||||
<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
|
||||
3. policyitem type:
|
||||
"compatibility" is used to check license compatibility in the specified path;
|
||||
"license" is used to check source license header in the specified path;
|
||||
"copyright" is used to check source copyright header in the specified path;
|
||||
"import" is used to check source dependency in the specified path, such as import ... ,include ...
|
||||
"filetype" is used to check file type in the specified path, supported file types: archive, binary
|
||||
"filename" is used to check whether the specified file exists in the specified path(projectroot means the root dir of the project), supported file names: LICENSE, README, README.OpenSource
|
||||
4. policyitem name: This field is used for define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license.
|
||||
5. policyitem path: This field is used for define the source file scope to apply this policyitem, the "!" prefix means exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem.
|
||||
6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means any one in this group passed, the result will be passed.
|
||||
7. policyitem filefilter: Used to bind filefilter which define filter rules.
|
||||
7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
|
||||
8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
|
||||
|
||||
Note:If the text contains special characters, please escape them according to the following rules:
|
||||
" == "
|
||||
& == &
|
||||
' == '
|
||||
< == <
|
||||
> == >
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<oatconfig>
|
||||
<licensefile>COPYING</licensefile>
|
||||
<policylist>
|
||||
<policy name="projectPolicy" desc="">
|
||||
<policyitem type="compatibility" name="LGPL-2.1+" path="COPYING" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="the License of this file is LGPL"/>
|
||||
<policyitem type="compatibility" name="LGPL" path="BUILD.gn" desc="They are used in dynamic link mode."/>
|
||||
<policyitem type="compatibility" name="LGPL" path="install.sh" desc="They are used in dynamic link mode."/>
|
||||
<policyitem type="compatibility" name="LGPL" path="libnl3.spec" desc="They are used in dynamic link mode."/>
|
||||
</policy>
|
||||
</policylist>
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filename" name="*.8|*.png|*.sym" desc="desc files"/>
|
||||
<filteritem type="filepath" name="tests/.*" desc="Test files"/>
|
||||
</filefilter>
|
||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||
</filefilter>
|
||||
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
||||
</filefilter>
|
||||
<filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||
</filefilter>
|
||||
</filefilterlist>
|
||||
<licensematcherlist>
|
||||
<licensematcher name="LGPL" desc="">
|
||||
<licensetext name="License: LGPLv2" desc=""/>
|
||||
</licensematcher>
|
||||
</licensematcherlist>
|
||||
</oatconfig>
|
||||
</configuration>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 Huawei Device Co., Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
|
||||
All configurations in this file will be merged to OAT-Default.xml, if you have any questions or concerns, please create issue in OpenHarmony/tools_oat and @jalenchen or chenyaxun.
|
||||
|
||||
licensefile:
|
||||
1.If the project don't have "LICENSE" in root dir, please define all the license files in this project in , OAT will check license files according to this rule.
|
||||
|
||||
policylist:
|
||||
1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
|
||||
2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
|
||||
<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
|
||||
3. policyitem type:
|
||||
"compatibility" is used to check license compatibility in the specified path;
|
||||
"license" is used to check source license header in the specified path;
|
||||
"copyright" is used to check source copyright header in the specified path;
|
||||
"import" is used to check source dependency in the specified path, such as import ... ,include ...
|
||||
"filetype" is used to check file type in the specified path, supported file types: archive, binary
|
||||
"filename" is used to check whether the specified file exists in the specified path(projectroot means the root dir of the project), supported file names: LICENSE, README, README.OpenSource
|
||||
4. policyitem name: This field is used for define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license.
|
||||
5. policyitem path: This field is used for define the source file scope to apply this policyitem, the "!" prefix means exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem.
|
||||
6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means any one in this group passed, the result will be passed.
|
||||
7. policyitem filefilter: Used to bind filefilter which define filter rules.
|
||||
7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
|
||||
8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
|
||||
|
||||
Note:If the text contains special characters, please escape them according to the following rules:
|
||||
" == "
|
||||
& == &
|
||||
' == '
|
||||
< == <
|
||||
> == >
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<oatconfig>
|
||||
<licensefile>COPYING</licensefile>
|
||||
<policylist>
|
||||
<policy name="projectPolicy" desc="">
|
||||
<policyitem type="compatibility" name="LGPL-2.1+" path="COPYING" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter" desc="the License of this file is LGPL"/>
|
||||
<policyitem type="compatibility" name="LGPL" path="BUILD.gn" desc="They are used in dynamic link mode."/>
|
||||
<policyitem type="compatibility" name="LGPL" path="prepare.sh" desc="Env-prepare script, used in dynamic link mode."/>
|
||||
<policyitem type="compatibility" name="LGPL" path="libnl3.spec" desc="They are used in dynamic link mode."/>
|
||||
<!-- 上游 libnl 源码树主体为 LGPL-2.1-only,以动态链接方式使用 -->
|
||||
<policyitem type="compatibility" name="LGPL-2.1+" path="libnl/.*" rule="may" group="defaultGroup" desc="libnl upstream sources are LGPL-2.1-only, used in dynamic link mode."/>
|
||||
<!-- 归档的 OHOS 适配 patch 是对 LGPL 源码的改动 -->
|
||||
<policyitem type="compatibility" name="LGPL-2.1+" path="archive/patches/.*\.patch" rule="may" group="defaultGroup" desc="Archived OHOS adaptation patch against LGPL sources."/>
|
||||
<!-- Linux 内核 UAPI 头文件:GPL-2.0 WITH Linux-syscall-note,syscall-note 例外允许非 GPL 用户态程序引用 -->
|
||||
<policyitem type="compatibility" name="GPL-2.0+" path="libnl/include/linux-private/.*" rule="may" group="defaultGroup" desc="Linux kernel UAPI headers under GPL-2.0 WITH Linux-syscall-note; the syscall-note exception permits use by non-GPL userspace."/>
|
||||
<!-- .clang-format:GPL-2.0 代码风格配置,不参与编译/分发 -->
|
||||
<policyitem type="compatibility" name="GPL-2.0" path="libnl/.clang-format" rule="may" group="defaultGroup" desc="Code-style config only, not compiled or linked into the binary."/>
|
||||
</policy>
|
||||
</policylist>
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filename" name="*.8|*.png|*.sym" desc="desc files"/>
|
||||
<filteritem type="filepath" name="libnl/tests/.*" desc="Test files"/>
|
||||
<filteritem type="filepath" name="libnl/doc/.*" desc="Documentation sources, not shipped in the binary"/>
|
||||
</filefilter>
|
||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||
<!-- 提前生成的构建产物:无标准 license 头(autoheader/flex/bison 生成) -->
|
||||
<filteritem type="filepath" name="libnl/include/config.h" desc="Generated by configure/autoheader, no license header."/>
|
||||
<filteritem type="filepath" name="libnl/lib/route/pktloc_grammar\.[ch]" desc="Generated by flex, no license header."/>
|
||||
<filteritem type="filepath" name="libnl/lib/route/pktloc_syntax\.[ch]" desc="Generated by bison (carries GPL-with-special-exception boilerplate)."/>
|
||||
<filteritem type="filepath" name="libnl/lib/route/cls/ematch_grammar\.[ch]" desc="Generated by flex."/>
|
||||
<filteritem type="filepath" name="libnl/lib/route/cls/ematch_syntax\.[ch]" desc="Generated by bison (carries GPL-with-special-exception boilerplate)."/>
|
||||
<!-- 整包校验和文本,无 license 头 -->
|
||||
<filteritem type="filepath" name="archive/.*\.sha256sums" desc="Upstream tarball SHA256 checksum text, no license header."/>
|
||||
</filefilter>
|
||||
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
||||
<filteritem type="filepath" name="libnl/include/config.h" desc="Generated by configure/autoheader, no copyright header."/>
|
||||
<filteritem type="filepath" name="libnl/lib/route/pktloc_grammar\.[ch]" desc="Generated by flex, no copyright header."/>
|
||||
<filteritem type="filepath" name="libnl/lib/route/pktloc_syntax\.[ch]" desc="Generated by bison, no copyright header."/>
|
||||
<filteritem type="filepath" name="libnl/lib/route/cls/ematch_grammar\.[ch]" desc="Generated by flex, no copyright header."/>
|
||||
<filteritem type="filepath" name="libnl/lib/route/cls/ematch_syntax\.[ch]" desc="Generated by bison, no copyright header."/>
|
||||
<filteritem type="filepath" name="archive/.*\.sha256sums" desc="Checksum text, no copyright header."/>
|
||||
</filefilter>
|
||||
<filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||
<filteritem type="filepath" name="libnl/python/.*/__init__\.py" desc="Empty package __init__ files (detected as binary by encoding)."/>
|
||||
<filteritem type="filepath" name="libnl/.*/\.gitignore" desc="Empty/near-empty .gitignore files."/>
|
||||
</filefilter>
|
||||
</filefilterlist>
|
||||
<licensematcherlist>
|
||||
<licensematcher name="LGPL" desc="">
|
||||
<licensetext name="License: LGPLv2" desc=""/>
|
||||
</licensematcher>
|
||||
</licensematcherlist>
|
||||
</oatconfig>
|
||||
</configuration>
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
# libnl
|
||||
|
||||
#### Introduction & Software Architecture
|
||||
- [Refer to the official documentation](https://www.infradead.org/~tgr/libnl/)
|
||||
|
||||
#### Usage Guidelines
|
||||
- [Refer to Official Documentation](https://www.infradead.org/~tgr/libnl/)
|
||||
|
||||
- [Refer to the official API documentation](https://www.infradead.org/~tgr/libnl/doc/api/group__cb.html)
|
||||
#### Usage Instructions
|
||||
|
||||
#### Generates Header File
|
||||
- [Refer to Official API Documentation](https://www.infradead.org/~tgr/libnl/doc/api/group__cb.html)
|
||||
|
||||
The following patches is carried by the openEuler:libnl3 open source library:
|
||||
#### Patch Details
|
||||
|
||||
`solve-oh-compile-problem3_11_0.patch` applies the OHOS adaptation patch and archives the patch (with conflicts resolved) to `archive/patches/` for reuse in subsequent version upgrades.
|
||||
|
||||
#### Build and Upgrade
|
||||
|
||||
This repository adopts the "pre-prepared code environment" approach: the `libnl/` source tree has already been decompressed, configured, patched, and its flex/bison syntax files pre-generated and committed to the repository. During the build phase, compilation is handled directly by `BUILD.gn`, which does not depend on autotools/flex/bison and does not execute scripts during the `gn gen` phase. When upgrading libnl, please run `prepare.sh` and refer to [docs/UPGRADE_GUIDE.md](docs/UPGRADE_GUIDE.md).
|
||||
|
||||
|
||||
#### Contributing
|
||||
|
||||
The following patches are added to solve the compilation problem under the OpenHarmony project:
|
||||
[How to Contribute](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/参与贡献.md)
|
||||
|
||||
solve-oh-compile-problem3_11_0.patch
|
||||
[Commit Message Specifications](https://gitee.com/openharmony/device_qemu/wikis/Commit%20message%E8%A7%84%E8%8C%83)
|
||||
|
||||
#### Contribution
|
||||
|
||||
[How to involve](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/参与贡献.md)
|
||||
|
||||
[Commit message spec](https://gitee.com/openharmony/device_qemu/wikis/Commit%20message%E8%A7%84%E8%8C%83)
|
||||
|
||||
#### Repositories Involved
|
||||
#### Related Repositories
|
||||
|
||||
[third_party_wpa_supplicant](https://gitee.com/openharmony/third_party_wpa_supplicant)
|
||||
|
||||
[drivers_peripheral](https://gitee.com/openharmony/drivers_peripheral)
|
||||
|
||||
|
||||
@@ -10,11 +10,16 @@
|
||||
|
||||
#### patch包说明
|
||||
|
||||
以下patch包为openEuler:libnl3开源库本身携带
|
||||
solve-oh-compile-problem3_11_0.patch 应用 OHOS 适配 patch,并把(解决冲突后的)
|
||||
patch 归档到archive/patches/ 供后续版本升级复用
|
||||
|
||||
#### 构建与升级
|
||||
|
||||
本仓库采用“代码环境提前准备”方式:`libnl/` 源码树已完成解压、configure、
|
||||
打 patch 及 flex/bison 语法文件预生成并入库,构建期由 `BUILD.gn` 直接编译,
|
||||
不依赖 autotools/flex/bison,也不在 `gn gen` 阶段执行脚本。升级 libnl 时请运行
|
||||
`prepare.sh` 并参考 [docs/UPGRADE_GUIDE.md](docs/UPGRADE_GUIDE.md)。
|
||||
|
||||
以下patch包为解决在OpenHarmony工程下编译存在的问题自行添加
|
||||
solve-oh-compile-problem3_11_0.patch
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
871d8f9f05b86dab080988bb994748384c1416a5d03de1f9f5e811f265094b04 libnl3_11_0.tar.gz
|
||||
@@ -0,0 +1,151 @@
|
||||
# libnl 升级指导
|
||||
|
||||
本仓库采用 **代码环境提前准备** 的方式集成 libnl:上游源码已经过
|
||||
解压、`configure`、flex/bison 语法文件预生成、以及应用 OpenHarmony 适配 patch,
|
||||
结果直接入库到 `libnl/` 目录。因此日常构建只需 `gn`/`ninja` 直接
|
||||
编译 `BUILD.gn`,**不依赖** autotools / configure / flex / bison 等主机工具,
|
||||
也不在 `gn gen` 阶段执行任何脚本。
|
||||
|
||||
> 历史背景:旧方案在每次 `gn gen` 时通过 `BUILD.gn` 的 `exec_script("install.sh")`
|
||||
> 重复解压 tarball 并运行 `autogen.sh` + `configure`,缓慢且强依赖主机环境。
|
||||
> 现已由 `prepare.sh`(仅升级时手动运行)替代。
|
||||
|
||||
## 仓库内容约定
|
||||
|
||||
- `libnl/`:已准备好的源码树(含 `include/config.h`、`include/netlink/version.h`
|
||||
以及预生成的语法文件 `lib/route/{pktloc_grammar,pktloc_syntax}.{c,h}`、
|
||||
`lib/route/cls/{ematch_grammar,ematch_syntax}.{c,h}`)。直接被 `BUILD.gn` 编译。
|
||||
- `prepare.sh`:分三阶段的环境准备脚本(升级时手动运行,构建期不调用)。
|
||||
- `solve-oh-compile-problem3_11_0.patch`:当前生效的 OpenHarmony 适配 patch。
|
||||
- `archive/patches/`:历史各版本(解决冲突后的)适配 patch 归档,供后续升级参考复用。
|
||||
- `archive/libnl-<ver>.sha256sums`:**整个上游 tar 包**的 SHA256 校验和(标准
|
||||
`sha256sum` 单行格式、记录规范包名),随上游基线 commit 入库,供整包可信校验。
|
||||
- `COPYING`:LGPL v2.1 许可文件。
|
||||
- 上游 tarball **不入库**;上游版本/地址记录在 `README.OpenSource`(其元数据结构
|
||||
保持不变,**不**在其中记录 SHA256)。源码可信校验改由上述 `*.sha256sums`
|
||||
整包校验和 + git「上游基线 commit」提供。
|
||||
|
||||
## 升级流程:三个独立 commit
|
||||
|
||||
为清晰区分 **上游原始代码 / 构建环境产物 / OHOS 适配** 三类变更,每次升级按
|
||||
`upstream → build → patch` 三个阶段进行,**每个阶段各提交一次独立 commit**。
|
||||
这样 `git diff` 在三个 commit 之间分别只显示一类变更,溯源清晰、便于审计与回溯。
|
||||
|
||||
以从 `3.11.0` 升级到新版本 `<new_ver>` 为例:
|
||||
|
||||
### 0. 准备:更新脚本变量与版本元信息
|
||||
|
||||
- 编辑 `prepare.sh` 顶部变量:`LIBNL_VERSION`、`UPSTREAM_URL`、`EXTRACTED_DIR`
|
||||
(若上游归档顶层目录名变化)。
|
||||
- 更新 `README.OpenSource` 的 `Version Number` 与 `Upstream URL`
|
||||
(**不**新增 SHA256 字段,保持其元数据结构不变)。
|
||||
- 更新 `bundle.json` 的 `version`(如适用)。
|
||||
|
||||
### 1. commit 1 —— 纯上游源码基线(可信溯源)
|
||||
|
||||
```sh
|
||||
# 方式一:使用本地已下载 tarball;方式二:省略路径,从 Upstream URL 下载
|
||||
./prepare.sh upstream /path/to/libnl-<new_ver>.tar.gz
|
||||
```
|
||||
|
||||
该阶段会清空 `libnl/` 并解压**未经任何修改**的上游源码树(不含 config.h、
|
||||
不含语法生成物、不含 OHOS 改动)。脚本会:
|
||||
|
||||
- 对**整个上游 tar 包**计算 SHA256,写入 `archive/libnl-<new_ver>.sha256sums`
|
||||
(标准 `sha256sum` 单行格式、记录规范包名),随本 commit 入库。
|
||||
- 该整包校验和可用于:
|
||||
```sh
|
||||
# 将上游 tar 包按规范名(如 libnl3_11_0.tar.gz)放到 archive/ 下后校验
|
||||
( cd archive && sha256sum -c libnl-<new_ver>.sha256sums )
|
||||
```
|
||||
或直接把该值与**上游社区发布的 sha256sum 文件**比对,确认 tar 包可信。
|
||||
> 说明:校验对象是**整包 tar.gz**,与上游社区通常发布的校验形式一致;因此
|
||||
> 无需逐文件计算,也不受入库后 configure/patch 改动的影响。
|
||||
|
||||
- 提交:
|
||||
```sh
|
||||
git add libnl/ archive/libnl-<new_ver>.sha256sums README.OpenSource
|
||||
git commit -m "Import libnl <new_ver> upstream"
|
||||
```
|
||||
|
||||
### 2. commit 2 —— 构建环境产物(configure + 语法文件)
|
||||
|
||||
```sh
|
||||
./prepare.sh build
|
||||
```
|
||||
|
||||
该阶段运行 `autogen.sh` + `configure`(产出 `config.h`/`version.h`)、flex/bison
|
||||
预生成 8 个语法文件、清理 autotools 中间产物,并自动调整 `libnl/.gitignore`
|
||||
使上述生成物可入库。
|
||||
|
||||
- 本 commit 的 diff 仅为「新增 config.h + version.h + 8 个语法文件 + .gitignore 调整」,
|
||||
不含任何 OHOS 源码改动。
|
||||
- 提交:
|
||||
```sh
|
||||
git add libnl/
|
||||
git commit -m "libnl <new_ver> build env (configure + grammars)"
|
||||
```
|
||||
|
||||
### 3. commit 3 —— OHOS 适配 patch
|
||||
|
||||
```sh
|
||||
./prepare.sh patch
|
||||
```
|
||||
|
||||
该阶段应用 `solve-oh-compile-problem3_11_0.patch`,并把(解决冲突后的)patch
|
||||
归档到 `archive/patches/solve-oh-compile-problem-<new_ver>.patch`。
|
||||
|
||||
- **若 patch 冲突**:脚本会报错中止。请手动解决冲突、更新根目录的
|
||||
`solve-oh-compile-problem*.patch`(或依据上游变更重做),再重新运行
|
||||
`./prepare.sh patch`。当前 patch 涉及的文件(升级后重点检查是否仍兼容):
|
||||
- `lib/utils.c`、`lib/route/mdb.c`、`lib/route/neigh.c`、`lib/route/link/bridge.c`
|
||||
- `include/base/nl-base-utils.h`
|
||||
- `include/config.h`(交叉编译值修正:`HAVE_STRERROR_L`、
|
||||
`HAVE_DECL_GETPROTOBYNAME_R`、`HAVE_DECL_GETPROTOBYNUMBER_R` 置 0)
|
||||
- `include/nl-priv-dynamic-core/nl-core.h`、`src/lib/utils.c`
|
||||
- 本 commit 的 diff 仅为「OHOS 对上游源码的适配改动 + 归档 patch」。
|
||||
- 提交:
|
||||
```sh
|
||||
git add libnl/ archive/patches/
|
||||
git commit -m "libnl <new_ver> OHOS adaptation patch"
|
||||
```
|
||||
|
||||
> 提示:`upstream`/`build`/`patch` 操作的文件集互不相交,`build` 与 `patch` 顺序
|
||||
> 理论上可换;但务必保持 `configure`(在 build 阶段)早于 `patch`,因为 patch 要
|
||||
> 修正 configure 生成的 `config.h` 交叉编译值。
|
||||
|
||||
### 4. 同步 `BUILD.gn` 的 `sources` 列表
|
||||
|
||||
若上游新增/删除/重命名了 `lib/`、`src/lib/` 下的 `.c` 文件,需相应增删 `BUILD.gn`
|
||||
中 `sources` 条目。语法文件(`pktloc_*`、`ematch_*`)已作为预生成源直接列入
|
||||
`sources`,无需 `action()`。此改动可并入 commit 3 或单独提交。
|
||||
|
||||
### 5. 构建验证
|
||||
|
||||
```sh
|
||||
./build.sh --product-name <product> --build-target libnl_share
|
||||
```
|
||||
|
||||
验证要点:
|
||||
|
||||
- `gn gen` 阶段不再执行任何脚本(无 `install.sh` / autotools 调用)。
|
||||
- 即使主机 **未安装** flex / bison / autoconf,也能成功编译出 `libnl_share` 动态库。
|
||||
|
||||
## 一次性快速搭建(非升级场景)
|
||||
|
||||
若只是想在本地一次性重建已准备好的源码树(不关心三 commit 拆分):
|
||||
|
||||
```sh
|
||||
./prepare.sh all /path/to/libnl-3.11.0.tar.gz
|
||||
```
|
||||
|
||||
## 设计要点(为何这样做)
|
||||
|
||||
- `configure` 产物中,GN 构建实际只需要 `include/config.h` 与
|
||||
`include/netlink/version.h` 两个文件;其余 Makefile / libtool / `.pc` 等
|
||||
对 GN 构建无用,故 `build` 阶段在生成后即清理,保持源码树精简、
|
||||
避免泄漏主机路径。
|
||||
- `config.h` 由 `configure` 在主机生成后,再由 patch 修正为交叉编译正确值,
|
||||
因此 **顺序必须是先 `configure` 后 `patch`**。
|
||||
- 三阶段对应三 commit,使「上游代码」「构建产物」「OHOS 适配」在版本历史中
|
||||
天然解耦:审计上游变更只看 commit 1,审计 OHOS 改动只看 commit 3。
|
||||
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation version 2.1
|
||||
# of the License.
|
||||
#
|
||||
# Copyright(c) 2023 Huawei Device Co., Ltd.
|
||||
|
||||
set -e
|
||||
cd $1
|
||||
touch test.lock
|
||||
(
|
||||
flock -x 180
|
||||
if [ -d "libnl" ];then
|
||||
rm -rf libnl
|
||||
fi
|
||||
tar xvf libnl-libnl3_11_0.tar.gz
|
||||
mv libnl-libnl3_11_0 libnl
|
||||
cd $1/libnl
|
||||
./autogen.sh
|
||||
./configure
|
||||
patch -p1 < $1/solve-oh-compile-problem3_11_0.patch --fuzz=0 --no-backup-if-mismatch
|
||||
exit 0
|
||||
)180>test.lock
|
||||
@@ -0,0 +1,133 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
# clang-format configuration file. Intended for clang-format >= 11.
|
||||
#
|
||||
# For more information, see:
|
||||
#
|
||||
# Documentation/process/clang-format.rst
|
||||
# https://clang.llvm.org/docs/ClangFormat.html
|
||||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
#
|
||||
---
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveDeclarations: false
|
||||
AlignEscapedNewlines: Left
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: true
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeInheritanceComma: false
|
||||
BreakBeforeTernaryOperators: false
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakConstructorInitializers: BeforeComma
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: false
|
||||
ColumnLimit: 80
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 8
|
||||
ContinuationIndentWidth: 8
|
||||
Cpp11BracedListStyle: false
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: false
|
||||
|
||||
# Taken from:
|
||||
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
|
||||
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
|
||||
# | LC_ALL=C sort -u
|
||||
ForEachMacros:
|
||||
- 'list_for_each_safe'
|
||||
- 'nl_list_for_each_entry'
|
||||
- 'nl_list_for_each_entry_safe'
|
||||
- 'nla_for_each_attr'
|
||||
- 'nla_for_each_nested'
|
||||
- 'nlmsg_for_each'
|
||||
- 'nlmsg_for_each_attr'
|
||||
- 'nlmsg_for_each_msg'
|
||||
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: '(Test)?$'
|
||||
IndentCaseLabels: false
|
||||
IndentGotoLabels: false
|
||||
IndentPPDirectives: None
|
||||
IndentWidth: 8
|
||||
IndentWrappedFunctionNames: false
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 8
|
||||
ObjCSpaceAfterProperty: true
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
|
||||
# Taken from git's rules
|
||||
PenaltyBreakAssignment: 10
|
||||
PenaltyBreakBeforeFirstCallParameter: 30
|
||||
PenaltyBreakComment: 10
|
||||
PenaltyBreakFirstLessLess: 0
|
||||
PenaltyBreakString: 10
|
||||
PenaltyExcessCharacter: 100
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
|
||||
PointerAlignment: Right
|
||||
ReflowComments: false
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: false
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeParens: ControlStatementsExceptForEachMacros
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp03
|
||||
TabWidth: 8
|
||||
UseTab: Always
|
||||
...
|
||||
@@ -0,0 +1,7 @@
|
||||
[flake8]
|
||||
extend-ignore =
|
||||
E203
|
||||
E501
|
||||
filename =
|
||||
*.py
|
||||
*.py.in
|
||||
@@ -0,0 +1,7 @@
|
||||
# List of commits that did automated reformatting. You can ignore them
|
||||
# during git-blame with `--ignore-rev` or `--ignore-revs-file`.
|
||||
#
|
||||
# $ git config --add 'blame.ignoreRevsFile' '.git-blame-ignore-revs'
|
||||
#
|
||||
3c753e3c94b01c63bf99b2709f4780e2df4608eb
|
||||
53da4712439dfd1ccdfeb8d4ca3027082a826e29
|
||||
@@ -0,0 +1,223 @@
|
||||
name: libnl3-ci
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
NLTST_IN_CI: 1
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: fedora:40
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo dnf install -y \
|
||||
clang-tools-extra \
|
||||
git
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup git
|
||||
run: |
|
||||
git config --global --add safe.directory "$PWD"
|
||||
|
||||
- name: Formatting with clang-format
|
||||
run: |
|
||||
clang-format --version
|
||||
./tools/clang-format.sh -n
|
||||
|
||||
ci:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- cc: gcc
|
||||
- cc: clang
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y --no-install-recommends install \
|
||||
check \
|
||||
valgrind \
|
||||
libtool-bin
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
- name: Lint Python
|
||||
if: ${{ matrix.cc == 'gcc' }}
|
||||
run: |
|
||||
python3 -m pip install flake8
|
||||
flake8 . --count --show-source --statistics
|
||||
|
||||
- name: Code formatting with Python black
|
||||
if: ${{ matrix.cc == 'gcc' }}
|
||||
run: |
|
||||
python3 -m pip install black==22.12.0
|
||||
black --check .
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
set -x
|
||||
|
||||
export CC="${{ matrix.cc }}"
|
||||
export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -std=gnu11 -fexceptions"
|
||||
CONFIGURE_ARGS=
|
||||
if [ "$CC" = "clang" ]; then
|
||||
CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function"
|
||||
export LDFLAGS="-Wl,--no-undefined-version,--fatal-warnings"
|
||||
CONFIGURE_ARGS="--enable-debug=no"
|
||||
else
|
||||
export LDFLAGS="-Wl,--no-undefined-version"
|
||||
fi
|
||||
|
||||
./autogen.sh
|
||||
./configure $CONFIGURE_ARGS
|
||||
make -j 15
|
||||
shell: bash
|
||||
|
||||
- name: Build Unit Tests
|
||||
run: |
|
||||
make -j 15 check-build
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: |
|
||||
set -x
|
||||
export NLTST_SEED_RAND=
|
||||
for i in `seq 1 5`; do
|
||||
tests/check-direct
|
||||
tests/check-all
|
||||
make -j 15 check || (cat ./test-suite.log; false)
|
||||
done
|
||||
|
||||
- name: Run Unit Tests w/Valgrind
|
||||
run: |
|
||||
set -x
|
||||
export NLTST_SEED_RAND=
|
||||
CK_FORK=no libtool --mode=execute valgrind --error-exitcode=66 --leak-check=full -s --show-leak-kinds=all ./tests/check-direct
|
||||
CK_FORK=no libtool --mode=execute valgrind --error-exitcode=66 --leak-check=full -s --show-leak-kinds=all ./tests/check-all
|
||||
shell: bash
|
||||
|
||||
- name: Install packages for Release
|
||||
run: |
|
||||
python3 -m pip install \
|
||||
asciidoc \
|
||||
graphviz \
|
||||
pygments
|
||||
sudo apt-get -y --no-install-recommends install \
|
||||
doxygen \
|
||||
graphviz \
|
||||
mscgen \
|
||||
source-highlight
|
||||
|
||||
- name: Build Release
|
||||
run: |
|
||||
set -x
|
||||
git clean -fdx
|
||||
export CC="${{ matrix.cc }}"
|
||||
NO_GPG_SIGN=1 ./tools/build_release.sh BuildAll
|
||||
|
||||
- name: Build out-of-tree and disable-static
|
||||
run: |
|
||||
set -x
|
||||
git clean -fdx
|
||||
export CC="${{ matrix.cc }}"
|
||||
export CFLAGS="-Werror -std=gnu11 -fexceptions"
|
||||
if [ "$CC" = "clang" ]; then
|
||||
CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function"
|
||||
fi
|
||||
|
||||
./autogen.sh
|
||||
mkdir build
|
||||
cd build
|
||||
../configure --disable-static
|
||||
make -j 15
|
||||
make -j 15 check-build
|
||||
export NLTST_SEED_RAND=
|
||||
make -j 15 check || (cat ./test-suite.log; false)
|
||||
|
||||
- name: Link with mold
|
||||
run: |
|
||||
sudo apt-get -y --no-install-recommends install \
|
||||
mold
|
||||
git clean -fdx
|
||||
export LDFLAGS="-fuse-ld=mold -Wl,--fatal-warnings"
|
||||
./autogen.sh
|
||||
./configure
|
||||
make -j 15 V=1
|
||||
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
|
||||
ci-alpine:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: alpine:latest
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: |
|
||||
apk add \
|
||||
autoconf \
|
||||
automake \
|
||||
bash \
|
||||
bison \
|
||||
check-dev \
|
||||
flex \
|
||||
gcc \
|
||||
git \
|
||||
libtool \
|
||||
linux-headers \
|
||||
make \
|
||||
musl-dev \
|
||||
pkgconfig
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup git
|
||||
run: |
|
||||
git config --global --add safe.directory "$PWD"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
set -x
|
||||
|
||||
export CC="${{ matrix.cc }}"
|
||||
export CFLAGS="-DNL_MORE_ASSERTS=1000 -O2 -Werror -std=gnu11 -fexceptions"
|
||||
if [ "$CC" = "clang" ]; then
|
||||
CFLAGS="$CFLAGS -Wno-error=unused-command-line-argument -Wno-error=unused-function"
|
||||
export LDFLAGS="-Wl,--no-undefined-version,--fatal-warnings"
|
||||
else
|
||||
export LDFLAGS="-Wl,--no-undefined-version"
|
||||
fi
|
||||
|
||||
./autogen.sh
|
||||
./configure
|
||||
make -j 15
|
||||
|
||||
- name: Build Unit Tests
|
||||
run: |
|
||||
make -j 15 check-build
|
||||
|
||||
- name: Run Unit Tests
|
||||
run: |
|
||||
set -x
|
||||
export NLTST_SEED_RAND=
|
||||
for i in `seq 1 5`; do
|
||||
tests/check-direct
|
||||
# unshare() does not work (EPERM). This test currently cannot pass
|
||||
# (odd).
|
||||
# tests/check-all
|
||||
# make -j 15 check || (cat ./test-suite.log; false)
|
||||
done
|
||||
@@ -0,0 +1,152 @@
|
||||
*~
|
||||
.deps
|
||||
.libs
|
||||
.dirstamp
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.swp
|
||||
Makefile
|
||||
Makefile.in
|
||||
defs.h.in
|
||||
defs.h.in~
|
||||
cscope.*
|
||||
test-suite.log
|
||||
|
||||
/*.pc
|
||||
/aclocal.m4
|
||||
/autom4te.cache
|
||||
/build-aux/
|
||||
/config.*
|
||||
/configure
|
||||
/doc/*.html
|
||||
/doc/Doxyfile
|
||||
/doc/aclocal.m4
|
||||
/doc/api/*.css
|
||||
/doc/api/*.dot
|
||||
/doc/api/*.html
|
||||
/doc/api/*.js
|
||||
/doc/api/*.map
|
||||
/doc/api/*.md5
|
||||
/doc/api/*.png
|
||||
/doc/api/*.tag
|
||||
/doc/api/_formula*
|
||||
/doc/api/doxygen.svg
|
||||
/doc/api/formula.repository
|
||||
/doc/api/jquery.js
|
||||
/doc/asciidoc.tmp
|
||||
/doc/autom4te.cache/
|
||||
/doc/build-aux/
|
||||
/doc/config.*
|
||||
/doc/configure
|
||||
/doc/images/*.odg
|
||||
/doc/images/asciidoc__*.png
|
||||
/doc/images/core__*
|
||||
/doc/libnl.dict
|
||||
/include/config.h
|
||||
/include/config.h.in
|
||||
/include/netlink/version.h
|
||||
/include/stamp-h1
|
||||
/lib/defs.h
|
||||
/lib/lex.yy.c
|
||||
/lib/libnl-*.so*
|
||||
/lib/libnl.so*
|
||||
/lib/route/cls/ematch_grammar.[ch]
|
||||
/lib/route/cls/ematch_syntax.[ch]
|
||||
/lib/route/pktloc_grammar.c
|
||||
/lib/route/pktloc_grammar.h
|
||||
/lib/route/pktloc_syntax.c
|
||||
/lib/route/pktloc_syntax.h
|
||||
/lib/stamp-h1
|
||||
/libnl-1.pc
|
||||
/libtool
|
||||
/m4/libtool.m4
|
||||
/m4/lt*.m4
|
||||
/python/**/capi*
|
||||
/python/build/
|
||||
/python/setup.py
|
||||
/src/genl-ctrl-list
|
||||
/src/idiag-socket-details
|
||||
/src/nf-ct-add
|
||||
/src/nf-ct-events
|
||||
/src/nf-ct-list
|
||||
/src/nf-exp-add
|
||||
/src/nf-exp-delete
|
||||
/src/nf-exp-list
|
||||
/src/nf-log
|
||||
/src/nf-monitor
|
||||
/src/nf-queue
|
||||
/src/nl-addr-add
|
||||
/src/nl-addr-delete
|
||||
/src/nl-addr-list
|
||||
/src/nl-class-add
|
||||
/src/nl-class-delete
|
||||
/src/nl-class-list
|
||||
/src/nl-classid-lookup
|
||||
/src/nl-cls-add
|
||||
/src/nl-cls-delete
|
||||
/src/nl-cls-list
|
||||
/src/nl-fib-lookup
|
||||
/src/nl-link-enslave
|
||||
/src/nl-link-ifindex2name
|
||||
/src/nl-link-list
|
||||
/src/nl-link-name2ifindex
|
||||
/src/nl-link-release
|
||||
/src/nl-link-set
|
||||
/src/nl-link-stats
|
||||
/src/nl-list-caches
|
||||
/src/nl-list-sockets
|
||||
/src/nl-monitor
|
||||
/src/nl-neigh-add
|
||||
/src/nl-neigh-delete
|
||||
/src/nl-neigh-list
|
||||
/src/nl-neightbl-list
|
||||
/src/nl-nh-list
|
||||
/src/nl-pktloc-lookup
|
||||
/src/nl-qdisc-add
|
||||
/src/nl-qdisc-delete
|
||||
/src/nl-qdisc-list
|
||||
/src/nl-route-add
|
||||
/src/nl-route-delete
|
||||
/src/nl-route-get
|
||||
/src/nl-route-list
|
||||
/src/nl-rule-list
|
||||
/src/nl-tctree-list
|
||||
/src/nl-util-addr
|
||||
/tags
|
||||
/tests/check-all
|
||||
/tests/check-all.log
|
||||
/tests/check-all.trs
|
||||
/tests/check-direct
|
||||
/tests/check-direct.log
|
||||
/tests/check-direct.trs
|
||||
/tests/test-*.log
|
||||
/tests/test-*.trs
|
||||
/tests/test-cache-mngr
|
||||
/tests/test-complex-HTB-with-hash-filters
|
||||
/tests/test-create-bond
|
||||
/tests/test-create-bridge
|
||||
/tests/test-create-geneve
|
||||
/tests/test-create-ifb
|
||||
/tests/test-create-ip6tnl
|
||||
/tests/test-create-ipgre
|
||||
/tests/test-create-ipgretap
|
||||
/tests/test-create-ipip
|
||||
/tests/test-create-ipvlan
|
||||
/tests/test-create-ipvti
|
||||
/tests/test-create-macsec
|
||||
/tests/test-create-macvlan
|
||||
/tests/test-create-macvtap
|
||||
/tests/test-create-sit
|
||||
/tests/test-create-veth
|
||||
/tests/test-create-vlan
|
||||
/tests/test-create-vrf
|
||||
/tests/test-create-vxlan
|
||||
/tests/test-create-xfrmi
|
||||
/tests/test-delete-link
|
||||
/tests/test-genl
|
||||
/tests/test-loopback-up-down
|
||||
/tests/test-nf-cache-mngr
|
||||
/tests/test-socket-creation
|
||||
/tests/test-suite.log
|
||||
/tests/test-u32-filter-with-actions
|
||||
@@ -0,0 +1 @@
|
||||
-linux -il0 -cs -lp -cbi0
|
||||
@@ -0,0 +1,502 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
@@ -0,0 +1,336 @@
|
||||
ChangeLog discontinued, git history can be found here:
|
||||
https://github.com/thom311/libnl
|
||||
|
||||
Summary of Changes from 1.0-pre6 to 1.0-pre7
|
||||
================================================
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
o Generic netlink support
|
||||
o Route Addition/Deletion
|
||||
o Added nl_cache_subset()
|
||||
o Have nl_object_clone() make real clones without
|
||||
sharing any data.
|
||||
o Remove old nl_object_alloc() not based on a object
|
||||
operations to avoid bugs due to missing init.
|
||||
o Added nl-list-caches utility
|
||||
o Removed nlmsg_build_no_hdr(), duplicate
|
||||
o Reworked message interface
|
||||
o Fixed nlmsg_put() and genlmsg_put() to correctly reserve
|
||||
tail room for user specific headers.
|
||||
o Added nl_cache_move()
|
||||
o Renamed nl_cache_delete() to nl_cache_remove() (no API break)
|
||||
o Fixed reference counting while objects stay in caches.
|
||||
o Object marking
|
||||
o Moved attribute mask for objects into generic structure
|
||||
o nl-list-caches: List available dump procedures
|
||||
o Use PAGE_SIZE as initial buffer size when reading from
|
||||
netlink socket
|
||||
o Double buffer size when recv() returns MSG_TRUNC
|
||||
o Replaced filter object operation with new compare operation
|
||||
capable of listing differences between two objects
|
||||
o Added nl_object_identical() to check if two objects are
|
||||
identical from a uniqueness point of view
|
||||
o Added nl_object_diff() returning a bitmask of differences in
|
||||
attributes
|
||||
o Added nl_object_attr_list() generating a list of attribute
|
||||
name the object has assigned
|
||||
o Cache updates based on event notifications, code based on
|
||||
Patrick McHardy's patches
|
||||
o Cache Manager
|
||||
o Added NL_AUTO_PID, NL_AUTO_SEQ for convenience
|
||||
o Disable MSG_PEEK by default and provide nl_socket_enable_msg_peek()
|
||||
o Fixed nl_recvmsgs() to return 0 when interrupted via NL_STOP or
|
||||
NL_SKIP
|
||||
o Fixed nl_recvmsgs() to stop reading after parsing if not in the
|
||||
middle of a multipart message.
|
||||
o Fixed nl_recvmsgs() to not stop after receiving an ACK
|
||||
o Fixed nl_recvmsgs() to not blindly discard remaining messages
|
||||
if a NLMSG_DONE message is received.
|
||||
|
||||
Petr Gotthard <petr.gotthard@siemens.com>
|
||||
Siemens AG Oesterreich
|
||||
o Fix u32 to properly handle multiple keys
|
||||
o rtnl_htb_set_(r|c)buffer()
|
||||
o Fixed MTU handling in HTB class, problem pointed out
|
||||
by Edouard Thuleau
|
||||
|
||||
Zilvinas Valinskas <zilvinas@wilibox.com>
|
||||
o Fix wrong msg_namelen in nl_recv()
|
||||
o Fix memory leak in flnl_request_put()
|
||||
|
||||
Helmut Schaa <hschaa@suse.de>
|
||||
o Fix for using libnl from within C++
|
||||
|
||||
Patrick McHardy <kaber@trash.net>
|
||||
o *_alloc_cache(): Only refill cache if handle is provided
|
||||
|
||||
James Oakley <jfunk@funktronics.ca>
|
||||
o Fix rtnl_link_set_arptype() typo
|
||||
|
||||
Philip Craig <philipc@snapgear.com>
|
||||
o Change address family type from char to int
|
||||
o Fix the error handling when the build fails.
|
||||
o add nl_cache_mngr_get_fd()
|
||||
o add netfilter support
|
||||
o add netfilter conntrack support
|
||||
o add netfilter log support
|
||||
|
||||
Summary of Changes from 1.0-pre5 to 1.0-pre6
|
||||
================================================
|
||||
Christopher Aillon <caillon@redhat.com>
|
||||
o Use $(libdir) instead of $(prefix)/lib for 64bit awesomeness.
|
||||
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
o Extend nl_msg to include source address, destination address
|
||||
and the protocol being used.
|
||||
o Make nl_send*() take a nl_msg instead of a nlmsghdr (API BREAK)
|
||||
o Change callbacks to take a nl_msg instead of source address
|
||||
and nlmsghdr (API BREAK)
|
||||
o caches must specify the protocol they're hooked up from now on
|
||||
if they intend to be associated with message types.
|
||||
o cache_mngt_associate now takes the protocol besides the message
|
||||
type to allow for multiple protocols to be supported (API BREAK)
|
||||
o overwrite destination address in nl_send() when specified in the
|
||||
message itself, allows for unbound addressing.
|
||||
o Support for netlink based fib_lookup()
|
||||
o Documentation fixes
|
||||
o Fix double nlmsg_free() in nl_recvmsgs() while receiving
|
||||
a multipart message and the read was interrupted.
|
||||
o Change cache operations to store names for message types.
|
||||
o Provide interface to convert message type to character string.
|
||||
o Add dp_dump_msgtype to prefix each dumped element with a
|
||||
pretty printed message type.
|
||||
o netlink fib lookup support
|
||||
o nl_recvmsgs() debugging
|
||||
o use nl_cachemngt_type2name() when pretty printing netlink header
|
||||
o Routing protocol translations.
|
||||
o Routing metric translations.
|
||||
o Revised route dumping
|
||||
o Nexthop flag translations.
|
||||
o Add support for IFF_DORMANT
|
||||
|
||||
Petr Gotthard <petr.gotthard@siemens.com>
|
||||
Siemens AG Oesterreich
|
||||
o Fix access to obj after freeing it
|
||||
o Fix u32 selector access after realloc()
|
||||
o Fix missing out-of-memory error handling in various places
|
||||
o Enhance nl-monitor to have group selection selectable and
|
||||
demonstrate usage of select()
|
||||
o Don't ignore IFF_RUNNING any longer
|
||||
o fw classifier support
|
||||
|
||||
Patrick McHardy <kaber@trash.net>
|
||||
o Fix conflicting types for __u64
|
||||
o Fix printf format string warnings
|
||||
o Fix object cloning
|
||||
o Deal with structure padding in nl_object_clone
|
||||
o Fix nl_addr leak
|
||||
o Set ce_msgtype in all parsed objects
|
||||
o Fix addr flag filter
|
||||
o Fix RTNLGRP definitions (was based on broken kernel version)
|
||||
o Export nl_get_errno()
|
||||
o Add function to get/set peer pid
|
||||
o Add IFF_LOWER_UP
|
||||
o Add/export some missing accessor functions
|
||||
o print /0 prefix in nl_addr2str()
|
||||
o Fix invalid free in nl_addr_parse for AF_UNSPEC addresses
|
||||
o Use __str2flags instead of __str2type in rtnl_link_str2flags()
|
||||
o Make sure object and filter types match in nl_object_match()
|
||||
o Add support for credential passing over netlink sockets (API BREAK)
|
||||
o Add support for custom dump callbacks
|
||||
o Add NL_DUMP_ENV format
|
||||
|
||||
Michael Biebl <biebl@teco.edu>
|
||||
"Alex V. Myltsev" <avm@altlinux.ru>
|
||||
o Makefile fixes
|
||||
|
||||
|
||||
Summary of Changes from 1.0-pre4 to 1.0-pre5
|
||||
================================================
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
o Use minimized local copies for <linux/if.h>, <linux/if_arp.h>,
|
||||
and <linux/if_ether.h> to avoid compile troubles with
|
||||
applications including <net/if*.h>
|
||||
Reported by Christopher Aillon.
|
||||
|
||||
Summary of Changes from 1.0-pre3 to 1.0-pre4
|
||||
================================================
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
o Fix wrong rtnl_addr_set_prefixlen() external declaration,
|
||||
reported by Dan Williams.
|
||||
o Fix nl_addr_parse() to not change the original string
|
||||
for prefixes.
|
||||
o Do not build documentation per default, but have the user
|
||||
issue 'make gendoc'
|
||||
o Assume neighbours to be permanent, set NUD_PERMANENT if not
|
||||
specified otherwise.
|
||||
|
||||
Summary of Changes from 1.0-pre2 to 1.0-pre3
|
||||
================================================
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
o Fix SFQ parser to allocate qdisc options.
|
||||
o Fix rule statistics dumping to not call itself.
|
||||
o Complete Netem qdisc interface.
|
||||
o Add rtnl_*_put() and rtnl_*_free() to increase readability.
|
||||
o Cleanup of nl-* tools
|
||||
o Fix inclusion guards of route/neightbl.h
|
||||
o Fix nl_connect() to only modify rx/tx socket buffers if not
|
||||
already modified by the user.
|
||||
o Fix wrong nl_handle_alloc() prototype.
|
||||
o Fix typo in route/addr.c causing label to be marked as
|
||||
local address.
|
||||
o Use ~0UL as default prefix length instead of 0.
|
||||
o Fix neighbour message parser to correctly store core.
|
||||
attributes and provide them again.
|
||||
o Fix neighbour message parser to correctly guess address family.
|
||||
to make it compatible with nl_addr_parse() and ether llc
|
||||
addresses.
|
||||
o Add rtnl_route_table2str(), rtnl_route_str2table().
|
||||
o Add nl_cache_nitems_filter() to find out if a filter produces
|
||||
any matches.
|
||||
o Remove rtnl_rule_set_(dst|src)_str() (obsolete).
|
||||
o Remove scope and protocol field of routing rule.
|
||||
o Complete routing rules module.
|
||||
o Move realms translations from route to rtnl module.
|
||||
|
||||
Summary of Changes from 1.0-pre1 to 1.0-pre2
|
||||
================================================
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
o More API documentation
|
||||
o Added flags argument to rtnl_addr_(add|build_add_request)().
|
||||
o Added rtnl_addr_(set|get)_multicast().
|
||||
o Moved scope translations routines from route/route.c to
|
||||
route/rtnl.c, required by other modules as well.
|
||||
o Removed old rtattr bits from rtnetlink-kernel.h
|
||||
o Customized libnl.css for doxygen documentation
|
||||
o Removed non-reentrant translation routines, only bloating
|
||||
the code and too risky.
|
||||
o Fixed wrong version number from 1.0-pre1.
|
||||
o Re-enabled unfinished policer module.
|
||||
o Reworked TBF module, automatic caluclation of transmit times,
|
||||
limit setable via latency, automatic cell size calculation,
|
||||
options TLV generation. (untested)
|
||||
o Renamed nl_xmittime() to rtnl_tc_calc_txtime().
|
||||
o Renamde nl_build_rtable() to rtnl_tc_build_rate_table()
|
||||
|
||||
Petr Gotthard <petr.gotthard@siemens.com>,
|
||||
Siemens AG Oesterreich
|
||||
o Fix symlinks to libnl library files to be moveable
|
||||
o Fix extern struct prototypes meant to be static.
|
||||
o Add empty install target to src/Makefile
|
||||
|
||||
Simon Stelling <blubb@gentoo.org>
|
||||
o Use LIBDIR instead of $(prefix)/lib for users to allow librariers
|
||||
into $(prefix)/lib64.
|
||||
|
||||
Summary of Changes from 0.5.0 to 1.0-pre1
|
||||
================================================
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
o Uncountable number of changes, rewrite of certain modules,
|
||||
several major API breakages
|
||||
|
||||
Petr Gotthard <petr.gotthard@siemens.com>,
|
||||
Siemens AG Oesterreich
|
||||
o added class_build, rtnl_class_build_add_request, rtnl_class_add
|
||||
o added HTB (Hierarchical Token Bucket) class support
|
||||
o added nl_xmittime, nl_build_rtable
|
||||
o added nl_data_append to realloc a nl_data structure
|
||||
o added rtnl_rcopy_ratespec as reverse to rtnl_copy_ratespec
|
||||
o fixed byte order conversion of rtnl_filter.protocol
|
||||
o SuSE and Fedora Linux compile fixes
|
||||
o fixed u32 classifier support
|
||||
o added rtnl_u32_set_handle, rtnl_u32_set_classid, rtnl_u32_set_flags
|
||||
and several rtnl_u32_add_key_... operations to u32 classifier
|
||||
|
||||
Summary of Changes from 0.4.4 to 0.5.0
|
||||
================================================
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
o API documentation
|
||||
o nl_cache_filter to manually filter on a object
|
||||
o partial routing support
|
||||
o routing rules support
|
||||
o Properly set address family when setting addresses
|
||||
o debug flag and some rare messages, more to come
|
||||
o make error message verboseness configurable
|
||||
o tc fixes to wait for ack
|
||||
o cleanup and adaption of address code to latest internal API
|
||||
o various cleanups
|
||||
o dozens of API breakages (better now than later)
|
||||
|
||||
Daniel Hottinger <hotti@hotti.ch>
|
||||
o arch 64bit printf length modifier fixes
|
||||
|
||||
Baruch Even <baruch@ev-en.org>,
|
||||
Mediatrix Telecom, inc. <ericb@mediatrix.com>
|
||||
o address support
|
||||
|
||||
Summary of changes from 0.4.3 to 0.4.4
|
||||
================================================
|
||||
Thomas Graf <tgraf@suug.ch>:
|
||||
o overall cleanups for better code quality
|
||||
o replace dump_(brief|full|with_stats) ops with
|
||||
dump[NL_DUMP_MAX] array to allow further additions without
|
||||
breaking the ABI.
|
||||
o add of send_ack callback, called whenever when oppenent
|
||||
asks for an ACK.
|
||||
o make nl_parse_rtattr initialize the tb buffer like in the
|
||||
kernel, caller must no longer take care of it.
|
||||
o remove nl_addrnattr (obsolete)
|
||||
o fixed nl_msg_append_raw to correctly calculate length
|
||||
for raw data not aligned to NLMSG_ALIGN
|
||||
o fix memory leak in nl_recv in case of errors
|
||||
o correctly check sequence numbers if more than one message
|
||||
was sent out before the answer is being received.
|
||||
o add workaround for buggy netlink applications not properly
|
||||
setting NLM_F_MULTI.
|
||||
|
||||
Summary of changes from 0.4.2 to 0.4.3
|
||||
================================================
|
||||
|
||||
Thomas Graf <tgraf@suug.ch>:
|
||||
o use parser_param in nl_cache_parse
|
||||
o EGP: dump nfilters attribute
|
||||
o allow retrieving of filters attached to classes via
|
||||
FILTER_CACHE_PARENT(C) cache argument
|
||||
o filter message building API
|
||||
|
||||
Summary of changes from 0.4.1 to 0.4.2
|
||||
================================================
|
||||
|
||||
Baruch Even <baruch@ev-en.org>:
|
||||
o memory leak fix in nl_parse_rtattr
|
||||
o reset padding to 0 when appending raw data to a nl_msg
|
||||
o avoid overwriting nlmsg ptr when buffer extending fails
|
||||
o typo fixes
|
||||
o create symlinks libnl.so.0 and libnl.so
|
||||
|
||||
Thomas Graf <tgraf@suug.ch>:
|
||||
o EGP classifier support
|
||||
o avoid null pointer in printf call
|
||||
o added nl_cache_parse to put nl_msg's into a cache
|
||||
o added rtnl_filter_build to build a nl_msg filter message
|
||||
o correctly install header files
|
||||
o nl_msg_payload/nl_msg_payloadlen to access nl_msg payload
|
||||
o nl_parse_nested macro to simplify nested TLV parsing
|
||||
o NL_ERROR_ASSERT compile flag to assert(0) on errors
|
||||
o rta alignment fix in nl_msg_append_tlv
|
||||
o added nl_msg_parse_rtattr as shortcut for nl_parse_rtattr
|
||||
for nl_msg API
|
||||
o added nl_parse_nested for nested TLVs
|
||||
o added RTA_ARRAY_ELEMS macro to calculate array length
|
||||
for array TLVs
|
||||
o added nl_wait_for_ack to wait for the next ack
|
||||
o added rtnl_link_build_change_request(...)
|
||||
o added rtnl_neigh_build_*_request
|
||||
o converted neighbour code to use nl_wait_for_ack
|
||||
o cb_recvmsgs_ow callback to overwrite internal calls to
|
||||
nl_recvmsgs_def
|
||||
o cb_seq_check callback to overwrite default sequence checking
|
||||
o added nl_parser_param as argument for message parsers including
|
||||
a callback to be called upon successful parsing of a message.
|
||||
Removes the requirement of having all parsed messages to be added
|
||||
to a cache.
|
||||
o added cb_recv_ow and nl_send_ow callbacks to overwrite internal
|
||||
calls to nl_recv and nl_send.
|
||||
|
||||
Jamal Hadi Salim <hadi@cyberus.ca>
|
||||
o Linux 2.4 compile fixes
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
die() {
|
||||
echo "$@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
BASEDIR="$(dirname "$0")"
|
||||
|
||||
cd "$BASEDIR" || die "Could not change into base directory $BASEDIR"
|
||||
|
||||
autoreconf -fi || die "Error during autoreconf"
|
||||
rm -rf autom4te.cache
|
||||
|
||||
doc/autogen.sh || die "Error during doc/autogen.sh"
|
||||
@@ -0,0 +1,185 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
|
||||
#
|
||||
# Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
|
||||
#
|
||||
|
||||
# copied from glib
|
||||
m4_define([libnl_major_version], [3])
|
||||
m4_define([libnl_minor_version], [11])
|
||||
m4_define([libnl_micro_version], [0])
|
||||
m4_define([libnl_git_sha], [m4_esyscmd([ ( [ -d ./.git/ ] && [ "$(readlink -f ./.git/)" = "$(readlink -f "$(git rev-parse --git-dir 2>/dev/null)" 2>/dev/null)" ] && git rev-parse --verify -q HEAD 2>/dev/null ) || true ])])
|
||||
|
||||
|
||||
# The following explanation may help to understand the above rules a bit
|
||||
# better: consider that there are three possible kinds of reactions from
|
||||
# users of your library to changes in a shared library:
|
||||
#
|
||||
# 1. Programs using the previous version may use the new version as drop-in
|
||||
# replacement, and programs using the new version can also work with the
|
||||
# previous one. In other words, no recompiling nor relinking is needed.
|
||||
# In this case, bump revision only, don't touch current nor age.
|
||||
#
|
||||
# 2. Programs using the previous version may use the new version as drop-in
|
||||
# replacement, but programs using the new version may use APIs not
|
||||
# present in the previous one. In other words, a program linking against
|
||||
# the new version may fail with “unresolved symbols” if linking against
|
||||
# the old version at runtime: set revision to 0, bump current and age.
|
||||
#
|
||||
# 3. Programs may need to be changed, recompiled, relinked in order to use
|
||||
# the new version. Bump current, set revision and age to 0.
|
||||
|
||||
m4_define([libnl_lt_current], [226])
|
||||
m4_define([libnl_lt_revision], [0])
|
||||
m4_define([libnl_lt_age], [26])
|
||||
|
||||
m4_define([libnl_version],
|
||||
[libnl_major_version.libnl_minor_version.libnl_micro_version])
|
||||
|
||||
AC_INIT([libnl],[libnl_version],[],[],[http://www.infradead.org/~tgr/libnl/])
|
||||
AC_CONFIG_HEADERS([include/config.h])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)], [])
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
|
||||
MAJ_VERSION=libnl_major_version
|
||||
AC_SUBST(MAJ_VERSION)
|
||||
MIN_VERSION=libnl_minor_version
|
||||
AC_SUBST(MIN_VERSION)
|
||||
MIC_VERSION=libnl_micro_version
|
||||
AC_SUBST(MIC_VERSION)
|
||||
LIBNL_GIT_SHA=libnl_git_sha
|
||||
LIBNL_VERSION=libnl_version
|
||||
AC_SUBST(LIBNL_VERSION)
|
||||
|
||||
LT_CURRENT=libnl_lt_current
|
||||
AC_SUBST(LT_CURRENT)
|
||||
LT_REVISION=libnl_lt_revision
|
||||
AC_SUBST(LT_REVISION)
|
||||
LT_AGE=libnl_lt_age
|
||||
AC_SUBST(LT_AGE)
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
LT_INIT
|
||||
AC_PROG_MKDIR_P
|
||||
AC_CHECK_PROGS(FLEX, 'flex')
|
||||
AC_CHECK_PROGS(YACC, 'bison -y')
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
|
||||
[[#ifndef __cplusplus
|
||||
#error "broken C++"
|
||||
#endif]])],,
|
||||
[CXX=;])
|
||||
AC_LANG_POP([C++])
|
||||
AM_CONDITIONAL([HAS_CXX], [test "x$CXX" != x])
|
||||
|
||||
PKG_CHECK_MODULES([CHECK], [check >= 0.9.0],
|
||||
[has_check="yes"],
|
||||
[AC_MSG_WARN([*** Disabling building of unit tests])
|
||||
has_check="no"])
|
||||
AM_CONDITIONAL(WITH_CHECK, [test "$has_check" = 'yes'])
|
||||
|
||||
AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
|
||||
[Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
|
||||
[pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
|
||||
AC_SUBST([pkgconfigdir])
|
||||
|
||||
AC_ARG_ENABLE([cli],
|
||||
AS_HELP_STRING([--enable-cli=yes|no|no-inst|bin|sbin], [Whether to build command line interface utils. Defaults to 'yes' which is a synonym for 'bin'. 'no-inst' means only build, not installing. 'bin'/'sbin' means installing to bin/sbin directory]),
|
||||
[enable_cli="$enableval"], [enable_cli="yes"])
|
||||
if test "$enable_cli" != "no" &&
|
||||
test "$enable_cli" != "no-inst" &&
|
||||
test "$enable_cli" != "sbin"; then
|
||||
enable_cli="bin"
|
||||
fi
|
||||
AM_CONDITIONAL([ENABLE_CLI], [test "$enable_cli" != "no"])
|
||||
AM_CONDITIONAL([ENABLE_CLI_INSTALL_BIN], [test "$enable_cli" = "bin"])
|
||||
AM_CONDITIONAL([ENABLE_CLI_INSTALL_SBIN], [test "$enable_cli" = "sbin"])
|
||||
|
||||
AC_CHECK_HEADERS(dlfcn.h, [], [])
|
||||
|
||||
AC_ARG_ENABLE([pthreads],
|
||||
AS_HELP_STRING([--disable-pthreads], [Disable pthreads support]),
|
||||
[enable_pthreads="$enableval"], [enable_pthreads="yes"])
|
||||
AM_CONDITIONAL([DISABLE_PTHREADS], [test "$enable_pthreads" = "no"])
|
||||
if test "x$enable_pthreads" = "xno"; then
|
||||
AC_DEFINE([DISABLE_PTHREADS], [1], [Define to 1 to disable pthreads])
|
||||
else
|
||||
AC_CHECK_LIB([pthread], [pthread_mutex_lock], [], AC_MSG_ERROR([libpthread is required]))
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" != "no"])
|
||||
|
||||
AC_ARG_ENABLE([debug],
|
||||
AS_HELP_STRING([--disable-debug], [Do not include debugging statements]),
|
||||
[enable_debug="$enableval"], [enable_debug="yes"])
|
||||
if test "$enable_debug" = "yes"; then
|
||||
AC_DEFINE([NL_DEBUG], [1], [Define to 1 to enable debugging])
|
||||
else
|
||||
enable_debug=no
|
||||
AC_DEFINE([NL_DEBUG], [0], [Define to 1 to enable debugging])
|
||||
fi
|
||||
|
||||
AC_CONFIG_SUBDIRS([doc])
|
||||
|
||||
AC_CHECK_FUNCS([strerror_l])
|
||||
|
||||
AC_CHECK_DECLS([getprotobyname_r, getprotobynumber_r], [], [], [[
|
||||
#include <netdb.h>
|
||||
]])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
libnl-3.0.pc
|
||||
libnl-route-3.0.pc
|
||||
libnl-genl-3.0.pc
|
||||
libnl-nf-3.0.pc
|
||||
libnl-cli-3.0.pc
|
||||
libnl-xfrm-3.0.pc
|
||||
libnl-idiag-3.0.pc
|
||||
python/setup.py
|
||||
include/netlink/version.h
|
||||
])
|
||||
|
||||
ac_errcount=0
|
||||
if test -z "$YACC"; then
|
||||
AC_MSG_WARN(bison not found. Please install before continuing.)
|
||||
ac_errcount=$((ac_errcount + 1))
|
||||
fi
|
||||
if test -z "$FLEX"; then
|
||||
AC_MSG_WARN(flex not found. Please install before continuing.)
|
||||
ac_errcount=$((ac_errcount + 1))
|
||||
fi
|
||||
if test $ac_errcount -gt 0; then
|
||||
AC_MSG_ERROR(Required packages are missing. Please install them and rerun ./configure)
|
||||
fi
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
CXX_MSG="none"
|
||||
if test "x$CXX" != x ; then
|
||||
CXX_MSG="[$CXX]"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "libnl $LIBNL_VERSION configuration${LIBNL_GIT_SHA:+ (git:$LIBNL_GIT_SHA)}:"
|
||||
echo " --enable-pthreads=$enable_pthreads"
|
||||
echo " --enable-static=$enable_static"
|
||||
echo
|
||||
echo " --enable-debug=$enable_debug"
|
||||
echo " --enable-cli=$enable_cli"
|
||||
echo
|
||||
echo " check: $has_check"
|
||||
echo " CXX: $CXX_MSG (only used for tests)"
|
||||
echo
|
||||
@@ -0,0 +1 @@
|
||||
Thomas Graf <tgraf@suug.ch>
|
||||
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,187 @@
|
||||
<doxygenlayout version="1.0">
|
||||
<!-- Navigation index tabs for HTML output -->
|
||||
<navindex>
|
||||
<tab type="mainpage" visible="yes" title=""/>
|
||||
<tab type="pages" visible="yes" title="" intro=""/>
|
||||
<tab type="modules" visible="yes" title="" intro=""/>
|
||||
<tab type="namespaces" visible="yes" title="">
|
||||
<tab type="namespacelist" visible="yes" title="" intro=""/>
|
||||
<tab type="namespacemembers" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="classes" visible="yes" title="">
|
||||
<tab type="classlist" visible="yes" title="" intro=""/>
|
||||
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
|
||||
<tab type="hierarchy" visible="yes" title="" intro=""/>
|
||||
<tab type="classmembers" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="files" visible="yes" title="">
|
||||
<tab type="filelist" visible="yes" title="" intro=""/>
|
||||
<tab type="globals" visible="yes" title="" intro=""/>
|
||||
</tab>
|
||||
<tab type="examples" visible="yes" title="" intro=""/>
|
||||
</navindex>
|
||||
|
||||
<!-- Layout definition for a class page -->
|
||||
<class>
|
||||
<briefdescription visible="yes"/>
|
||||
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||
<inheritancegraph visible="$CLASS_GRAPH"/>
|
||||
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
|
||||
<allmemberslink visible="yes"/>
|
||||
<memberdecl>
|
||||
<nestedclasses visible="yes" title=""/>
|
||||
<publictypes title=""/>
|
||||
<publicslots title=""/>
|
||||
<signals title=""/>
|
||||
<publicmethods title=""/>
|
||||
<publicstaticmethods title=""/>
|
||||
<publicattributes title=""/>
|
||||
<publicstaticattributes title=""/>
|
||||
<protectedtypes title=""/>
|
||||
<protectedslots title=""/>
|
||||
<protectedmethods title=""/>
|
||||
<protectedstaticmethods title=""/>
|
||||
<protectedattributes title=""/>
|
||||
<protectedstaticattributes title=""/>
|
||||
<packagetypes title=""/>
|
||||
<packagemethods title=""/>
|
||||
<packagestaticmethods title=""/>
|
||||
<packageattributes title=""/>
|
||||
<packagestaticattributes title=""/>
|
||||
<properties title=""/>
|
||||
<events title=""/>
|
||||
<privatetypes title=""/>
|
||||
<privateslots title=""/>
|
||||
<privatemethods title=""/>
|
||||
<privatestaticmethods title=""/>
|
||||
<privateattributes title=""/>
|
||||
<privatestaticattributes title=""/>
|
||||
<friends title=""/>
|
||||
<related title="" subtitle=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<constructors title=""/>
|
||||
<functions title=""/>
|
||||
<related title=""/>
|
||||
<variables title=""/>
|
||||
<properties title=""/>
|
||||
<events title=""/>
|
||||
</memberdef>
|
||||
<usedfiles visible="$SHOW_USED_FILES"/>
|
||||
<authorsection visible="yes"/>
|
||||
</class>
|
||||
|
||||
<!-- Layout definition for a namespace page -->
|
||||
<namespace>
|
||||
<briefdescription visible="yes"/>
|
||||
<memberdecl>
|
||||
<nestednamespaces visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
</memberdef>
|
||||
<authorsection visible="yes"/>
|
||||
</namespace>
|
||||
|
||||
<!-- Layout definition for a file page -->
|
||||
<file>
|
||||
<briefdescription visible="yes"/>
|
||||
<includes visible="$SHOW_INCLUDE_FILES"/>
|
||||
<includegraph visible="$INCLUDE_GRAPH"/>
|
||||
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
|
||||
<sourcelink visible="yes"/>
|
||||
<memberdecl>
|
||||
<classes visible="yes" title=""/>
|
||||
<namespaces visible="yes" title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<inlineclasses title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
</memberdef>
|
||||
<authorsection/>
|
||||
</file>
|
||||
|
||||
<!-- Layout definition for a group page -->
|
||||
<group>
|
||||
<briefdescription visible="yes"/>
|
||||
<groupgraph visible="$GROUP_GRAPHS"/>
|
||||
<memberdecl>
|
||||
<nestedgroups visible="yes" title=""/>
|
||||
<dirs visible="yes" title=""/>
|
||||
<files visible="yes" title=""/>
|
||||
<namespaces visible="yes" title=""/>
|
||||
<classes visible="yes" title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<enumvalues title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<signals title=""/>
|
||||
<publicslots title=""/>
|
||||
<protectedslots title=""/>
|
||||
<privateslots title=""/>
|
||||
<events title=""/>
|
||||
<properties title=""/>
|
||||
<friends title=""/>
|
||||
<membergroups visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
<memberdef>
|
||||
<pagedocs/>
|
||||
<inlineclasses title=""/>
|
||||
<defines title=""/>
|
||||
<typedefs title=""/>
|
||||
<enums title=""/>
|
||||
<enumvalues title=""/>
|
||||
<functions title=""/>
|
||||
<variables title=""/>
|
||||
<signals title=""/>
|
||||
<publicslots title=""/>
|
||||
<protectedslots title=""/>
|
||||
<privateslots title=""/>
|
||||
<events title=""/>
|
||||
<properties title=""/>
|
||||
<friends title=""/>
|
||||
</memberdef>
|
||||
<authorsection visible="yes"/>
|
||||
</group>
|
||||
|
||||
<!-- Layout definition for a directory page -->
|
||||
<directory>
|
||||
<briefdescription visible="yes"/>
|
||||
<directorygraph visible="yes"/>
|
||||
<memberdecl>
|
||||
<dirs visible="yes"/>
|
||||
<files visible="yes"/>
|
||||
</memberdecl>
|
||||
<detaileddescription title=""/>
|
||||
</directory>
|
||||
</doxygenlayout>
|
||||
@@ -0,0 +1,80 @@
|
||||
# -*- Makefile -*-
|
||||
|
||||
.PHONY: gendoc api_ref asciidoc
|
||||
|
||||
ASCIIDOCOPTS = \
|
||||
-a pygments \
|
||||
-a language=c \
|
||||
-a icons \
|
||||
-a toc2 \
|
||||
-a numbered \
|
||||
-a imagesdir="./images/" \
|
||||
-a iconsdir="./images/icons" \
|
||||
-a stylesdir="$(abs_srcdir)/stylesheets/"
|
||||
|
||||
EXTRA_DIST = \
|
||||
core.txt \
|
||||
core.html \
|
||||
route.txt \
|
||||
route.html \
|
||||
index.txt \
|
||||
index.html \
|
||||
libnl.css \
|
||||
stylesheets \
|
||||
images \
|
||||
api
|
||||
|
||||
dist-hook:
|
||||
rm -f $(distdir)/aclocal.m4
|
||||
rm -f $(distdir)/configure
|
||||
rm -f $(distdir)/configure.in
|
||||
rm -rf $(distdir)/m4
|
||||
rm -f $(distdir)/README
|
||||
rm -f $(distdir)/missing
|
||||
rm -f $(distdir)/Doxyfile.in
|
||||
rm -f $(distdir)/Makefile.am
|
||||
rm -f $(distdir)/Makefile.in
|
||||
|
||||
link_doc:
|
||||
if LINK_DOC
|
||||
./gen-tags.sh > libnl.dict
|
||||
else
|
||||
@echo "Warning: Linking to API reference is disabled, check configure output"
|
||||
endif
|
||||
|
||||
|
||||
%.html: %.txt link_doc
|
||||
if HAVE_ASCIIDOC
|
||||
./resolve-asciidoc-refs.py $< > asciidoc.tmp
|
||||
asciidoc $(ASCIIDOCOPTS) -o $@ asciidoc.tmp
|
||||
if LINK_DOC
|
||||
./doxygen-link.py libnl.dict $@ > asciidoc.tmp
|
||||
mv asciidoc.tmp $@
|
||||
endif
|
||||
else
|
||||
@echo "Warning: Building of asciidoc files is disabled, check autoconf logs"
|
||||
endif
|
||||
|
||||
asciidoc: core.html route.html index.html
|
||||
|
||||
api_ref:
|
||||
doxygen Doxyfile;
|
||||
|
||||
gendoc:
|
||||
if GENERATE_DOC
|
||||
if HAVE_DOXYGEN
|
||||
$(MAKE) api_ref
|
||||
else
|
||||
@echo "Warning: Building of API reference (doxygen) is disabled, check autoconf logs"
|
||||
endif
|
||||
if HAVE_ASCIIDOC
|
||||
$(MAKE) asciidoc
|
||||
else
|
||||
@echo "Warning: Building of asciidoc files is disabled, check autoconf logs"
|
||||
endif
|
||||
else
|
||||
@echo "Warning: Building of documentation disabled by user or autoconf"
|
||||
endif
|
||||
|
||||
clean-local:
|
||||
rm -f api/* libnl.dict *.html
|
||||
@@ -0,0 +1,13 @@
|
||||
Requirements to build documentation
|
||||
|
||||
mscgen
|
||||
http://www.mcternan.me.uk/mscgen/
|
||||
|
||||
mscgen-filter-1.2
|
||||
https://github.com/hwmaier/asciidoc-mscgen-filter
|
||||
|
||||
asciidoc > 8.6.x
|
||||
doxygen > 1.8.0
|
||||
|
||||
Building the documentation:
|
||||
make gendoc
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
BASEDIR="$(dirname "$0")"
|
||||
|
||||
cd "$BASEDIR" || die "Could not change into base directory $BASEDIR"
|
||||
|
||||
autoreconf -fi
|
||||
rm -rf autom4te.cache
|
||||
@@ -0,0 +1,102 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-only
|
||||
#
|
||||
# Copyright (c) 2003-2013 Thomas Graf <tgraf@suug.ch>
|
||||
#
|
||||
|
||||
AC_INIT(libnl-doc, [3.11.0], [http://www.infradead.org/~tgr/libnl/])
|
||||
AC_CONFIG_MACRO_DIR([../m4])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)], [])
|
||||
|
||||
#
|
||||
# Generating the documentation
|
||||
#
|
||||
AC_ARG_ENABLE([doc],
|
||||
AS_HELP_STRING([--disable-doc], [Do not generate documentation]),
|
||||
[generate_doc="$enableval"], [generate_doc=auto])
|
||||
|
||||
if test "x$generate_doc" != "xno"; then
|
||||
AC_PROG_SED
|
||||
AC_PROG_EGREP
|
||||
|
||||
AC_CHECK_PROG(HAVE_PYTHON, [python], yes, no)
|
||||
if test "x$HAVE_PYTHON" = "xno" -a "x$generate_doc" = "xyes"; then
|
||||
AC_MSG_ERROR([*** python binary required to generate documentation])
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], yes, no)
|
||||
if test "x$HAVE_DOXYGEN" = "xno" -a "x$generate_doc" = "xyes"; then
|
||||
AC_MSG_ERROR([*** doxygen package required to generate documentation])
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(HAVE_DOT, [dot], yes, no)
|
||||
if test "x$HAVE_DOT" = "xno"; then
|
||||
if test "x$generate_doc" = "xyes"; then
|
||||
AC_MSG_ERROR([*** graphviz package required to generate documentation])
|
||||
else
|
||||
AC_MSG_WARN([*** graphviz not found, disabling building of API reference])
|
||||
HAVE_DOXYGEN=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(HAVE_ASCIIDOC, [asciidoc], yes, no)
|
||||
if test "x$HAVE_ASCIIDOC" = "xno"; then
|
||||
if test "x$generate_doc" = "xyes"; then
|
||||
AC_MSG_ERROR([*** asciidoc package required to generate documentation])
|
||||
else
|
||||
AC_MSG_WARN([*** asciidoc not found, disabling building of guides])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(HAVE_SOURCE_HIGHLIGHT, [source-highlight], yes, no)
|
||||
if test "x$HAVE_SOURCE_HIGHLIGHT" = "xno"; then
|
||||
if test "x$generate_doc" = "xyes"; then
|
||||
AC_MSG_ERROR([*** source-highlight required to generate documentation])
|
||||
else
|
||||
AC_MSG_WARN([*** source-highlight not found, disabling building of guides])
|
||||
HAVE_ASCIIDOC=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(HAVE_MSCGEN, [mscgen], yes, no)
|
||||
if test "x$HAVE_MSCGEN" = "xno"; then
|
||||
AC_MSG_WARN([*** mscgen not found, get it at http://www.mcternan.me.uk/mscgen/])
|
||||
if test "x$generate_doc" = "xyes"; then
|
||||
AC_MSG_ERROR([*** mscgen package required to generate documentation])
|
||||
else
|
||||
AC_MSG_WARN([*** Disabling building of guides])
|
||||
HAVE_ASCIIDOC=no
|
||||
HAVE_DOXYGEN=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(HAVE_PYGMENTIZE, [pygmentize], yes, no)
|
||||
if test "x$HAVE_PYGMENTIZE" = "xno"; then
|
||||
if test "x$generate_doc" = "xyes"; then
|
||||
AC_MSG_ERROR([*** pygmentize package required to generate documentation])
|
||||
else
|
||||
AC_MSG_WARN([*** Disabling building of guides])
|
||||
HAVE_ASCIIDOC=no
|
||||
fi
|
||||
fi
|
||||
|
||||
link_doc=yes
|
||||
if test "x$HAVE_DOXYGEN" = "xno"; then
|
||||
AC_MSG_WARN([*** Disabling API linking due to missing doxygen package])
|
||||
link_doc=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([LINK_DOC], [test "x$link_doc" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$HAVE_DOXYGEN" = "xyes"])
|
||||
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "x$HAVE_ASCIIDOC" = "xyes"])
|
||||
|
||||
AM_CONDITIONAL([GENERATE_DOC], [test "x$generate_doc" != "xno"])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Doxyfile
|
||||
Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
rc_script = re.compile(r"\s*(.*\S)?\s*")
|
||||
|
||||
|
||||
def parse_dict(filename):
|
||||
links = {}
|
||||
for line in open(filename, "r"):
|
||||
m = re.match("^([^=]+)=([^\n]+)$", line)
|
||||
if not m:
|
||||
continue
|
||||
name = m.group(1)
|
||||
value = m.group(2)
|
||||
|
||||
# strip leading and trailing whitespace
|
||||
m = rc_script.match(name)
|
||||
if m:
|
||||
name = m.group(1)
|
||||
|
||||
# skip special names
|
||||
if name == "":
|
||||
continue
|
||||
if name == "\\":
|
||||
continue
|
||||
|
||||
links[name] = '<a href="' + value + '" class="dg">' + name + "</a>"
|
||||
return links
|
||||
|
||||
|
||||
links = parse_dict(sys.argv[1])
|
||||
|
||||
|
||||
def translate(match):
|
||||
return links[match.group(1)]
|
||||
|
||||
|
||||
# match for all names, with word boundaries \b
|
||||
rc = re.compile(r"\b(" + "|".join(map(re.escape, sorted(links, reverse=True))) + r")\b")
|
||||
|
||||
for line in open(sys.argv[2], "r"):
|
||||
if links:
|
||||
line = rc.sub(translate, line)
|
||||
print(line, end="")
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Based on a script found on the englinemtn-devel mailinglist
|
||||
# written by Carsten Haitzler <ras...@rasterman.com>
|
||||
#
|
||||
|
||||
for f in api/group__*.html
|
||||
do
|
||||
bf=$(basename $f)
|
||||
|
||||
grep -oE "href=\"$bf#[a-z0-9]+\">[^<]+</a>" $f |
|
||||
sed 's/href="\([^"]*\)">\([^<]*\)<\/a>/\2=api\/\1/'
|
||||
done
|
||||
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,5 @@
|
||||
Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook
|
||||
icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency
|
||||
from the Jimmac icons to get round MS IE and FOP PNG incompatibilies.
|
||||
|
||||
Stuart Rackham
|
||||
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 361 B |
|
After Width: | Height: | Size: 565 B |
|
After Width: | Height: | Size: 617 B |
|
After Width: | Height: | Size: 623 B |
|
After Width: | Height: | Size: 411 B |
|
After Width: | Height: | Size: 640 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 350 B |
|
After Width: | Height: | Size: 345 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 355 B |
|
After Width: | Height: | Size: 344 B |
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 47 KiB |
@@ -0,0 +1,22 @@
|
||||
Documentation Overview - libnl Suite
|
||||
====================================
|
||||
|
||||
== Libraries
|
||||
|
||||
image:library_overview.png["Library Hierarchy"]
|
||||
|
||||
link:core.html[Netlink Library] (libnl)::
|
||||
Socket handling, sending and receiving, message construction and parsing, ...
|
||||
|
||||
link:route.html[Routing Family Library] (libnl-route)::
|
||||
Adresses, links, neighbours, routing, traffic control, neighbour tables, ...
|
||||
|
||||
Netfilter Library (libnl-nf)::
|
||||
Connection tracking, logging, queueing
|
||||
|
||||
Generic Netlink Library (libnl-genl)::
|
||||
Controller API, family and command registration
|
||||
|
||||
== Python Packages
|
||||
- netlink.core
|
||||
- netlink.route.link
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
||||
refs = {}
|
||||
complete_file = ""
|
||||
|
||||
for line in open(sys.argv[1], "r"):
|
||||
complete_file += line
|
||||
|
||||
for m in re.findall("\\[\\[(.+)\\]\\]\n=+ ([^\n]+)", complete_file):
|
||||
ref, title = m
|
||||
refs["<<" + ref + ">>"] = "<<" + ref + ", " + title + ">>"
|
||||
|
||||
|
||||
def translate(match):
|
||||
try:
|
||||
return refs[match.group(0)]
|
||||
except KeyError:
|
||||
return ""
|
||||
|
||||
|
||||
rc = re.compile("|".join(map(re.escape, sorted(refs, reverse=True))))
|
||||
for line in open(sys.argv[1], "r"):
|
||||
print(rc.sub(translate, line), end="")
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* \cond skip
|
||||
* vim:syntax=doxygen
|
||||
* \endcond
|
||||
|
||||
\page auto_ack_warning Disabling Auto-ACK
|
||||
|
||||
\attention Disabling Auto-ACK (nl_socket_disable_auto_ack()) will cause this
|
||||
function to return immediately after sending the netlink message.
|
||||
The function will not wait for an eventual error message. It is
|
||||
the responsibility of the caller to handle any error messages or
|
||||
ACKs returned.
|
||||
|
||||
\page pointer_lifetime_warning Pointer Lifetime
|
||||
|
||||
\attention The reference counter of the returned object is not incremented.
|
||||
Therefore, the returned pointer is only valid during the lifetime
|
||||
of the parent object. Increment the reference counter if the object
|
||||
is supposed to stay around after the parent object was freed.
|
||||
|
||||
\page private_struct Private Structure
|
||||
|
||||
\note The definition of this structure is private to allow modification
|
||||
without breaking API. Use the designated accessor functions to
|
||||
access individual object attributes.
|
||||
|
||||
\page read_only_attribute Read-Only Attribute
|
||||
|
||||
\note The attribute this accessor is modifying is a read-only attribute
|
||||
which can not be modified in the kernel. Any changes to the
|
||||
attribute only have an effect on the local copy of the object. The
|
||||
accessor function is provided solely for the purpose of creating
|
||||
objects for comparison and filtering.
|
||||
|
||||
\page low_level_api Low Level API
|
||||
|
||||
\note This is a low level API function. A high level function implementing
|
||||
the same functionality with a simplified usage pattern exists. This
|
||||
function is available as an alternative if the default library
|
||||
behaviour is not desirable.
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* \cond skip
|
||||
* vim:syntax=doxygen
|
||||
* \endcond
|
||||
|
||||
\mainpage
|
||||
|
||||
\section main_intro Introduction
|
||||
|
||||
libnl is a set of libraries to deal with the netlink protocol and some
|
||||
of the high level protocols implemented on top of it. The goal is to
|
||||
provide APIs on different levels of abstraction. The core library libnl
|
||||
provides a fundamental set of functions to deal with sockets, construct
|
||||
messages, and send/receive those messages. Additional high level interfaces
|
||||
for several individual netlink protocols are provided in separate
|
||||
libraries (e.g. "nl-route", "nl-genl", ...).
|
||||
|
||||
The library is designed to ensure that all components are optional, i.e.
|
||||
even though the core library provides a caching system which allows to
|
||||
easily manage objects of any kind, no application is required to use this
|
||||
caching system if it has no need for it.
|
||||
|
||||
The library was developed and tested on 2.6.x and 3.x kernel releases. It
|
||||
may or may not work with older kernel series. Also, although all netlink
|
||||
protocols are required to maintain backwards compatibility, this has not
|
||||
always achieved and undesired side effects can occur if a recent libnl
|
||||
version is used with a considerably older kernel.
|
||||
|
||||
\section main_toc Table of Contents
|
||||
|
||||
\section main_trees GIT Trees
|
||||
|
||||
\subsection tree_dev Development Tree
|
||||
|
||||
@code
|
||||
git://git.infradead.org/users/tgr/libnl.git
|
||||
@endcode
|
||||
- Web: http://git.infradead.org/users/tgr/libnl.git
|
||||
|
||||
\section main_website Website
|
||||
|
||||
- https://www.infradead.org/~tgr/libnl/
|
||||
|
||||
\section main_mailinglist Mailinglist
|
||||
|
||||
Please post questions and patches to the libnl mailinglist:
|
||||
|
||||
@code
|
||||
libnl@lists.infradead.org
|
||||
@endcode
|
||||
|
||||
- Archives: https://lists.infradead.org/pipermail/libnl/
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,18 @@
|
||||
/* Overrides for manpage documents */
|
||||
h1 {
|
||||
padding-top: 0.5em;
|
||||
padding-bottom: 0.5em;
|
||||
border-top: 2px solid silver;
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
h2 {
|
||||
border-style: none;
|
||||
}
|
||||
div.sectionbody {
|
||||
margin-left: 3em;
|
||||
}
|
||||
|
||||
@media print {
|
||||
div#toc { display: none; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,526 @@
|
||||
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
|
||||
|
||||
/* Default font. */
|
||||
body {
|
||||
font-family: Georgia,serif;
|
||||
}
|
||||
|
||||
/* Title font. */
|
||||
h1, h2, h3, h4, h5, h6,
|
||||
div.title, caption.title,
|
||||
thead, p.table.header,
|
||||
#toctitle,
|
||||
#author, #revnumber, #revdate, #revremark,
|
||||
#footer {
|
||||
/* OLD: font-family: Arial,Helvetica,sans-serif; */
|
||||
font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 1em 5% 1em 5%;
|
||||
}
|
||||
|
||||
a {
|
||||
/* color: blue; */
|
||||
color: #990000;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:visited {
|
||||
/* color: fuchsia; */
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
/* color: navy; */
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
/* color: #083194; */
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
/* color: #527bbd; */
|
||||
color: #990000;
|
||||
margin-top: 1.2em;
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
h2 {
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
h3 {
|
||||
float: left;
|
||||
}
|
||||
h3 + * {
|
||||
clear: left;
|
||||
}
|
||||
h5 {
|
||||
font-size: 1.0em;
|
||||
}
|
||||
|
||||
div.sectionbody {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
ul, ol, li > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
ul > li { color: #aaa; }
|
||||
ul > li > * { color: black; }
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#author {
|
||||
/* color: #527bbd; */
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
#email {
|
||||
}
|
||||
#revnumber, #revdate, #revremark {
|
||||
}
|
||||
|
||||
#footer {
|
||||
font-size: small;
|
||||
border-top: 2px solid silver;
|
||||
padding-top: 0.5em;
|
||||
margin-top: 4.0em;
|
||||
}
|
||||
#footer-text {
|
||||
float: left;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
#footer-badges {
|
||||
float: right;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#preamble {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.imageblock, div.exampleblock, div.verseblock,
|
||||
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||
div.admonitionblock {
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.admonitionblock {
|
||||
margin-top: 2.0em;
|
||||
margin-bottom: 2.0em;
|
||||
margin-right: 10%;
|
||||
/* color: #606060; */
|
||||
}
|
||||
|
||||
div.content { /* Block element content. */
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Block element titles. */
|
||||
div.title, caption.title {
|
||||
/* OLD: color: #527bbd; */
|
||||
color: #990000;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
div.title + * {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
td div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content + div.title {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
|
||||
div.sidebarblock > div.content {
|
||||
background: #ffffee;
|
||||
border: 1px solid #dddddd;
|
||||
border-left: 4px solid #f0f0f0;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.listingblock > div.content {
|
||||
border: 1px solid #dddddd;
|
||||
/* border-left: 5px solid #f0f0f0; */
|
||||
background: #f8f8f8;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.quoteblock, div.verseblock {
|
||||
padding-left: 1.0em;
|
||||
margin-left: 1.0em;
|
||||
margin-right: 10%;
|
||||
border-left: 5px solid #f0f0f0;
|
||||
color: #777777;
|
||||
}
|
||||
|
||||
div.quoteblock > div.attribution {
|
||||
padding-top: 0.5em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.verseblock > pre.content {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
div.verseblock > div.attribution {
|
||||
padding-top: 0.75em;
|
||||
text-align: left;
|
||||
}
|
||||
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
||||
div.verseblock + div.attribution {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.admonitionblock .icon {
|
||||
vertical-align: top;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
/* OLD: color: #527bbd; */
|
||||
color: #990000;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
div.admonitionblock td.content {
|
||||
padding-left: 0.5em;
|
||||
border-left: 3px solid #dddddd;
|
||||
}
|
||||
|
||||
div.exampleblock > div.content {
|
||||
border-left: 3px solid #dddddd;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
div.imageblock div.content { padding-left: 0; }
|
||||
span.image img { border-style: none; }
|
||||
a.image:visited { color: white; }
|
||||
|
||||
dl {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
dt {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0;
|
||||
font-style: normal;
|
||||
color: navy;
|
||||
}
|
||||
dd > *:first-child {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style-position: outside;
|
||||
}
|
||||
ol.arabic {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
ol.loweralpha {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
ol.upperalpha {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
ol.lowerroman {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
ol.upperroman {
|
||||
list-style-type: upper-roman;
|
||||
}
|
||||
|
||||
div.compact ul, div.compact ol,
|
||||
div.compact p, div.compact p,
|
||||
div.compact div, div.compact div {
|
||||
margin-top: 0.1em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
font-weight: bold;
|
||||
}
|
||||
td > div.verse {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.hdlist {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
div.hdlist tr {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
dt.hdlist1.strong, td.hdlist1.strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
td.hdlist1 {
|
||||
vertical-align: top;
|
||||
font-style: normal;
|
||||
padding-right: 0.8em;
|
||||
/* color: navy; */
|
||||
color: #990000;
|
||||
}
|
||||
td.hdlist2 {
|
||||
vertical-align: top;
|
||||
}
|
||||
div.hdlist.compact tr {
|
||||
margin: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.comment {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
.footnote, .footnoteref {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
span.footnote, span.footnoteref {
|
||||
vertical-align: super;
|
||||
}
|
||||
|
||||
#footnotes {
|
||||
margin: 20px 0 20px 0;
|
||||
padding: 7px 0 0 0;
|
||||
}
|
||||
|
||||
#footnotes div.footnote {
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
#footnotes hr {
|
||||
border: none;
|
||||
border-top: 1px solid silver;
|
||||
height: 1px;
|
||||
text-align: left;
|
||||
margin-left: 0;
|
||||
width: 20%;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
div.colist td {
|
||||
padding-right: 0.5em;
|
||||
padding-bottom: 0.3em;
|
||||
vertical-align: top;
|
||||
}
|
||||
div.colist td img {
|
||||
margin-top: 0.3em;
|
||||
}
|
||||
|
||||
@media print {
|
||||
#footer-badges { display: none; }
|
||||
}
|
||||
|
||||
#toc {
|
||||
margin-bottom: 2.5em;
|
||||
}
|
||||
|
||||
#toctitle {
|
||||
/* color: #527bbd; */
|
||||
color: #990000;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.toclevel2 {
|
||||
margin-left: 2em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
div.toclevel3 {
|
||||
margin-left: 4em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
div.toclevel4 {
|
||||
margin-left: 6em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
span.aqua { color: aqua; }
|
||||
span.black { color: black; }
|
||||
span.blue { color: blue; }
|
||||
span.fuchsia { color: fuchsia; }
|
||||
span.gray { color: gray; }
|
||||
span.green { color: green; }
|
||||
span.lime { color: lime; }
|
||||
span.maroon { color: maroon; }
|
||||
span.navy { color: navy; }
|
||||
span.olive { color: olive; }
|
||||
span.purple { color: purple; }
|
||||
span.red { color: red; }
|
||||
span.silver { color: silver; }
|
||||
span.teal { color: teal; }
|
||||
span.white { color: white; }
|
||||
span.yellow { color: yellow; }
|
||||
|
||||
span.aqua-background { background: aqua; }
|
||||
span.black-background { background: black; }
|
||||
span.blue-background { background: blue; }
|
||||
span.fuchsia-background { background: fuchsia; }
|
||||
span.gray-background { background: gray; }
|
||||
span.green-background { background: green; }
|
||||
span.lime-background { background: lime; }
|
||||
span.maroon-background { background: maroon; }
|
||||
span.navy-background { background: navy; }
|
||||
span.olive-background { background: olive; }
|
||||
span.purple-background { background: purple; }
|
||||
span.red-background { background: red; }
|
||||
span.silver-background { background: silver; }
|
||||
span.teal-background { background: teal; }
|
||||
span.white-background { background: white; }
|
||||
span.yellow-background { background: yellow; }
|
||||
|
||||
span.big { font-size: 2em; }
|
||||
span.small { font-size: 0.6em; }
|
||||
|
||||
span.underline { text-decoration: underline; }
|
||||
span.overline { text-decoration: overline; }
|
||||
span.line-through { text-decoration: line-through; }
|
||||
|
||||
|
||||
/*
|
||||
* xhtml11 specific
|
||||
*
|
||||
* */
|
||||
|
||||
tt {
|
||||
font-family: monospace;
|
||||
font-size: inherit;
|
||||
/* color: navy; */
|
||||
color: black;
|
||||
}
|
||||
|
||||
div.tableblock {
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.tableblock > table {
|
||||
/* border: 3px solid #527bbd; */
|
||||
border: 2px solid #990000;
|
||||
}
|
||||
thead, p.table.header {
|
||||
font-weight: bold;
|
||||
/* color: #527bbd; */
|
||||
color: #990000;
|
||||
}
|
||||
p.table {
|
||||
margin-top: 0;
|
||||
}
|
||||
/* Because the table frame attribute is overriden by CSS in most browsers. */
|
||||
div.tableblock > table[frame="void"] {
|
||||
border-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="hsides"] {
|
||||
border-left-style: none;
|
||||
border-right-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="vsides"] {
|
||||
border-top-style: none;
|
||||
border-bottom-style: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* html5 specific
|
||||
*
|
||||
* */
|
||||
|
||||
.monospaced {
|
||||
font-family: monospace;
|
||||
font-size: inherit;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
table.tableblock {
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
thead, p.tableblock.header {
|
||||
font-weight: bold;
|
||||
/* color: #527bbd; */
|
||||
color: #990000;
|
||||
}
|
||||
p.tableblock {
|
||||
margin-top: 0;
|
||||
}
|
||||
table.tableblock {
|
||||
border-width: 3px;
|
||||
border-spacing: 0px;
|
||||
border-style: solid;
|
||||
/* border-color: #527bbd; */
|
||||
border-color: #990000;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th.tableblock, td.tableblock {
|
||||
border-width: 1px;
|
||||
padding: 4px;
|
||||
border-style: solid;
|
||||
/* border-color: #527bbd; */
|
||||
border-color: #990000;
|
||||
}
|
||||
|
||||
table.tableblock.frame-topbot {
|
||||
border-left-style: hidden;
|
||||
border-right-style: hidden;
|
||||
}
|
||||
table.tableblock.frame-sides {
|
||||
border-top-style: hidden;
|
||||
border-bottom-style: hidden;
|
||||
}
|
||||
table.tableblock.frame-none {
|
||||
border-style: hidden;
|
||||
}
|
||||
|
||||
th.tableblock.halign-left, td.tableblock.halign-left {
|
||||
text-align: left;
|
||||
}
|
||||
th.tableblock.halign-center, td.tableblock.halign-center {
|
||||
text-align: center;
|
||||
}
|
||||
th.tableblock.halign-right, td.tableblock.halign-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th.tableblock.valign-top, td.tableblock.valign-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
th.tableblock.valign-middle, td.tableblock.valign-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
@@ -0,0 +1,322 @@
|
||||
/*
|
||||
CSS stylesheet for XHTML produced by DocBook XSL stylesheets.
|
||||
Tested with XSL stylesheets 1.61.2, 1.67.2
|
||||
*/
|
||||
|
||||
span.strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
body blockquote {
|
||||
margin-top: .75em;
|
||||
line-height: 1.5;
|
||||
margin-bottom: .75em;
|
||||
}
|
||||
|
||||
html body {
|
||||
margin: 1em 5% 1em 5%;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
body div {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6
|
||||
{
|
||||
color: #527bbd;
|
||||
font-family: tahoma, verdana, sans-serif;
|
||||
}
|
||||
|
||||
div.toc p:first-child,
|
||||
div.list-of-figures p:first-child,
|
||||
div.list-of-tables p:first-child,
|
||||
div.list-of-examples p:first-child,
|
||||
div.example p.title,
|
||||
div.sidebar p.title
|
||||
{
|
||||
font-weight: bold;
|
||||
color: #527bbd;
|
||||
font-family: tahoma, verdana, sans-serif;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
body h1 {
|
||||
margin: .0em 0 0 -4%;
|
||||
line-height: 1.3;
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
|
||||
body h2 {
|
||||
margin: 0.5em 0 0 -4%;
|
||||
line-height: 1.3;
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
|
||||
body h3 {
|
||||
margin: .8em 0 0 -3%;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
body h4 {
|
||||
margin: .8em 0 0 -3%;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
body h5 {
|
||||
margin: .8em 0 0 -2%;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
body h6 {
|
||||
margin: .8em 0 0 -1%;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
body hr {
|
||||
border: none; /* Broken on IE6 */
|
||||
}
|
||||
div.footnotes hr {
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
div.navheader th, div.navheader td, div.navfooter td {
|
||||
font-family: sans-serif;
|
||||
font-size: 0.9em;
|
||||
font-weight: bold;
|
||||
color: #527bbd;
|
||||
}
|
||||
div.navheader img, div.navfooter img {
|
||||
border-style: none;
|
||||
}
|
||||
div.navheader a, div.navfooter a {
|
||||
font-weight: normal;
|
||||
}
|
||||
div.navfooter hr {
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
body td {
|
||||
line-height: 1.2
|
||||
}
|
||||
|
||||
body th {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
ol {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
ul, body dir, body menu {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body h1, body h2, body h3, body h4, body h5, body h6 {
|
||||
margin-left: 0
|
||||
}
|
||||
|
||||
body pre {
|
||||
margin: 0.5em 10% 0.5em 1em;
|
||||
line-height: 1.0;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
tt.literal, code.literal {
|
||||
color: navy;
|
||||
}
|
||||
|
||||
.programlisting, .screen {
|
||||
border: 1px solid silver;
|
||||
background: #f4f4f4;
|
||||
margin: 0.5em 10% 0.5em 0;
|
||||
padding: 0.5em 1em;
|
||||
}
|
||||
|
||||
div.sidebar {
|
||||
background: #ffffee;
|
||||
margin: 1.0em 10% 0.5em 0;
|
||||
padding: 0.5em 1em;
|
||||
border: 1px solid silver;
|
||||
}
|
||||
div.sidebar * { padding: 0; }
|
||||
div.sidebar div { margin: 0; }
|
||||
div.sidebar p.title {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
div.bibliomixed {
|
||||
margin: 0.5em 5% 0.5em 1em;
|
||||
}
|
||||
|
||||
div.glossary dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
div.glossary dd p {
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin: .8em 0;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
dt {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
dt span.term {
|
||||
font-style: normal;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
div.variablelist dd p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.itemizedlist li, div.orderedlist li {
|
||||
margin-left: -0.8em;
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style-position: outside;
|
||||
}
|
||||
|
||||
div.sidebar ul, div.sidebar ol {
|
||||
margin-left: 2.8em;
|
||||
}
|
||||
|
||||
div.itemizedlist p.title,
|
||||
div.orderedlist p.title,
|
||||
div.variablelist p.title
|
||||
{
|
||||
margin-bottom: -0.8em;
|
||||
}
|
||||
|
||||
div.revhistory table {
|
||||
border-collapse: collapse;
|
||||
border: none;
|
||||
}
|
||||
div.revhistory th {
|
||||
border: none;
|
||||
color: #527bbd;
|
||||
font-family: tahoma, verdana, sans-serif;
|
||||
}
|
||||
div.revhistory td {
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
/* Keep TOC and index lines close together. */
|
||||
div.toc dl, div.toc dt,
|
||||
div.list-of-figures dl, div.list-of-figures dt,
|
||||
div.list-of-tables dl, div.list-of-tables dt,
|
||||
div.indexdiv dl, div.indexdiv dt
|
||||
{
|
||||
line-height: normal;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Table styling does not work because of overriding attributes in
|
||||
generated HTML.
|
||||
*/
|
||||
div.table table,
|
||||
div.informaltable table
|
||||
{
|
||||
margin-left: 0;
|
||||
margin-right: 5%;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
div.informaltable table
|
||||
{
|
||||
margin-top: 0.4em
|
||||
}
|
||||
div.table thead,
|
||||
div.table tfoot,
|
||||
div.table tbody,
|
||||
div.informaltable thead,
|
||||
div.informaltable tfoot,
|
||||
div.informaltable tbody
|
||||
{
|
||||
/* No effect in IE6. */
|
||||
border-top: 3px solid #527bbd;
|
||||
border-bottom: 3px solid #527bbd;
|
||||
}
|
||||
div.table thead, div.table tfoot,
|
||||
div.informaltable thead, div.informaltable tfoot
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.mediaobject img {
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
div.figure p.title,
|
||||
div.table p.title
|
||||
{
|
||||
margin-top: 1em;
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
|
||||
div.calloutlist p
|
||||
{
|
||||
margin-top: 0em;
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
|
||||
a img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
@media print {
|
||||
div.navheader, div.navfooter { display: none; }
|
||||
}
|
||||
|
||||
span.aqua { color: aqua; }
|
||||
span.black { color: black; }
|
||||
span.blue { color: blue; }
|
||||
span.fuchsia { color: fuchsia; }
|
||||
span.gray { color: gray; }
|
||||
span.green { color: green; }
|
||||
span.lime { color: lime; }
|
||||
span.maroon { color: maroon; }
|
||||
span.navy { color: navy; }
|
||||
span.olive { color: olive; }
|
||||
span.purple { color: purple; }
|
||||
span.red { color: red; }
|
||||
span.silver { color: silver; }
|
||||
span.teal { color: teal; }
|
||||
span.white { color: white; }
|
||||
span.yellow { color: yellow; }
|
||||
|
||||
span.aqua-background { background: aqua; }
|
||||
span.black-background { background: black; }
|
||||
span.blue-background { background: blue; }
|
||||
span.fuchsia-background { background: fuchsia; }
|
||||
span.gray-background { background: gray; }
|
||||
span.green-background { background: green; }
|
||||
span.lime-background { background: lime; }
|
||||
span.maroon-background { background: maroon; }
|
||||
span.navy-background { background: navy; }
|
||||
span.olive-background { background: olive; }
|
||||
span.purple-background { background: purple; }
|
||||
span.red-background { background: red; }
|
||||
span.silver-background { background: silver; }
|
||||
span.teal-background { background: teal; }
|
||||
span.white-background { background: white; }
|
||||
span.yellow-background { background: yellow; }
|
||||
|
||||
span.big { font-size: 2em; }
|
||||
span.small { font-size: 0.6em; }
|
||||
|
||||
span.underline { text-decoration: underline; }
|
||||
span.overline { text-decoration: overline; }
|
||||
span.line-through { text-decoration: line-through; }
|
||||
@@ -0,0 +1 @@
|
||||
/* Empty placeholder file */
|
||||
@@ -0,0 +1,584 @@
|
||||
/*
|
||||
* AsciiDoc 'flask' theme for xhtml11 and html5 backends. A shameless knock-off
|
||||
* of the Flask website styling (http://flask.pocoo.org/docs/).
|
||||
*
|
||||
* The implementation is straight-forward, consisting of the asciidoc.css file
|
||||
* followed by theme specific overrides.
|
||||
*
|
||||
* */
|
||||
|
||||
|
||||
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
|
||||
|
||||
/* Default font. */
|
||||
body {
|
||||
font-family: Georgia,serif;
|
||||
}
|
||||
|
||||
/* Title font. */
|
||||
h1, h2, h3, h4, h5, h6,
|
||||
div.title, caption.title,
|
||||
thead, p.table.header,
|
||||
#toctitle,
|
||||
#author, #revnumber, #revdate, #revremark,
|
||||
#footer {
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 1em 5% 1em 5%;
|
||||
}
|
||||
|
||||
a {
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:visited {
|
||||
color: fuchsia;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: #083194;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #527bbd;
|
||||
margin-top: 1.2em;
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
h2 {
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
h3 {
|
||||
float: left;
|
||||
}
|
||||
h3 + * {
|
||||
clear: left;
|
||||
}
|
||||
h5 {
|
||||
font-size: 1.0em;
|
||||
}
|
||||
|
||||
div.sectionbody {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
ul, ol, li > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
ul > li { color: #aaa; }
|
||||
ul > li > * { color: black; }
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#author {
|
||||
color: #527bbd;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
#email {
|
||||
}
|
||||
#revnumber, #revdate, #revremark {
|
||||
}
|
||||
|
||||
#footer {
|
||||
font-size: small;
|
||||
border-top: 2px solid silver;
|
||||
padding-top: 0.5em;
|
||||
margin-top: 4.0em;
|
||||
}
|
||||
#footer-text {
|
||||
float: left;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
#footer-badges {
|
||||
float: right;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#preamble {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.imageblock, div.exampleblock, div.verseblock,
|
||||
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||
div.admonitionblock {
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.admonitionblock {
|
||||
margin-top: 2.0em;
|
||||
margin-bottom: 2.0em;
|
||||
margin-right: 10%;
|
||||
color: #606060;
|
||||
}
|
||||
|
||||
div.content { /* Block element content. */
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Block element titles. */
|
||||
div.title, caption.title {
|
||||
color: #527bbd;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
div.title + * {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
td div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content + div.title {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
|
||||
div.sidebarblock > div.content {
|
||||
background: #ffffee;
|
||||
border: 1px solid #dddddd;
|
||||
border-left: 4px solid #f0f0f0;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.listingblock > div.content {
|
||||
border: 1px solid #dddddd;
|
||||
border-left: 5px solid #f0f0f0;
|
||||
background: #f8f8f8;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.quoteblock, div.verseblock {
|
||||
padding-left: 1.0em;
|
||||
margin-left: 1.0em;
|
||||
margin-right: 10%;
|
||||
border-left: 5px solid #f0f0f0;
|
||||
color: #777777;
|
||||
}
|
||||
|
||||
div.quoteblock > div.attribution {
|
||||
padding-top: 0.5em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.verseblock > pre.content {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
div.verseblock > div.attribution {
|
||||
padding-top: 0.75em;
|
||||
text-align: left;
|
||||
}
|
||||
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
||||
div.verseblock + div.attribution {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.admonitionblock .icon {
|
||||
vertical-align: top;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
color: #527bbd;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
div.admonitionblock td.content {
|
||||
padding-left: 0.5em;
|
||||
border-left: 3px solid #dddddd;
|
||||
}
|
||||
|
||||
div.exampleblock > div.content {
|
||||
border-left: 3px solid #dddddd;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
div.imageblock div.content { padding-left: 0; }
|
||||
span.image img { border-style: none; }
|
||||
a.image:visited { color: white; }
|
||||
|
||||
dl {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
dt {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0;
|
||||
font-style: normal;
|
||||
color: navy;
|
||||
}
|
||||
dd > *:first-child {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style-position: outside;
|
||||
}
|
||||
ol.arabic {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
ol.loweralpha {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
ol.upperalpha {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
ol.lowerroman {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
ol.upperroman {
|
||||
list-style-type: upper-roman;
|
||||
}
|
||||
|
||||
div.compact ul, div.compact ol,
|
||||
div.compact p, div.compact p,
|
||||
div.compact div, div.compact div {
|
||||
margin-top: 0.1em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
tfoot {
|
||||
font-weight: bold;
|
||||
}
|
||||
td > div.verse {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.hdlist {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
div.hdlist tr {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
dt.hdlist1.strong, td.hdlist1.strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
td.hdlist1 {
|
||||
vertical-align: top;
|
||||
font-style: normal;
|
||||
padding-right: 0.8em;
|
||||
color: navy;
|
||||
}
|
||||
td.hdlist2 {
|
||||
vertical-align: top;
|
||||
}
|
||||
div.hdlist.compact tr {
|
||||
margin: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.comment {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
.footnote, .footnoteref {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
span.footnote, span.footnoteref {
|
||||
vertical-align: super;
|
||||
}
|
||||
|
||||
#footnotes {
|
||||
margin: 20px 0 20px 0;
|
||||
padding: 7px 0 0 0;
|
||||
}
|
||||
|
||||
#footnotes div.footnote {
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
|
||||
#footnotes hr {
|
||||
border: none;
|
||||
border-top: 1px solid silver;
|
||||
height: 1px;
|
||||
text-align: left;
|
||||
margin-left: 0;
|
||||
width: 20%;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
div.colist td {
|
||||
padding-right: 0.5em;
|
||||
padding-bottom: 0.3em;
|
||||
vertical-align: top;
|
||||
}
|
||||
div.colist td img {
|
||||
margin-top: 0.3em;
|
||||
}
|
||||
|
||||
@media print {
|
||||
#footer-badges { display: none; }
|
||||
}
|
||||
|
||||
#toc {
|
||||
margin-bottom: 2.5em;
|
||||
}
|
||||
|
||||
#toctitle {
|
||||
color: #527bbd;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.toclevel2 {
|
||||
margin-left: 2em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
div.toclevel3 {
|
||||
margin-left: 4em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
div.toclevel4 {
|
||||
margin-left: 6em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
span.aqua { color: aqua; }
|
||||
span.black { color: black; }
|
||||
span.blue { color: blue; }
|
||||
span.fuchsia { color: fuchsia; }
|
||||
span.gray { color: gray; }
|
||||
span.green { color: green; }
|
||||
span.lime { color: lime; }
|
||||
span.maroon { color: maroon; }
|
||||
span.navy { color: navy; }
|
||||
span.olive { color: olive; }
|
||||
span.purple { color: purple; }
|
||||
span.red { color: red; }
|
||||
span.silver { color: silver; }
|
||||
span.teal { color: teal; }
|
||||
span.white { color: white; }
|
||||
span.yellow { color: yellow; }
|
||||
|
||||
span.aqua-background { background: aqua; }
|
||||
span.black-background { background: black; }
|
||||
span.blue-background { background: blue; }
|
||||
span.fuchsia-background { background: fuchsia; }
|
||||
span.gray-background { background: gray; }
|
||||
span.green-background { background: green; }
|
||||
span.lime-background { background: lime; }
|
||||
span.maroon-background { background: maroon; }
|
||||
span.navy-background { background: navy; }
|
||||
span.olive-background { background: olive; }
|
||||
span.purple-background { background: purple; }
|
||||
span.red-background { background: red; }
|
||||
span.silver-background { background: silver; }
|
||||
span.teal-background { background: teal; }
|
||||
span.white-background { background: white; }
|
||||
span.yellow-background { background: yellow; }
|
||||
|
||||
span.big { font-size: 2em; }
|
||||
span.small { font-size: 0.6em; }
|
||||
|
||||
span.underline { text-decoration: underline; }
|
||||
span.overline { text-decoration: overline; }
|
||||
span.line-through { text-decoration: line-through; }
|
||||
|
||||
|
||||
/*
|
||||
* xhtml11 specific
|
||||
*
|
||||
* */
|
||||
|
||||
tt {
|
||||
font-family: monospace;
|
||||
font-size: inherit;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
div.tableblock {
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.tableblock > table {
|
||||
border: 3px solid #527bbd;
|
||||
}
|
||||
thead, p.table.header {
|
||||
font-weight: bold;
|
||||
color: #527bbd;
|
||||
}
|
||||
p.table {
|
||||
margin-top: 0;
|
||||
}
|
||||
/* Because the table frame attribute is overriden by CSS in most browsers. */
|
||||
div.tableblock > table[frame="void"] {
|
||||
border-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="hsides"] {
|
||||
border-left-style: none;
|
||||
border-right-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="vsides"] {
|
||||
border-top-style: none;
|
||||
border-bottom-style: none;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* html5 specific
|
||||
*
|
||||
* */
|
||||
|
||||
.monospaced {
|
||||
font-family: monospace;
|
||||
font-size: inherit;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
table.tableblock {
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
thead, p.tableblock.header {
|
||||
font-weight: bold;
|
||||
color: #527bbd;
|
||||
}
|
||||
p.tableblock {
|
||||
margin-top: 0;
|
||||
}
|
||||
table.tableblock {
|
||||
border-width: 3px;
|
||||
border-spacing: 0px;
|
||||
border-style: solid;
|
||||
border-color: #527bbd;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th.tableblock, td.tableblock {
|
||||
border-width: 1px;
|
||||
padding: 4px;
|
||||
border-style: solid;
|
||||
border-color: #527bbd;
|
||||
}
|
||||
|
||||
table.tableblock.frame-topbot {
|
||||
border-left-style: hidden;
|
||||
border-right-style: hidden;
|
||||
}
|
||||
table.tableblock.frame-sides {
|
||||
border-top-style: hidden;
|
||||
border-bottom-style: hidden;
|
||||
}
|
||||
table.tableblock.frame-none {
|
||||
border-style: hidden;
|
||||
}
|
||||
|
||||
th.tableblock.halign-left, td.tableblock.halign-left {
|
||||
text-align: left;
|
||||
}
|
||||
th.tableblock.halign-center, td.tableblock.halign-center {
|
||||
text-align: center;
|
||||
}
|
||||
th.tableblock.halign-right, td.tableblock.halign-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th.tableblock.valign-top, td.tableblock.valign-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
th.tableblock.valign-middle, td.tableblock.valign-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Theme specific overrides of the preceding (asciidoc.css) CSS.
|
||||
*
|
||||
*/
|
||||
body {
|
||||
font-family: Garamond, Georgia, serif;
|
||||
font-size: 17px;
|
||||
color: #3E4349;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6,
|
||||
div.title, caption.title,
|
||||
thead, p.table.header,
|
||||
#toctitle,
|
||||
#author, #revnumber, #revdate, #revremark,
|
||||
#footer {
|
||||
font-family: Garmond, Georgia, serif;
|
||||
font-weight: normal;
|
||||
border-bottom-width: 0;
|
||||
color: #3E4349;
|
||||
}
|
||||
div.title, caption.title { color: #596673; font-weight: bold; }
|
||||
h1 { font-size: 240%; }
|
||||
h2 { font-size: 180%; }
|
||||
h3 { font-size: 150%; }
|
||||
h4 { font-size: 130%; }
|
||||
h5 { font-size: 100%; }
|
||||
h6 { font-size: 100%; }
|
||||
#header h1 { margin-top: 0; }
|
||||
#toc {
|
||||
color: #444444;
|
||||
line-height: 1.5;
|
||||
padding-top: 1.5em;
|
||||
}
|
||||
#toctitle {
|
||||
font-size: 20px;
|
||||
}
|
||||
#toc a {
|
||||
border-bottom: 1px dotted #999999;
|
||||
color: #444444 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
#toc a:hover {
|
||||
border-bottom: 1px solid #6D4100;
|
||||
color: #6D4100 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
div.toclevel1 { margin-top: 0.2em; font-size: 16px; }
|
||||
div.toclevel2 { margin-top: 0.15em; font-size: 14px; }
|
||||
em, dt, td.hdlist1 { color: black; }
|
||||
strong { color: #3E4349; }
|
||||
a { color: #004B6B; text-decoration: none; border-bottom: 1px dotted #004B6B; }
|
||||
a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; }
|
||||
a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; }
|
||||
div.tableblock > table, table.tableblock { border: 3px solid #E8E8E8; }
|
||||
th.tableblock, td.tableblock { border: 1px solid #E8E8E8; }
|
||||
ul > li > * { color: #3E4349; }
|
||||
pre, tt, .monospaced { font-family: Consolas,Menlo,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace; }
|
||||
tt, .monospaced { font-size: 0.9em; color: black;
|
||||
}
|
||||
div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock > div.content { border-width: 0 0 0 3px; border-color: #E8E8E8; }
|
||||
div.verseblock { border-left-width: 0; margin-left: 3em; }
|
||||
div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;}
|
||||
div.admonitionblock td.content { border-left: 3px solid #E8E8E8; }
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
pygmentize filter
|
||||
*/
|
||||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight { background: #f4f4f4; }
|
||||
.highlight .c { color: #008800; font-style: italic } /* Comment */
|
||||
.highlight .err { border: 1px solid #FF0000 } /* Error */
|
||||
.highlight .k { color: #AA22FF; font-weight: bold } /* Keyword */
|
||||
.highlight .o { color: #666666 } /* Operator */
|
||||
.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */
|
||||
.highlight .cp { color: #008800 } /* Comment.Preproc */
|
||||
.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */
|
||||
.highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */
|
||||
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||
.highlight .go { color: #808080 } /* Generic.Output */
|
||||
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
|
||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
||||
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||
.highlight .gt { color: #0040D0 } /* Generic.Traceback */
|
||||
.highlight .kc { color: #AA22FF; font-weight: bold } /* Keyword.Constant */
|
||||
.highlight .kd { color: #AA22FF; font-weight: bold } /* Keyword.Declaration */
|
||||
.highlight .kn { color: #AA22FF; font-weight: bold } /* Keyword.Namespace */
|
||||
.highlight .kp { color: #AA22FF } /* Keyword.Pseudo */
|
||||
.highlight .kr { color: #AA22FF; font-weight: bold } /* Keyword.Reserved */
|
||||
.highlight .kt { color: #00BB00; font-weight: bold } /* Keyword.Type */
|
||||
.highlight .m { color: #666666 } /* Literal.Number */
|
||||
.highlight .s { color: #BB4444 } /* Literal.String */
|
||||
.highlight .na { color: #BB4444 } /* Name.Attribute */
|
||||
.highlight .nb { color: #AA22FF } /* Name.Builtin */
|
||||
.highlight .nc { color: #0000FF } /* Name.Class */
|
||||
.highlight .no { color: #880000 } /* Name.Constant */
|
||||
.highlight .nd { color: #AA22FF } /* Name.Decorator */
|
||||
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
|
||||
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
|
||||
.highlight .nf { color: #00A000 } /* Name.Function */
|
||||
.highlight .nl { color: #A0A000 } /* Name.Label */
|
||||
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
|
||||
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
|
||||
.highlight .nv { color: #B8860B } /* Name.Variable */
|
||||
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
|
||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
||||
.highlight .mf { color: #666666 } /* Literal.Number.Float */
|
||||
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
|
||||
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
|
||||
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
|
||||
.highlight .sb { color: #BB4444 } /* Literal.String.Backtick */
|
||||
.highlight .sc { color: #BB4444 } /* Literal.String.Char */
|
||||
.highlight .sd { color: #BB4444; font-style: italic } /* Literal.String.Doc */
|
||||
.highlight .s2 { color: #BB4444 } /* Literal.String.Double */
|
||||
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
|
||||
.highlight .sh { color: #BB4444 } /* Literal.String.Heredoc */
|
||||
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
|
||||
.highlight .sx { color: #008000 } /* Literal.String.Other */
|
||||
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
|
||||
.highlight .s1 { color: #BB4444 } /* Literal.String.Single */
|
||||
.highlight .ss { color: #B8860B } /* Literal.String.Symbol */
|
||||
.highlight .bp { color: #AA22FF } /* Name.Builtin.Pseudo */
|
||||
.highlight .vc { color: #B8860B } /* Name.Variable.Class */
|
||||
.highlight .vg { color: #B8860B } /* Name.Variable.Global */
|
||||
.highlight .vi { color: #B8860B } /* Name.Variable.Instance */
|
||||
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
|
||||
|
||||
@@ -0,0 +1,445 @@
|
||||
/* slidy.css
|
||||
|
||||
Copyright (c) 2005-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved.
|
||||
W3C liability, trademark, document use and software licensing
|
||||
rules apply, see:
|
||||
|
||||
http://www.w3.org/Consortium/Legal/copyright-documents
|
||||
http://www.w3.org/Consortium/Legal/copyright-software
|
||||
*/
|
||||
|
||||
/*
|
||||
SJR: 2010-09-29: Modified for AsciiDoc slidy backend.
|
||||
Mostly just commented out stuff that is handled by AsciiDoc's CSS files.
|
||||
*/
|
||||
|
||||
body
|
||||
{
|
||||
margin: 0 0 0 0;
|
||||
padding: 0 0 0 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: black;
|
||||
background-color: white;
|
||||
/*
|
||||
font-family: "Gill Sans MT", "Gill Sans", GillSans, sans-serif;
|
||||
*/
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
div.toolbar {
|
||||
position: fixed; z-index: 200;
|
||||
top: auto; bottom: 0; left: 0; right: 0;
|
||||
height: 1.2em; text-align: right;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
font-size: 60%;
|
||||
color: red;
|
||||
background-color: rgb(240,240,240);
|
||||
border-top: solid 1px rgb(180,180,180);
|
||||
}
|
||||
|
||||
div.toolbar span.copyright {
|
||||
color: black;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
div.initial_prompt {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
bottom: 1.2em;
|
||||
width: 90%;
|
||||
background-color: rgb(200,200,200);
|
||||
opacity: 0.35;
|
||||
background-color: rgb(200,200,200, 0.35);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.initial_prompt p.help {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.initial_prompt p.close {
|
||||
text-align: right;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.slidy_toc {
|
||||
position: absolute;
|
||||
z-index: 300;
|
||||
width: 60%;
|
||||
max-width: 30em;
|
||||
height: 30em;
|
||||
overflow: auto;
|
||||
top: auto;
|
||||
right: auto;
|
||||
left: 4em;
|
||||
bottom: 4em;
|
||||
padding: 1em;
|
||||
background: rgb(240,240,240);
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
font-size: 60%;
|
||||
}
|
||||
|
||||
div.slidy_toc .toc_heading {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
margin-bottom: 1em;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: rgb(180,180,180);
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
div.slide {
|
||||
z-index: 20;
|
||||
margin: 0 0 0 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
border-width: 0;
|
||||
clear: both;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
line-height: 120%;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
div.background {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.handout {
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
div.slide.titlepage {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.slide.titlepage.h1 {
|
||||
padding-top: 10%;
|
||||
}
|
||||
|
||||
div.slide h1 {
|
||||
padding-left: 0;
|
||||
padding-right: 20pt;
|
||||
padding-top: 4pt;
|
||||
padding-bottom: 4pt;
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 60pt;
|
||||
margin-bottom: 0.5em;
|
||||
display: block;
|
||||
font-size: 160%;
|
||||
line-height: 1.2em;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
div.toc {
|
||||
position: absolute;
|
||||
top: auto;
|
||||
bottom: 4em;
|
||||
left: 4em;
|
||||
right: auto;
|
||||
width: 60%;
|
||||
max-width: 30em;
|
||||
height: 30em;
|
||||
border: solid thin black;
|
||||
padding: 1em;
|
||||
background: rgb(240,240,240);
|
||||
color: black;
|
||||
z-index: 300;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
div.toc-heading {
|
||||
width: 100%;
|
||||
border-bottom: solid 1px rgb(180,180,180);
|
||||
margin-bottom: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/*
|
||||
pre {
|
||||
font-size: 80%;
|
||||
font-weight: bold;
|
||||
line-height: 120%;
|
||||
padding-top: 0.2em;
|
||||
padding-bottom: 0.2em;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
border-style: solid;
|
||||
border-left-width: 1em;
|
||||
border-top-width: thin;
|
||||
border-right-width: thin;
|
||||
border-bottom-width: thin;
|
||||
border-color: #95ABD0;
|
||||
color: #00428C;
|
||||
background-color: #E4E5E7;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
li pre { margin-left: 0; }
|
||||
|
||||
blockquote { font-style: italic }
|
||||
|
||||
img { background-color: transparent }
|
||||
|
||||
p.copyright { font-size: smaller }
|
||||
*/
|
||||
|
||||
.center { text-align: center }
|
||||
.footnote { font-size: smaller; margin-left: 2em; }
|
||||
|
||||
/*
|
||||
a img { border-width: 0; border-style: none }
|
||||
*/
|
||||
|
||||
a:visited { color: navy }
|
||||
a:link { color: navy }
|
||||
a:hover { color: red; text-decoration: underline }
|
||||
a:active { color: red; text-decoration: underline }
|
||||
|
||||
a {text-decoration: none}
|
||||
.navbar a:link {color: white}
|
||||
.navbar a:visited {color: yellow}
|
||||
.navbar a:active {color: red}
|
||||
.navbar a:hover {color: red}
|
||||
|
||||
/*
|
||||
ul { list-style-type: square; }
|
||||
ul ul { list-style-type: disc; }
|
||||
ul ul ul { list-style-type: circle; }
|
||||
ul ul ul ul { list-style-type: disc; }
|
||||
li { margin-left: 0.5em; margin-top: 0.5em; }
|
||||
li li { font-size: 85%; font-style: italic }
|
||||
li li li { font-size: 85%; font-style: normal }
|
||||
*/
|
||||
|
||||
div dt
|
||||
{
|
||||
margin-left: 0;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
div dd
|
||||
{
|
||||
margin-left: 2em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table {
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
*/
|
||||
|
||||
p.subhead { font-weight: bold; margin-top: 2em; }
|
||||
|
||||
.smaller { font-size: smaller }
|
||||
.bigger { font-size: 130% }
|
||||
|
||||
/*
|
||||
td,th { padding: 0.2em }
|
||||
*/
|
||||
|
||||
ul {
|
||||
margin: 0.5em 1.5em 0.5em 1.5em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ol {
|
||||
margin: 0.5em 1.5em 0.5em 1.5em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul { list-style-type: square; }
|
||||
ul ul { list-style-type: disc; }
|
||||
ul ul ul { list-style-type: circle; }
|
||||
ul ul ul ul { list-style-type: disc; }
|
||||
|
||||
/*
|
||||
ul li {
|
||||
list-style: square;
|
||||
margin: 0.1em 0em 0.6em 0;
|
||||
padding: 0 0 0 0;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
||||
ol li {
|
||||
margin: 0.1em 0em 0.6em 1.5em;
|
||||
padding: 0 0 0 0px;
|
||||
line-height: 140%;
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
li ul li {
|
||||
font-size: 85%;
|
||||
font-style: italic;
|
||||
list-style-type: disc;
|
||||
background: transparent;
|
||||
padding: 0 0 0 0;
|
||||
}
|
||||
li li ul li {
|
||||
font-size: 85%;
|
||||
font-style: normal;
|
||||
list-style-type: circle;
|
||||
background: transparent;
|
||||
padding: 0 0 0 0;
|
||||
}
|
||||
li li li ul li {
|
||||
list-style-type: disc;
|
||||
background: transparent;
|
||||
padding: 0 0 0 0;
|
||||
}
|
||||
|
||||
li ol li {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
|
||||
li li ol li {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
setting class="outline" on ol or ul makes it behave as an
|
||||
ouline list where blocklevel content in li elements is
|
||||
hidden by default and can be expanded or collapsed with
|
||||
mouse click. Set class="expand" on li to override default
|
||||
*/
|
||||
|
||||
ol.outline li:hover { cursor: pointer }
|
||||
ol.outline li.nofold:hover { cursor: default }
|
||||
|
||||
ul.outline li:hover { cursor: pointer }
|
||||
ul.outline li.nofold:hover { cursor: default }
|
||||
|
||||
ol.outline { list-style:decimal; }
|
||||
ol.outline ol { list-style-type:lower-alpha }
|
||||
|
||||
ol.outline li.nofold {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
ol.outline li.unfolded {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
ol.outline li.folded {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
ol.outline li.unfolded:hover {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/fold.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
ol.outline li.folded:hover {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
|
||||
ul.outline li.nofold {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
ul.outline li.unfolded {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
ul.outline li.folded {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
ul.outline li.unfolded:hover {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/fold.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
ul.outline li.folded:hover {
|
||||
padding: 0 0 0 20px;
|
||||
background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.5em;
|
||||
}
|
||||
|
||||
/* for slides with class "title" in table of contents */
|
||||
a.titleslide { font-weight: bold; font-style: italic }
|
||||
|
||||
/*
|
||||
hide images for work around for save as bug
|
||||
where browsers fail to save images used by CSS
|
||||
*/
|
||||
img.hidden { display: none; visibility: hidden }
|
||||
div.initial_prompt { display: none; visibility: hidden }
|
||||
|
||||
div.slide {
|
||||
visibility: visible;
|
||||
position: inherit;
|
||||
}
|
||||
div.handout {
|
||||
border-top-style: solid;
|
||||
border-top-width: thin;
|
||||
border-top-color: black;
|
||||
}
|
||||
|
||||
@media screen {
|
||||
.hidden { display: none; visibility: visible }
|
||||
|
||||
div.slide.hidden { display: block; visibility: visible }
|
||||
div.handout.hidden { display: block; visibility: visible }
|
||||
div.background { display: none; visibility: hidden }
|
||||
body.single_slide div.initial_prompt { display: block; visibility: visible }
|
||||
body.single_slide div.background { display: block; visibility: visible }
|
||||
body.single_slide div.background.hidden { display: none; visibility: hidden }
|
||||
body.single_slide .invisible { visibility: hidden }
|
||||
body.single_slide .hidden { display: none; visibility: hidden }
|
||||
body.single_slide div.slide { position: absolute }
|
||||
body.single_slide div.handout { display: none; visibility: hidden }
|
||||
}
|
||||
|
||||
@media print {
|
||||
.hidden { display: block; visibility: visible }
|
||||
|
||||
/*
|
||||
div.slide pre { font-size: 60%; padding-left: 0.5em; }
|
||||
*/
|
||||
div.toolbar { display: none; visibility: hidden; }
|
||||
div.slidy_toc { display: none; visibility: hidden; }
|
||||
div.background { display: none; visibility: hidden; }
|
||||
div.slide { page-break-before: always }
|
||||
/* :first-child isn't reliable for print media */
|
||||
div.slide.first-slide { page-break-before: avoid }
|
||||
}
|
||||
|
||||
|
||||
/* SJR: AsciiDoc slidy backend tweaks */
|
||||
|
||||
ol, ul {
|
||||
margin: 0.8em 1.5em 0.8em 1.8em;
|
||||
}
|
||||
li > ul, li > ol {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
.outline > li.folded,
|
||||
.outline > li.unfolded {
|
||||
color: #527bbd;
|
||||
}
|
||||
ul > li{ color: #aaa; }
|
||||
ul > li > *, ol > li > * { color: black; }
|
||||
|
||||
li {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
@media screen {
|
||||
body {
|
||||
max-width: 50em; /* approximately 80 characters wide */
|
||||
margin-left: 16em;
|
||||
}
|
||||
|
||||
#toc {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 13em;
|
||||
padding: 0.5em;
|
||||
padding-bottom: 1.5em;
|
||||
margin: 0;
|
||||
overflow: auto;
|
||||
border-right: 3px solid #f8f8f8;
|
||||
}
|
||||
|
||||
#toc .toclevel1 {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
#toc .toclevel2 {
|
||||
margin-top: 0.25em;
|
||||
display: list-item;
|
||||
/* OLD color: #aaaaaa; */
|
||||
color: #990000;
|
||||
}
|
||||
|
||||
#toctitle {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
/* Empty placeholder file */
|
||||
@@ -0,0 +1,435 @@
|
||||
/*
|
||||
* AsciiDoc 'volnitsky' theme for xhtml11 and html5 backends.
|
||||
* Based on css from http://volnitsky.com, which was in turn based on default
|
||||
* theme from AsciiDoc
|
||||
*
|
||||
* FIXME: The stlying is still a bit rough in places.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Default font. */
|
||||
body {
|
||||
font-family: Georgia,"Times New Roman",Times,serif;
|
||||
}
|
||||
|
||||
/* Title font. */
|
||||
h1, h2, h3, h4, h5, h6,
|
||||
div.title, caption.title,
|
||||
thead, p.table.header,
|
||||
#toctitle,
|
||||
#author, #revnumber, #revdate, #revremark,
|
||||
#footer {
|
||||
font-family: Candara,Arial,sans-serif;
|
||||
}
|
||||
|
||||
|
||||
#toc a {
|
||||
border-bottom: 1px dotted #999999;
|
||||
color: #3A3A4D !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
#toc a:hover {
|
||||
border-bottom: 1px solid #6D4100;
|
||||
color: #6D4100 !important;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
a { color: #666688; text-decoration: none; border-bottom: 1px dotted #666688; }
|
||||
a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; }
|
||||
a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; }
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
color: #444466;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: #444466;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #666688;
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1.3;
|
||||
letter-spacing:+0.15em;
|
||||
}
|
||||
|
||||
h1, h2, h3 { border-bottom: 2px solid #ccd; }
|
||||
h2 { padding-top: 0.5em; }
|
||||
h3 { float: left; }
|
||||
h3 + * { clear: left; }
|
||||
|
||||
div.sectionbody {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid #444466;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
ul, ol, li > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#author {
|
||||
color: #444466;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#footer {
|
||||
font-size: small;
|
||||
border-top: 2px solid silver;
|
||||
padding-top: 0.5em;
|
||||
margin-top: 4.0em;
|
||||
}
|
||||
|
||||
#footer-text {
|
||||
float: left;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#footer-badges {
|
||||
float: right;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#preamble {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
|
||||
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||
div.admonitionblock {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
div.admonitionblock {
|
||||
margin-top: 2.5em;
|
||||
margin-bottom: 2.5em;
|
||||
}
|
||||
|
||||
div.content { /* Block element content. */
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Block element titles. */
|
||||
div.title, caption.title {
|
||||
color: #444466;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
div.title + * {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
td div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content + div.title {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
|
||||
div.sidebarblock > div.content {
|
||||
background: #ffffee;
|
||||
border: 1px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.listingblock > div.content {
|
||||
border: 1px solid silver;
|
||||
background: #f4f4f4;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.quoteblock {
|
||||
padding-left: 2.0em;
|
||||
margin-right: 10%;
|
||||
}
|
||||
div.quoteblock > div.attribution {
|
||||
padding-top: 0.5em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.verseblock {
|
||||
padding-left: 2.0em;
|
||||
margin-right: 10%;
|
||||
}
|
||||
div.verseblock > pre.content {
|
||||
font-family: inherit;
|
||||
}
|
||||
div.verseblock > div.attribution {
|
||||
padding-top: 0.75em;
|
||||
text-align: left;
|
||||
}
|
||||
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
||||
div.verseblock + div.attribution {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.admonitionblock .icon {
|
||||
vertical-align: top;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
color: #444466;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
div.admonitionblock td.content {
|
||||
padding-left: 0.5em;
|
||||
border-left: 2px solid silver;
|
||||
}
|
||||
|
||||
div.exampleblock > div.content {
|
||||
border-left: 2px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.imageblock div.content { padding-left: 0; }
|
||||
span.image img { border-style: none; }
|
||||
a.image:visited { color: white; }
|
||||
|
||||
dl {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
dt {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0;
|
||||
font-style: normal;
|
||||
color: #444466;
|
||||
}
|
||||
dd > *:first-child {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style-position: outside;
|
||||
}
|
||||
ol.arabic {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
ol.loweralpha {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
ol.upperalpha {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
ol.lowerroman {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
ol.upperroman {
|
||||
list-style-type: upper-roman;
|
||||
}
|
||||
|
||||
div.compact ul, div.compact ol,
|
||||
div.compact p, div.compact p,
|
||||
div.compact div, div.compact div {
|
||||
margin-top: 0.1em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.tableblock > table {
|
||||
border: 3px solid #444466;
|
||||
}
|
||||
thead {
|
||||
font-weight: bold;
|
||||
color: #444466;
|
||||
}
|
||||
tfoot {
|
||||
font-weight: bold;
|
||||
}
|
||||
td > div.verse {
|
||||
white-space: pre;
|
||||
}
|
||||
p.table {
|
||||
margin-top: 0;
|
||||
}
|
||||
/* Because the table frame attribute is overriden by CSS in most browsers. */
|
||||
div.tableblock > table[frame="void"] {
|
||||
border-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="hsides"] {
|
||||
border-left-style: none;
|
||||
border-right-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="vsides"] {
|
||||
border-top-style: none;
|
||||
border-bottom-style: none;
|
||||
}
|
||||
|
||||
|
||||
div.hdlist {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
div.hdlist tr {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
dt.hdlist1.strong, td.hdlist1.strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
td.hdlist1 {
|
||||
vertical-align: top;
|
||||
font-style: normal;
|
||||
padding-right: 0.8em;
|
||||
color: #444466;
|
||||
}
|
||||
td.hdlist2 {
|
||||
vertical-align: top;
|
||||
}
|
||||
div.hdlist.compact tr {
|
||||
margin: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.comment {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
@media print {
|
||||
#footer-badges { display: none; }
|
||||
}
|
||||
|
||||
#toctitle {
|
||||
color: #666688;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { margin-top: 0; margin-bottom: 0; }
|
||||
div.toclevel1 { margin-top: 0.3em; margin-left: 0; font-size: 1.0em; }
|
||||
div.toclevel2 { margin-top: 0.25em; margin-left: 2em; font-size: 0.9em; }
|
||||
div.toclevel3 { margin-left: 4em; font-size: 0.8em; }
|
||||
div.toclevel4 { margin-left: 6em; font-size: 0.8em; }
|
||||
|
||||
body {
|
||||
margin: 1em 5%;
|
||||
max-width: 55em;
|
||||
padding-left: 0;
|
||||
|
||||
}
|
||||
|
||||
.monospaced, tt, div.listingblock > div.content {
|
||||
font-family: Consolas, "Andale Mono", "Courier New", monospace;
|
||||
color: #004400;
|
||||
background: #f4f4f4;
|
||||
max-width: 80em;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
|
||||
.paragraph p {
|
||||
line-height: 1.5em;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.paragraph p, li, dd, .content { max-width: 45em; }
|
||||
.admonitionblock { max-width: 35em; }
|
||||
|
||||
div.sectionbody div.ulist > ul > li {
|
||||
list-style-type: square;
|
||||
color: #aaa;
|
||||
}
|
||||
div.sectionbody div.ulist > ul > li > * {
|
||||
color: black;
|
||||
/*font-size: 50%;*/
|
||||
}
|
||||
|
||||
|
||||
div.sectionbody div.ulist > ul > li div.ulist > ul > li {
|
||||
color: #ccd ;
|
||||
}
|
||||
div.sectionbody div.ulist > ul > li div.ulist > ul > li > * {
|
||||
color: black ;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: normal ! important;
|
||||
font-weight: bold ! important;
|
||||
color: #662222 ! important;
|
||||
letter-spacing:+0.08em ! important;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* html5 specific
|
||||
*
|
||||
* */
|
||||
|
||||
table.tableblock {
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
thead, p.tableblock.header {
|
||||
font-weight: bold;
|
||||
color: #666688;
|
||||
}
|
||||
p.tableblock {
|
||||
margin-top: 0;
|
||||
}
|
||||
table.tableblock {
|
||||
border-width: 3px;
|
||||
border-spacing: 0px;
|
||||
border-style: solid;
|
||||
border-color: #444466;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th.tableblock, td.tableblock {
|
||||
border-width: 1px;
|
||||
padding: 4px;
|
||||
border-style: solid;
|
||||
border-color: #444466;
|
||||
}
|
||||
|
||||
table.tableblock.frame-topbot {
|
||||
border-left-style: hidden;
|
||||
border-right-style: hidden;
|
||||
}
|
||||
table.tableblock.frame-sides {
|
||||
border-top-style: hidden;
|
||||
border-bottom-style: hidden;
|
||||
}
|
||||
table.tableblock.frame-none {
|
||||
border-style: hidden;
|
||||
}
|
||||
|
||||
th.tableblock.halign-left, td.tableblock.halign-left {
|
||||
text-align: left;
|
||||
}
|
||||
th.tableblock.halign-center, td.tableblock.halign-center {
|
||||
text-align: center;
|
||||
}
|
||||
th.tableblock.halign-right, td.tableblock.halign-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th.tableblock.valign-top, td.tableblock.valign-top {
|
||||
vertical-align: top;
|
||||
}
|
||||
th.tableblock.valign-middle, td.tableblock.valign-middle {
|
||||
vertical-align: middle;
|
||||
}
|
||||
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Workarounds for IE6's broken and incomplete CSS2. */
|
||||
|
||||
div.sidebar-content {
|
||||
background: #ffffee;
|
||||
border: 1px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
div.sidebar-title, div.image-title {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
margin-top: 0.0em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
div.listingblock div.content {
|
||||
border: 1px solid silver;
|
||||
background: #f4f4f4;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.quoteblock-attribution {
|
||||
padding-top: 0.5em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
pre.verseblock-content {
|
||||
font-family: inherit;
|
||||
}
|
||||
div.verseblock-attribution {
|
||||
padding-top: 0.75em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.exampleblock-content {
|
||||
border-left: 3px solid #dddddd;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
div.imageblock.latex div.image-title { margin-top: 0.5em; }
|
||||
|
||||
/* IE6 sets dynamically generated links as visited. */
|
||||
div#toc a:visited { color: blue; }
|
||||
@@ -0,0 +1,333 @@
|
||||
/* Debug borders */
|
||||
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
|
||||
/*
|
||||
border: 1px solid red;
|
||||
*/
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 1em 5% 1em 5%;
|
||||
}
|
||||
|
||||
a {
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:visited {
|
||||
color: fuchsia;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: #083194;
|
||||
}
|
||||
|
||||
tt {
|
||||
color: navy;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
margin-top: 1.2em;
|
||||
margin-bottom: 0.5em;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
border-bottom: 2px solid silver;
|
||||
}
|
||||
h2 {
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
h3 {
|
||||
float: left;
|
||||
}
|
||||
h3 + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
div.sectionbody {
|
||||
font-family: serif;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid silver;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
ul, ol, li > p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
span#author {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
span#email {
|
||||
}
|
||||
span#revnumber, span#revdate, span#revremark {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
div#footer {
|
||||
font-family: sans-serif;
|
||||
font-size: small;
|
||||
border-top: 2px solid silver;
|
||||
padding-top: 0.5em;
|
||||
margin-top: 4.0em;
|
||||
}
|
||||
div#footer-text {
|
||||
float: left;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
div#footer-badges {
|
||||
float: right;
|
||||
padding-bottom: 0.5em;
|
||||
}
|
||||
|
||||
div#preamble {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
|
||||
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
||||
div.admonitionblock {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
div.admonitionblock {
|
||||
margin-top: 2.5em;
|
||||
margin-bottom: 2.5em;
|
||||
}
|
||||
|
||||
div.content { /* Block element content. */
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Block element titles. */
|
||||
div.title, caption.title {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
div.title + * {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
td div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content div.title:first-child {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
div.content + div.title {
|
||||
margin-top: 0.0em;
|
||||
}
|
||||
|
||||
div.sidebarblock > div.content {
|
||||
background: #ffffee;
|
||||
border: 1px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.listingblock > div.content {
|
||||
border: 1px solid silver;
|
||||
background: #f4f4f4;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.quoteblock {
|
||||
padding-left: 2.0em;
|
||||
margin-right: 10%;
|
||||
}
|
||||
div.quoteblock > div.attribution {
|
||||
padding-top: 0.5em;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.verseblock {
|
||||
padding-left: 2.0em;
|
||||
margin-right: 10%;
|
||||
}
|
||||
div.verseblock > div.content {
|
||||
white-space: pre;
|
||||
}
|
||||
div.verseblock > div.attribution {
|
||||
padding-top: 0.75em;
|
||||
text-align: left;
|
||||
}
|
||||
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
||||
div.verseblock + div.attribution {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.admonitionblock .icon {
|
||||
vertical-align: top;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
color: #527bbd;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
div.admonitionblock td.content {
|
||||
padding-left: 0.5em;
|
||||
border-left: 2px solid silver;
|
||||
}
|
||||
|
||||
div.exampleblock > div.content {
|
||||
border-left: 2px solid silver;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.imageblock div.content { padding-left: 0; }
|
||||
span.image img { border-style: none; }
|
||||
a.image:visited { color: white; }
|
||||
|
||||
dl {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
dt {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0;
|
||||
font-style: normal;
|
||||
color: navy;
|
||||
}
|
||||
dd > *:first-child {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
list-style-position: outside;
|
||||
}
|
||||
ol.arabic {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
ol.loweralpha {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
ol.upperalpha {
|
||||
list-style-type: upper-alpha;
|
||||
}
|
||||
ol.lowerroman {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
ol.upperroman {
|
||||
list-style-type: upper-roman;
|
||||
}
|
||||
|
||||
div.compact ul, div.compact ol,
|
||||
div.compact p, div.compact p,
|
||||
div.compact div, div.compact div {
|
||||
margin-top: 0.1em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.tableblock > table {
|
||||
border: 3px solid #527bbd;
|
||||
}
|
||||
thead {
|
||||
font-family: sans-serif;
|
||||
font-weight: bold;
|
||||
}
|
||||
tfoot {
|
||||
font-weight: bold;
|
||||
}
|
||||
td > div.verse {
|
||||
white-space: pre;
|
||||
}
|
||||
p.table {
|
||||
margin-top: 0;
|
||||
}
|
||||
/* Because the table frame attribute is overriden by CSS in most browsers. */
|
||||
div.tableblock > table[frame="void"] {
|
||||
border-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="hsides"] {
|
||||
border-left-style: none;
|
||||
border-right-style: none;
|
||||
}
|
||||
div.tableblock > table[frame="vsides"] {
|
||||
border-top-style: none;
|
||||
border-bottom-style: none;
|
||||
}
|
||||
|
||||
|
||||
div.hdlist {
|
||||
margin-top: 0.8em;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
div.hdlist tr {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
dt.hdlist1.strong, td.hdlist1.strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
td.hdlist1 {
|
||||
vertical-align: top;
|
||||
font-style: normal;
|
||||
padding-right: 0.8em;
|
||||
color: navy;
|
||||
}
|
||||
td.hdlist2 {
|
||||
vertical-align: top;
|
||||
}
|
||||
div.hdlist.compact tr {
|
||||
margin: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.comment {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
@media print {
|
||||
div#footer-badges { display: none; }
|
||||
}
|
||||
|
||||
div#toctitle {
|
||||
color: #527bbd;
|
||||
font-family: sans-serif;
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
margin-top: 1.0em;
|
||||
margin-bottom: 0.1em;
|
||||
}
|
||||
|
||||
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.toclevel2 {
|
||||
margin-left: 2em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
div.toclevel3 {
|
||||
margin-left: 4em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
div.toclevel4 {
|
||||
margin-left: 6em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
###############################################################################
|
||||
#
|
||||
# ClassID <-> Name Translation Table
|
||||
#
|
||||
# This file can be used to assign names to classids for easier reference
|
||||
# in all libnl tools.
|
||||
#
|
||||
# Format:
|
||||
# <MAJ:> <NAME> # qdisc definition
|
||||
# <MAJ:MIN> <NAME> # class deifnition
|
||||
# <NAME:MIN> <NAME> # class definition referencing an
|
||||
# existing qdisc definition.
|
||||
#
|
||||
# Example:
|
||||
# 1: top # top -> 1:0
|
||||
# top:1 interactive # interactive -> 1:1
|
||||
# top:2 www # www -> 1:2
|
||||
# top:3 bulk # bulk -> 1:3
|
||||
# 2:1 test_class # test_class -> 2:1
|
||||
#
|
||||
# Illegal Example:
|
||||
# 30:1 classD
|
||||
# classD:2 invalidClass # classD refers to a class, not a qdisc
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# <CLASSID> <NAME>
|
||||
|
||||
# Reserved default classids
|
||||
0:0 none
|
||||
ffff:ffff root
|
||||
ffff:fff1 ingress
|
||||
|
||||
#
|
||||
# List your classid definitions here:
|
||||
#
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
# List of auto-generated classids
|
||||
#
|
||||
# DO NOT ADD CLASSID DEFINITIONS BELOW THIS LINE
|
||||
#
|
||||
# <CLASSID> <NAME>
|
||||
@@ -0,0 +1,76 @@
|
||||
#
|
||||
# Location definitions for packet matching
|
||||
#
|
||||
|
||||
# name alignment offset mask shift
|
||||
ip.version u8 net+0 0xF0 4
|
||||
ip.hdrlen u8 net+0 0x0F
|
||||
ip.diffserv u8 net+1
|
||||
ip.length u16 net+2
|
||||
ip.id u16 net+4
|
||||
ip.flag.res u8 net+6 0xff 7
|
||||
ip.df u8 net+6 0x40 6
|
||||
ip.mf u8 net+6 0x20 5
|
||||
ip.offset u16 net+6 0x1FFF
|
||||
ip.ttl u8 net+8
|
||||
ip.proto u8 net+9
|
||||
ip.chksum u16 net+10
|
||||
ip.src u32 net+12
|
||||
ip.dst u32 net+16
|
||||
|
||||
# if ip.ihl > 5
|
||||
ip.opts u32 net+20
|
||||
|
||||
|
||||
#
|
||||
# IP version 6
|
||||
#
|
||||
# name alignment offset mask shift
|
||||
ip6.version u8 net+0 0xF0 4
|
||||
ip6.tc u16 net+0 0xFF0 4
|
||||
ip6.flowlabel u32 net+0 0xFFFFF
|
||||
ip6.length u16 net+4
|
||||
ip6.nexthdr u8 net+6
|
||||
ip6.hoplimit u8 net+7
|
||||
ip6.src 16 net+8
|
||||
ip6.dst 16 net+24
|
||||
|
||||
#
|
||||
# Transmission Control Protocol (TCP)
|
||||
#
|
||||
# name alignment offset mask shift
|
||||
tcp.sport u16 tcp+0
|
||||
tcp.dport u16 tcp+2
|
||||
tcp.seq u32 tcp+4
|
||||
tcp.ack u32 tcp+8
|
||||
|
||||
# Data offset (4 bits)
|
||||
tcp.off u8 tcp+12 0xF0 4
|
||||
|
||||
# Reserved [0 0 0] (3 bits)
|
||||
tcp.reserved u8 tcp+12 0x04 1
|
||||
|
||||
# ECN [N C E] (3 bits)
|
||||
tcp.ecn u16 tcp+12 0x01C00 6
|
||||
|
||||
# Individual TCP flags (0|1) (6 bits in total)
|
||||
tcp.flag.urg u8 tcp+13 0x20 5
|
||||
tcp.flag.ack u8 tcp+13 0x10 4
|
||||
tcp.flag.psh u8 tcp+13 0x08 3
|
||||
tcp.flag.rst u8 tcp+13 0x04 2
|
||||
tcp.flag.syn u8 tcp+13 0x02 1
|
||||
tcp.flag.fin u8 tcp+13 0x01
|
||||
|
||||
tcp.win u16 tcp+14
|
||||
tcp.csum u16 tcp+16
|
||||
tcp.urg u16 tcp+18
|
||||
tcp.opts u32 tcp+20
|
||||
|
||||
#
|
||||
# User Datagram Protocol (UDP)
|
||||
#
|
||||
# name alignment offset mask shift
|
||||
udp.sport u16 tcp+0
|
||||
udp.dport u16 tcp+2
|
||||
udp.length u16 tcp+4
|
||||
udp.csum u16 tcp+6
|
||||
@@ -0,0 +1,13 @@
|
||||
include/base
|
||||
============
|
||||
|
||||
This directory contains libnl-independent helper.
|
||||
|
||||
It's an internal "library" of helpers, that purely depend
|
||||
on C and external dependencies.
|
||||
|
||||
Currently, it's also header-only, so there is no need to link
|
||||
with anything special.
|
||||
|
||||
This can be used freely by all our internal code, but it's private API,
|
||||
so it cannot be used in public headers.
|
||||
@@ -0,0 +1,874 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-only */
|
||||
/*
|
||||
* Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch>
|
||||
*/
|
||||
|
||||
#ifndef __NETLINK_BASE_NL_BASE_UTILS_H__
|
||||
#define __NETLINK_BASE_NL_BASE_UTILS_H__
|
||||
|
||||
#include <byteswap.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
#include <inttypes.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#ifndef DISABLE_PTHREADS
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
#define ntohll(x) (x)
|
||||
#elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define ntohll(x) bswap_64((x))
|
||||
#endif
|
||||
#define htonll(x) ntohll(x)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_STRINGIFY_ARG(contents) #contents
|
||||
#define _NL_STRINGIFY(macro_or_string) _NL_STRINGIFY_ARG(macro_or_string)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define _NL_PRAGMA_WARNING_DO(warning) \
|
||||
_NL_STRINGIFY(GCC diagnostic ignored warning)
|
||||
#elif defined(__clang__)
|
||||
#define _NL_PRAGMA_WARNING_DO(warning) \
|
||||
_NL_STRINGIFY(clang diagnostic ignored warning)
|
||||
#endif
|
||||
|
||||
/* you can only suppress a specific warning that the compiler
|
||||
* understands. Otherwise you will get another compiler warning
|
||||
* about invalid pragma option.
|
||||
* It's not that bad however, because gcc and clang often have the
|
||||
* same name for the same warning. */
|
||||
|
||||
#if defined(__GNUC__) && \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#define _NL_PRAGMA_WARNING_DISABLE(warning) \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma(_NL_PRAGMA_WARNING_DO("-Wpragmas")) \
|
||||
_Pragma(_NL_PRAGMA_WARNING_DO(warning))
|
||||
#elif defined(__clang__)
|
||||
#define _NL_PRAGMA_WARNING_DISABLE(warning) \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma(_NL_PRAGMA_WARNING_DO("-Wunknown-warning-option")) \
|
||||
_Pragma(_NL_PRAGMA_WARNING_DO(warning))
|
||||
#else
|
||||
#define _NL_PRAGMA_WARNING_DISABLE(warning)
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
#define _NL_PRAGMA_WARNING_REENABLE _Pragma("GCC diagnostic pop")
|
||||
#elif defined(__clang__)
|
||||
#define _NL_PRAGMA_WARNING_REENABLE _Pragma("clang diagnostic pop")
|
||||
#else
|
||||
#define _NL_PRAGMA_WARNING_REENABLE
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _nl_packed __attribute__((__packed__))
|
||||
#define _nl_unused __attribute__((__unused__))
|
||||
#define _nl_always_inline __attribute__((__always_inline__))
|
||||
#define _nl_used __attribute__((__used__))
|
||||
#define _nl_pure __attribute__((__pure__))
|
||||
#define _nl_const __attribute__((__const__))
|
||||
#define _nl_noreturn __attribute__((__noreturn__))
|
||||
#define _nl_warn_unused_result __attribute__((__warn_unused_result__))
|
||||
#define _nl_printf(a, b) __attribute__((__format__(__printf__, a, b)))
|
||||
#define _nl_align(s) __attribute__((__aligned__(s)))
|
||||
#define _nl_section(s) __attribute__((__section__(s)))
|
||||
#define _nl_alignof(type) __alignof(type)
|
||||
#define _nl_alignas(type) _nl_align(_nl_alignof(type))
|
||||
#define _nl_deprecated(msg) __attribute__((__deprecated__(msg)))
|
||||
#define _nl_init __attribute__((constructor))
|
||||
#define _nl_exit __attribute__((destructor))
|
||||
#define _nl_auto(fcn) __attribute__((__cleanup__(fcn)))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef thread_local
|
||||
#define _nl_thread_local thread_local
|
||||
/*
|
||||
* Don't break on glibc < 2.16 that doesn't define __STDC_NO_THREADS__
|
||||
* see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53769
|
||||
*/
|
||||
#elif __STDC_VERSION__ >= 201112L && \
|
||||
!(defined(__STDC_NO_THREADS__) || \
|
||||
(defined(__GNU_LIBRARY__) && __GLIBC__ == 2 && \
|
||||
__GLIBC_MINOR__ < 16))
|
||||
#define _nl_thread_local _Thread_local
|
||||
#else
|
||||
#define _nl_thread_local __thread
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_STATIC_ASSERT(cond) ((void)sizeof(char[(cond) ? 1 : -1]))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#if defined(NL_MORE_ASSERTS) && NL_MORE_ASSERTS > 0
|
||||
#define _nl_assert(cond) assert(cond)
|
||||
#else
|
||||
#define _nl_assert(cond) \
|
||||
do { \
|
||||
if (0) { \
|
||||
assert(cond); \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define _nl_assert_not_reached() assert(0)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_BIT(n) (1ull << (n))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_PASTE_ARGS(identifier1, identifier2) identifier1##identifier2
|
||||
#define _NL_PASTE(identifier1, identifier2) \
|
||||
_NL_PASTE_ARGS(identifier1, identifier2)
|
||||
|
||||
/* Taken from systemd's UNIQ_T and UNIQ macros. */
|
||||
|
||||
#define _NL_UNIQ_T(x, uniq) _NL_PASTE(__unique_prefix_, _NL_PASTE(x, uniq))
|
||||
#define _NL_UNIQ __COUNTER__
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _nl_assert_addr_family_or_unspec(addr_family) \
|
||||
do { \
|
||||
typeof(addr_family) _addr_family = (addr_family); \
|
||||
\
|
||||
_nl_assert(_addr_family == AF_UNSPEC || \
|
||||
_addr_family == AF_INET || \
|
||||
_addr_family == AF_INET6); \
|
||||
} while (0)
|
||||
|
||||
#define _nl_assert_addr_family(addr_family) \
|
||||
do { \
|
||||
typeof(addr_family) _addr_family = (addr_family); \
|
||||
\
|
||||
_nl_assert(_addr_family == AF_INET || \
|
||||
_addr_family == AF_INET6); \
|
||||
} while (0)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_SWAP(pa, pb) \
|
||||
do { \
|
||||
typeof(*(pa)) *_pa = (pa); \
|
||||
typeof(*(pb)) *_pb = (pb); \
|
||||
typeof(*_pa) _tmp; \
|
||||
\
|
||||
_nl_assert(_pa); \
|
||||
_nl_assert(_pb); \
|
||||
_tmp = *_pa; \
|
||||
*_pa = *_pb; \
|
||||
*_pb = _tmp; \
|
||||
} while (0)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
|
||||
#define ARRAY_SIZE(arr) _NL_N_ELEMENTS(arr)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* This is also defined in stddef.h */
|
||||
#ifndef offsetof
|
||||
#define offsetof(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline uintptr_t _nl_ptr_to_uintptr(const void *p)
|
||||
{
|
||||
/* in C, pointers can only be compared (with less-than or greater-than) under certain
|
||||
* circumstances. Since uintptr_t is supposed to be able to represent the pointer
|
||||
* as a plain integer and also support to convert the integer back to the pointer,
|
||||
* it should be safer to compare the pointers directly.
|
||||
*
|
||||
* Of course, this function isn't very useful beyond that its use makes it clear
|
||||
* that we want to compare pointers by value, which otherwise may not be valid. */
|
||||
return (uintptr_t)p;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline int _nl_strcmp0(const char *s1, const char *s2)
|
||||
{
|
||||
int c;
|
||||
|
||||
/* like g_strcmp0(), but this is inlinable.
|
||||
*
|
||||
* Also, it is guaranteed to return either -1, 0, or 1. */
|
||||
if (s1 == s2)
|
||||
return 0;
|
||||
if (!s1)
|
||||
return -1;
|
||||
if (!s2)
|
||||
return 1;
|
||||
c = strcmp(s1, s2);
|
||||
if (c < 0)
|
||||
return -1;
|
||||
if (c > 0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool _nl_streq(const char *a, const char *b)
|
||||
{
|
||||
return !strcmp(a, b);
|
||||
}
|
||||
|
||||
static inline bool _nl_streq0(const char *a, const char *b)
|
||||
{
|
||||
return a == b || (a && b && _nl_streq(a, b));
|
||||
}
|
||||
|
||||
static inline int _nl_memcmp(const void *s1, const void *s2, size_t n)
|
||||
{
|
||||
/* Workaround undefined behavior in memcmp() with NULL pointers. */
|
||||
if (n == 0)
|
||||
return 0;
|
||||
_nl_assert(s1);
|
||||
_nl_assert(s2);
|
||||
return memcmp(s1, s2, n);
|
||||
}
|
||||
|
||||
static inline bool _nl_memeq(const void *s1, const void *s2, size_t len)
|
||||
{
|
||||
return _nl_memcmp(s1, s2, len) == 0;
|
||||
}
|
||||
|
||||
static inline void *_nl_memcpy(void *restrict dest, const void *restrict src,
|
||||
size_t n)
|
||||
{
|
||||
/* Workaround undefined behavior in memcpy() with NULL pointers. */
|
||||
if (n == 0)
|
||||
return dest;
|
||||
|
||||
_nl_assert(src);
|
||||
return memcpy(dest, src, n);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_INT_IS_SIGNED(arg) (!(((typeof(arg))-1) > 0))
|
||||
|
||||
#define _NL_INT_SAME_SIGNEDNESS(arg1, arg2) \
|
||||
(_NL_INT_IS_SIGNED(arg1) == _NL_INT_IS_SIGNED(arg2))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* glib's MIN()/MAX() macros don't have function-like behavior, in that they evaluate
|
||||
* the argument possibly twice.
|
||||
*
|
||||
* Taken from systemd's MIN()/MAX() macros. */
|
||||
|
||||
#define _NL_MIN(a, b) __NL_MIN(_NL_UNIQ, a, _NL_UNIQ, b)
|
||||
#define __NL_MIN(aq, a, bq, b) \
|
||||
({ \
|
||||
typeof(a) _NL_UNIQ_T(A, aq) = (a); \
|
||||
typeof(b) _NL_UNIQ_T(B, bq) = (b); \
|
||||
\
|
||||
_NL_STATIC_ASSERT(_NL_INT_SAME_SIGNEDNESS(_NL_UNIQ_T(A, aq), \
|
||||
_NL_UNIQ_T(B, bq))); \
|
||||
\
|
||||
((_NL_UNIQ_T(A, aq) < _NL_UNIQ_T(B, bq)) ? _NL_UNIQ_T(A, aq) : \
|
||||
_NL_UNIQ_T(B, bq)); \
|
||||
})
|
||||
|
||||
#define _NL_MAX(a, b) __NL_MAX(_NL_UNIQ, a, _NL_UNIQ, b)
|
||||
#define __NL_MAX(aq, a, bq, b) \
|
||||
({ \
|
||||
typeof(a) _NL_UNIQ_T(A, aq) = (a); \
|
||||
typeof(b) _NL_UNIQ_T(B, bq) = (b); \
|
||||
\
|
||||
_NL_STATIC_ASSERT(_NL_INT_SAME_SIGNEDNESS(_NL_UNIQ_T(A, aq), \
|
||||
_NL_UNIQ_T(B, bq))); \
|
||||
\
|
||||
((_NL_UNIQ_T(A, aq) > _NL_UNIQ_T(B, bq)) ? _NL_UNIQ_T(A, aq) : \
|
||||
_NL_UNIQ_T(B, bq)); \
|
||||
})
|
||||
|
||||
#define _NL_CLAMP(x, low, high) \
|
||||
__NL_CLAMP(_NL_UNIQ, x, _NL_UNIQ, low, _NL_UNIQ, high)
|
||||
#define __NL_CLAMP(xq, x, lowq, low, highq, high) \
|
||||
({ \
|
||||
typeof(x) _NL_UNIQ_T(X, xq) = (x); \
|
||||
typeof(low) _NL_UNIQ_T(LOW, lowq) = (low); \
|
||||
typeof(high) _NL_UNIQ_T(HIGH, highq) = (high); \
|
||||
\
|
||||
_NL_STATIC_ASSERT(_NL_INT_SAME_SIGNEDNESS( \
|
||||
_NL_UNIQ_T(X, xq), _NL_UNIQ_T(LOW, lowq))); \
|
||||
_NL_STATIC_ASSERT(_NL_INT_SAME_SIGNEDNESS( \
|
||||
_NL_UNIQ_T(X, xq), _NL_UNIQ_T(HIGH, highq))); \
|
||||
\
|
||||
((_NL_UNIQ_T(X, xq) > _NL_UNIQ_T(HIGH, highq)) ? \
|
||||
_NL_UNIQ_T(HIGH, highq) : \
|
||||
(_NL_UNIQ_T(X, xq) < _NL_UNIQ_T(LOW, lowq)) ? \
|
||||
_NL_UNIQ_T(LOW, lowq) : \
|
||||
_NL_UNIQ_T(X, xq)); \
|
||||
})
|
||||
|
||||
#define _NL_MAX_WITH_CMP(cmp, a, b) \
|
||||
({ \
|
||||
typeof(a) _a = (a); \
|
||||
typeof(b) _b = (b); \
|
||||
\
|
||||
(((cmp(_a, _b)) >= 0) ? _a : _b); \
|
||||
})
|
||||
|
||||
/* evaluates to (void) if _A or _B are not constant or of different types */
|
||||
#define _NL_CONST_MAX(_A, _B) \
|
||||
(__builtin_choose_expr( \
|
||||
(__builtin_constant_p(_A) && __builtin_constant_p(_B) && \
|
||||
__builtin_types_compatible_p(typeof(_A), typeof(_B))), \
|
||||
((_A) > (_B)) ? (_A) : (_B), ((void)0)))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_CMP_RETURN(c) \
|
||||
do { \
|
||||
const int _cc = (c); \
|
||||
\
|
||||
if (_cc) \
|
||||
return _cc < 0 ? -1 : 1; \
|
||||
} while (0)
|
||||
|
||||
#define _NL_CMP_RETURN_DIRECT(c) \
|
||||
/* Usually we want that our CMP functions return strictly
|
||||
* -1, 0, or 1. _NL_CMP_RETURN_DIRECT() is like _NL_CMP_RETURN(),
|
||||
* except, it does not clamp the integer value. */ \
|
||||
do { \
|
||||
const int _cc = (c); \
|
||||
\
|
||||
if (_cc) \
|
||||
return _cc; \
|
||||
} while (0)
|
||||
|
||||
#define _NL_CMP_SELF(a, b) \
|
||||
do { \
|
||||
typeof(a) _a = (a); \
|
||||
typeof(b) _b = (b); \
|
||||
\
|
||||
if (_a == _b) \
|
||||
return 0; \
|
||||
if (!_a) \
|
||||
return -1; \
|
||||
if (!_b) \
|
||||
return 1; \
|
||||
} while (0)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_CMP_DIRECT(a, b) \
|
||||
do { \
|
||||
typeof(a) _a = (a); \
|
||||
typeof(b) _b = (b); \
|
||||
\
|
||||
_NL_STATIC_ASSERT(_NL_INT_SAME_SIGNEDNESS(_a, _b)); \
|
||||
\
|
||||
if (_a != _b) \
|
||||
return (_a < _b) ? -1 : 1; \
|
||||
} while (0)
|
||||
|
||||
#define _NL_CMP_DIRECT_UNSAFE(a, b) \
|
||||
/* This variant is "unsafe", because it evaluates the arguments more then once.
|
||||
* This is only useful for bitfields, for which typeof() doesn't work.
|
||||
* Don't use otherwise. */ \
|
||||
do { \
|
||||
if ((a) != (b)) \
|
||||
return ((a) < (b)) ? -1 : 1; \
|
||||
} while (0)
|
||||
|
||||
/* In the general case, direct pointer comparison is undefined behavior in C.
|
||||
* Avoid that by casting pointers to void* and then to uintptr_t. This comparison
|
||||
* is not really meaningful, except that it provides some kind of stable sort order
|
||||
* between pointers (that can otherwise not be compared). */
|
||||
#define _NL_CMP_DIRECT_PTR(a, b) \
|
||||
_NL_CMP_DIRECT(_nl_ptr_to_uintptr(a), _nl_ptr_to_uintptr(b))
|
||||
|
||||
#define _NL_CMP_DIRECT_BOOL(a, b) _NL_CMP_DIRECT(!!(a), !!(b))
|
||||
|
||||
#define _NL_CMP_DIRECT_MEMCMP(a, b, size) \
|
||||
_NL_CMP_RETURN(_nl_memcmp((a), (b), (size)))
|
||||
|
||||
#define _NL_CMP_DIRECT_STRCMP(a, b) _NL_CMP_RETURN_DIRECT(strcmp((a), (b)))
|
||||
|
||||
#define _NL_CMP_DIRECT_STRCMP0(a, b) \
|
||||
_NL_CMP_RETURN_DIRECT(_nl_strcmp0((a), (b)))
|
||||
|
||||
#define _NL_CMP_DIRECT_STR_INTERNED(a, b) \
|
||||
/* This is interned strings, which are first checked for equality only using pointer
|
||||
* comparison. Only in case of differences, the sort order is still determined by strcmp(). */ \
|
||||
do { \
|
||||
const char *const _a = (a); \
|
||||
const char *const _b = (b); \
|
||||
\
|
||||
if (_a != _b) \
|
||||
_NL_CMP_RETURN_DIRECT(_nl_strcmp0(_a, _b)); \
|
||||
} while (0)
|
||||
|
||||
#define _NL_CMP_DIRECT_IN6ADDR(a, b) \
|
||||
do { \
|
||||
const struct in6_addr *const _a = (a); \
|
||||
const struct in6_addr *const _b = (b); \
|
||||
\
|
||||
_NL_CMP_RETURN(memcmp(_a, _b, sizeof(struct in6_addr))); \
|
||||
} while (0)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_CMP_FIELD(a, b, field) _NL_CMP_DIRECT(((a)->field), ((b)->field))
|
||||
|
||||
#define _NL_CMP_FIELD_UNSAFE(a, b, field) \
|
||||
/* This variant is "unsafe", because it evaluates the arguments more then once.
|
||||
* This is only useful for bitfields, for which typeof() doesn't work.
|
||||
* Don't use otherwise. */ \
|
||||
_NL_CMP_DIRECT_UNSAFE(((a)->field), ((b)->field))
|
||||
|
||||
#define _NL_CMP_FIELD_BOOL(a, b, field) \
|
||||
_NL_CMP_DIRECT_BOOL(((a)->field), ((b)->field))
|
||||
|
||||
#define _NL_CMP_FIELD_STR(a, b, field) \
|
||||
_NL_CMP_DIRECT_STRCMP(((a)->field), ((b)->field))
|
||||
|
||||
#define _NL_CMP_FIELD_STR0(a, b, field) \
|
||||
_NL_CMP_DIRECT_STRCMP0(((a)->field), ((b)->field))
|
||||
|
||||
#define _NL_CMP_FIELD_STR_INTERNED(a, b, field) \
|
||||
_NL_CMP_DIRECT_STR_INTERNED(((a)->field), ((b)->field))
|
||||
|
||||
#define _NL_CMP_FIELD_MEMCMP_LEN(a, b, field, len) \
|
||||
_NL_CMP_DIRECT_MEMCMP(&((a)->field), &((b)->field), \
|
||||
_NL_MIN(len, sizeof((a)->field)))
|
||||
|
||||
#define _NL_CMP_FIELD_MEMCMP(a, b, field) \
|
||||
_NL_CMP_DIRECT_MEMCMP(&((a)->field), &((b)->field), sizeof((a)->field))
|
||||
|
||||
#define _NL_CMP_FIELD_IN6ADDR(a, b, field) \
|
||||
_NL_CMP_DIRECT_IN6ADDR(&((a)->field), &((b)->field))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* internal macro to calculate the size of a struct @type up to (and including) @field.
|
||||
* this will be used for .minlen policy fields, so that we require only a field of up
|
||||
* to the given size. */
|
||||
#define _nl_offsetofend(type, field) \
|
||||
(offsetof(type, field) + sizeof(((type *)NULL)->field))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _nl_clear_pointer(pp, destroy) \
|
||||
({ \
|
||||
__typeof__(*(pp)) *_pp = (pp); \
|
||||
__typeof__(*_pp) _p; \
|
||||
int _changed = 0; \
|
||||
\
|
||||
if (_pp && (_p = *_pp)) { \
|
||||
_nl_unused const void *const _p_check_is_pointer = _p; \
|
||||
\
|
||||
*_pp = NULL; \
|
||||
\
|
||||
(destroy)(_p); \
|
||||
\
|
||||
_changed = 1; \
|
||||
} \
|
||||
_changed; \
|
||||
})
|
||||
|
||||
#define _nl_clear_free(pp) _nl_clear_pointer(pp, free)
|
||||
|
||||
#define _nl_steal_pointer(pp) \
|
||||
({ \
|
||||
__typeof__(*(pp)) *const _pp = (pp); \
|
||||
__typeof__(*_pp) _p = NULL; \
|
||||
\
|
||||
if (_pp && (_p = *_pp)) { \
|
||||
*_pp = NULL; \
|
||||
} \
|
||||
\
|
||||
_p; \
|
||||
})
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _nl_malloc_maybe_a(alloca_maxlen, bytes, to_free) \
|
||||
({ \
|
||||
const size_t _bytes = (bytes); \
|
||||
__typeof__(to_free) _to_free = (to_free); \
|
||||
__typeof__(*_to_free) _ptr; \
|
||||
\
|
||||
_NL_STATIC_ASSERT((alloca_maxlen) <= 500); \
|
||||
_nl_assert(_to_free && !*_to_free); \
|
||||
\
|
||||
if (_bytes <= (alloca_maxlen)) { \
|
||||
_ptr = alloca(_bytes); \
|
||||
} else { \
|
||||
_ptr = malloc(_bytes); \
|
||||
*_to_free = _ptr; \
|
||||
}; \
|
||||
\
|
||||
_ptr; \
|
||||
})
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline char *_nl_strncpy_trunc(char *dst, const char *src, size_t len)
|
||||
{
|
||||
/* we don't use/reimplement strlcpy(), because we want the fill-all-with-NUL
|
||||
* behavior of strncpy(). This is just strncpy() with gracefully handling truncation
|
||||
* (and disabling the "-Wstringop-truncation" warning).
|
||||
*
|
||||
* Note that truncation is silently accepted.
|
||||
*/
|
||||
|
||||
_NL_PRAGMA_WARNING_DISABLE("-Wstringop-truncation");
|
||||
_NL_PRAGMA_WARNING_DISABLE("-Wstringop-overflow");
|
||||
|
||||
if (len > 0) {
|
||||
_nl_assert(dst);
|
||||
_nl_assert(src);
|
||||
|
||||
strncpy(dst, src, len);
|
||||
|
||||
dst[len - 1] = '\0';
|
||||
}
|
||||
|
||||
_NL_PRAGMA_WARNING_REENABLE;
|
||||
_NL_PRAGMA_WARNING_REENABLE;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
static inline char *_nl_strncpy_assert(char *dst, const char *src, size_t len)
|
||||
{
|
||||
/* we don't use/reimplement strlcpy(), because we want the fill-all-with-NUL
|
||||
* behavior of strncpy(). This is just strncpy() with assertion against truncation
|
||||
* (and disabling the "-Wstringop-truncation" warning).
|
||||
*
|
||||
* Note that truncation is still a bug and there is an _nl_assert()
|
||||
* against that.
|
||||
*/
|
||||
|
||||
_NL_PRAGMA_WARNING_DISABLE("-Wstringop-truncation");
|
||||
_NL_PRAGMA_WARNING_DISABLE("-Wstringop-overflow");
|
||||
|
||||
if (len > 0) {
|
||||
_nl_assert(dst);
|
||||
_nl_assert(src);
|
||||
|
||||
strncpy(dst, src, len);
|
||||
|
||||
_nl_assert(dst[len - 1] == '\0');
|
||||
|
||||
dst[len - 1] = '\0';
|
||||
}
|
||||
|
||||
_NL_PRAGMA_WARNING_REENABLE;
|
||||
_NL_PRAGMA_WARNING_REENABLE;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
#define _NL_RETURN_ON_ERR(cmd) \
|
||||
do { \
|
||||
int _err; \
|
||||
\
|
||||
_err = (cmd); \
|
||||
if (_err < 0) \
|
||||
return _err; \
|
||||
} while (0)
|
||||
|
||||
#define _NL_RETURN_E_ON_ERR(e, cmd) \
|
||||
do { \
|
||||
int _err; \
|
||||
\
|
||||
_err = (cmd); \
|
||||
if (_err < 0) { \
|
||||
_NL_STATIC_ASSERT((e) > 0); \
|
||||
return -(e); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* _NL_RETURN_ON_PUT_ERR() shall only be used with a put command (nla_put or nlmsg_append).
|
||||
* These commands can either fail with a regular error code (which gets propagated)
|
||||
* or with -NLE_NOMEM. However, they don't really try to allocate memory, so we don't
|
||||
* want to propagate -NLE_NOMEM. Instead, we coerce such failure to -NLE_MSGSIZE. */
|
||||
#define _NL_RETURN_ON_PUT_ERR(put_cmd) \
|
||||
do { \
|
||||
int _err; \
|
||||
\
|
||||
_err = (put_cmd); \
|
||||
if (_err < 0) { \
|
||||
if (_err == -NLE_NOMEM) { \
|
||||
/* nla_put() returns -NLE_NOMEM in case of out of buffer size. We don't
|
||||
* want to propagate that error and map it to -NLE_MSGSIZE. */ \
|
||||
return -NLE_MSGSIZE; \
|
||||
} \
|
||||
/* any other error can only be due to invalid parameters. Propagate the
|
||||
* error, however also assert that it cannot be reached. */ \
|
||||
_nl_assert_not_reached(); \
|
||||
return _err; \
|
||||
} else \
|
||||
_nl_assert(_err == 0); \
|
||||
} while (0)
|
||||
|
||||
static inline int _nl_close(int fd)
|
||||
{
|
||||
int r;
|
||||
|
||||
r = close(fd);
|
||||
_nl_assert(r == 0 || fd < 0 || errno != EBADF);
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline void *_nl_memdup(const void *ptr, size_t len)
|
||||
{
|
||||
void *p;
|
||||
|
||||
if (len == 0) {
|
||||
/* malloc() leaves it implementation defined whether to return NULL.
|
||||
* Callers rely on returning NULL if len is zero. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p = malloc(len);
|
||||
if (!p)
|
||||
return NULL;
|
||||
memcpy(p, ptr, len);
|
||||
return p;
|
||||
}
|
||||
|
||||
#define _nl_memdup_ptr(ptr) ((__typeof__(ptr))_nl_memdup((ptr), sizeof(*(ptr))))
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline size_t _nl_addr_family_to_size(int addr_family)
|
||||
{
|
||||
if (addr_family == AF_INET)
|
||||
return sizeof(in_addr_t);
|
||||
if (addr_family == AF_INET6)
|
||||
return sizeof(struct in6_addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef union {
|
||||
in_addr_t addr4;
|
||||
struct in_addr a4;
|
||||
struct in6_addr a6;
|
||||
} _NLIPAddr;
|
||||
|
||||
static inline char *_nl_inet_ntop(int addr_family, const void *addr, char *buf)
|
||||
{
|
||||
char *r;
|
||||
|
||||
_nl_assert_addr_family(addr_family);
|
||||
_nl_assert(addr);
|
||||
|
||||
/* inet_ntop() is documented to fail, but if we pass a known address family
|
||||
* and a suitably large buffer, it cannot. Assert for that. */
|
||||
|
||||
r = (char *)inet_ntop(addr_family, addr, buf,
|
||||
(addr_family == AF_INET) ? INET_ADDRSTRLEN :
|
||||
INET6_ADDRSTRLEN);
|
||||
_nl_assert(r == buf);
|
||||
_nl_assert(strlen(r) < ((addr_family == AF_INET) ? INET_ADDRSTRLEN :
|
||||
INET6_ADDRSTRLEN));
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline char *_nl_inet_ntop_dup(int addr_family, const void *addr)
|
||||
{
|
||||
return (char *)_nl_inet_ntop(addr_family, addr,
|
||||
malloc((addr_family == AF_INET) ?
|
||||
INET_ADDRSTRLEN :
|
||||
INET6_ADDRSTRLEN));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline size_t _nl_ptrarray_len_(const void *const *ptr, ssize_t len)
|
||||
{
|
||||
size_t l = 0;
|
||||
|
||||
if (len >= 0)
|
||||
return len;
|
||||
if (ptr) {
|
||||
while (ptr[l])
|
||||
l++;
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
#define _nl_ptrarray_len(ptr, len) \
|
||||
({ \
|
||||
typeof(*(ptr)) *const _ptr = (ptr); \
|
||||
\
|
||||
_nl_ptrarray_len_((const void *const *)_ptr, (len)); \
|
||||
})
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _NL_AUTO_DEFINE_FCN_VOID0(CastType, name, func) \
|
||||
static inline void name(void *v) \
|
||||
{ \
|
||||
if (*((CastType *)v)) \
|
||||
func(*((CastType *)v)); \
|
||||
} \
|
||||
struct _nl_dummy_for_tailing_semicolon
|
||||
|
||||
#define _NL_AUTO_DEFINE_FCN_STRUCT(CastType, name, func) \
|
||||
static inline void name(CastType *v) \
|
||||
{ \
|
||||
if (v) \
|
||||
func(v); \
|
||||
} \
|
||||
struct _nl_dummy_for_tailing_semicolon
|
||||
|
||||
#define _NL_AUTO_DEFINE_FCN_TYPED0(CastType, name, func) \
|
||||
static inline void name(CastType *v) \
|
||||
{ \
|
||||
if (*v) \
|
||||
func(*v); \
|
||||
} \
|
||||
struct _nl_dummy_for_tailing_semicolon
|
||||
|
||||
#define _NL_AUTO_DEFINE_FCN_INDIRECT0(CastType, name, func) \
|
||||
static inline void name(CastType *v) \
|
||||
{ \
|
||||
if (*v) \
|
||||
func(v); \
|
||||
} \
|
||||
struct _nl_dummy_for_tailing_semicolon
|
||||
|
||||
#define _nl_auto_free _nl_auto(_nl_auto_free_fcn)
|
||||
_NL_AUTO_DEFINE_FCN_VOID0(void *, _nl_auto_free_fcn, free);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _nl_swap(p_a, p_b) \
|
||||
do { \
|
||||
typeof(*(p_a)) *const _p_a = (p_a); \
|
||||
typeof(*(p_a)) *const _p_b = (p_b); \
|
||||
typeof(*(p_a)) _tmp; \
|
||||
\
|
||||
_tmp = *_p_a; \
|
||||
*_p_a = *_p_b; \
|
||||
*_p_b = _tmp; \
|
||||
} while (0)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define NSEC_PER_SEC 1000000000L
|
||||
|
||||
struct trans_tbl {
|
||||
uint64_t i;
|
||||
const char *a;
|
||||
};
|
||||
|
||||
#define __ADD(id, name) { .i = id, .a = #name }
|
||||
|
||||
#define BUG() \
|
||||
do { \
|
||||
fprintf(stderr, "BUG at file position %s:%d:%s\n", __FILE__, \
|
||||
__LINE__, __func__); \
|
||||
assert(0); \
|
||||
} while (0)
|
||||
|
||||
#define BUG_ON(condition) \
|
||||
do { \
|
||||
if (condition) \
|
||||
BUG(); \
|
||||
} while (0)
|
||||
|
||||
#define APPBUG(msg) \
|
||||
do { \
|
||||
fprintf(stderr, "APPLICATION BUG: %s:%d:%s: %s\n", __FILE__, \
|
||||
__LINE__, __func__, msg); \
|
||||
assert(0); \
|
||||
} while (0)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef DISABLE_PTHREADS
|
||||
#define NL_LOCK(NAME) pthread_mutex_t(NAME) = PTHREAD_MUTEX_INITIALIZER
|
||||
#define NL_RW_LOCK(NAME) pthread_rwlock_t(NAME) = PTHREAD_RWLOCK_INITIALIZER
|
||||
|
||||
static inline void nl_lock(pthread_mutex_t *lock)
|
||||
{
|
||||
pthread_mutex_lock(lock);
|
||||
}
|
||||
|
||||
static inline void nl_unlock(pthread_mutex_t *lock)
|
||||
{
|
||||
pthread_mutex_unlock(lock);
|
||||
}
|
||||
|
||||
static inline void nl_read_lock(pthread_rwlock_t *lock)
|
||||
{
|
||||
pthread_rwlock_rdlock(lock);
|
||||
}
|
||||
|
||||
static inline void nl_read_unlock(pthread_rwlock_t *lock)
|
||||
{
|
||||
pthread_rwlock_unlock(lock);
|
||||
}
|
||||
|
||||
static inline void nl_write_lock(pthread_rwlock_t *lock)
|
||||
{
|
||||
pthread_rwlock_wrlock(lock);
|
||||
}
|
||||
|
||||
static inline void nl_write_unlock(pthread_rwlock_t *lock)
|
||||
{
|
||||
pthread_rwlock_unlock(lock);
|
||||
}
|
||||
|
||||
#else
|
||||
#define NL_LOCK(NAME) int __unused_lock_##NAME _nl_unused
|
||||
#define NL_RW_LOCK(NAME) int __unused_lock_##NAME _nl_unused
|
||||
|
||||
#define nl_lock(LOCK) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define nl_unlock(LOCK) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define nl_read_lock(LOCK) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define nl_read_unlock(LOCK) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define nl_write_lock(LOCK) \
|
||||
do { \
|
||||
} while (0)
|
||||
#define nl_write_unlock(LOCK) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#endif /* __NETLINK_BASE_NL_BASE_UTILS_H__ */
|
||||
@@ -0,0 +1,242 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* atm.h - general ATM declarations */
|
||||
|
||||
/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
|
||||
|
||||
|
||||
/*
|
||||
* WARNING: User-space programs should not #include <linux/atm.h> directly.
|
||||
* Instead, #include <atm.h>
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_ATM_H
|
||||
#define _LINUX_ATM_H
|
||||
|
||||
/*
|
||||
* BEGIN_xx and END_xx markers are used for automatic generation of
|
||||
* documentation. Do not change them.
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/atmapi.h>
|
||||
#include <linux/atmsap.h>
|
||||
#include <linux/atmioc.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
|
||||
/* general ATM constants */
|
||||
#define ATM_CELL_SIZE 53 /* ATM cell size incl. header */
|
||||
#define ATM_CELL_PAYLOAD 48 /* ATM payload size */
|
||||
#define ATM_AAL0_SDU 52 /* AAL0 SDU size */
|
||||
#define ATM_MAX_AAL34_PDU 65535 /* maximum AAL3/4 PDU payload */
|
||||
#define ATM_AAL5_TRAILER 8 /* AAL5 trailer size */
|
||||
#define ATM_MAX_AAL5_PDU 65535 /* maximum AAL5 PDU payload */
|
||||
#define ATM_MAX_CDV 9999 /* maximum (default) CDV */
|
||||
#define ATM_NOT_RSV_VCI 32 /* first non-reserved VCI value */
|
||||
|
||||
#define ATM_MAX_VPI 255 /* maximum VPI at the UNI */
|
||||
#define ATM_MAX_VPI_NNI 4096 /* maximum VPI at the NNI */
|
||||
#define ATM_MAX_VCI 65535 /* maximum VCI */
|
||||
|
||||
|
||||
/* "protcol" values for the socket system call */
|
||||
#define ATM_NO_AAL 0 /* AAL not specified */
|
||||
#define ATM_AAL0 13 /* "raw" ATM cells */
|
||||
#define ATM_AAL1 1 /* AAL1 (CBR) */
|
||||
#define ATM_AAL2 2 /* AAL2 (VBR) */
|
||||
#define ATM_AAL34 3 /* AAL3/4 (data) */
|
||||
#define ATM_AAL5 5 /* AAL5 (data) */
|
||||
|
||||
/*
|
||||
* socket option name coding functions
|
||||
*
|
||||
* Note that __SO_ENCODE and __SO_LEVEL are somewhat a hack since the
|
||||
* << 22 only reserves 9 bits for the level. On some architectures
|
||||
* SOL_SOCKET is 0xFFFF, so that's a bit of a problem
|
||||
*/
|
||||
|
||||
#define __SO_ENCODE(l,n,t) ((((l) & 0x1FF) << 22) | ((n) << 16) | \
|
||||
sizeof(t))
|
||||
#define __SO_LEVEL_MATCH(c,m) (((c) >> 22) == ((m) & 0x1FF))
|
||||
#define __SO_NUMBER(c) (((c) >> 16) & 0x3f)
|
||||
#define __SO_SIZE(c) ((c) & 0x3fff)
|
||||
|
||||
/*
|
||||
* ATM layer
|
||||
*/
|
||||
|
||||
#define SO_SETCLP __SO_ENCODE(SOL_ATM,0,int)
|
||||
/* set CLP bit value - TODO */
|
||||
#define SO_CIRANGE __SO_ENCODE(SOL_ATM,1,struct atm_cirange)
|
||||
/* connection identifier range; socket must be
|
||||
bound or connected */
|
||||
#define SO_ATMQOS __SO_ENCODE(SOL_ATM,2,struct atm_qos)
|
||||
/* Quality of Service setting */
|
||||
#define SO_ATMSAP __SO_ENCODE(SOL_ATM,3,struct atm_sap)
|
||||
/* Service Access Point */
|
||||
#define SO_ATMPVC __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc)
|
||||
/* "PVC" address (also for SVCs); get only */
|
||||
#define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int)
|
||||
/* make this vc a p2mp */
|
||||
|
||||
|
||||
/*
|
||||
* Note @@@: since the socket layers don't really distinguish the control and
|
||||
* the data plane but generally seems to be data plane-centric, any layer is
|
||||
* about equally wrong for the SAP. If you have a better idea about this,
|
||||
* please speak up ...
|
||||
*/
|
||||
|
||||
|
||||
/* ATM cell header (for AAL0) */
|
||||
|
||||
/* BEGIN_CH */
|
||||
#define ATM_HDR_GFC_MASK 0xf0000000
|
||||
#define ATM_HDR_GFC_SHIFT 28
|
||||
#define ATM_HDR_VPI_MASK 0x0ff00000
|
||||
#define ATM_HDR_VPI_SHIFT 20
|
||||
#define ATM_HDR_VCI_MASK 0x000ffff0
|
||||
#define ATM_HDR_VCI_SHIFT 4
|
||||
#define ATM_HDR_PTI_MASK 0x0000000e
|
||||
#define ATM_HDR_PTI_SHIFT 1
|
||||
#define ATM_HDR_CLP 0x00000001
|
||||
/* END_CH */
|
||||
|
||||
|
||||
/* PTI codings */
|
||||
|
||||
/* BEGIN_PTI */
|
||||
#define ATM_PTI_US0 0 /* user data cell, congestion not exp, SDU-type 0 */
|
||||
#define ATM_PTI_US1 1 /* user data cell, congestion not exp, SDU-type 1 */
|
||||
#define ATM_PTI_UCES0 2 /* user data cell, cong. experienced, SDU-type 0 */
|
||||
#define ATM_PTI_UCES1 3 /* user data cell, cong. experienced, SDU-type 1 */
|
||||
#define ATM_PTI_SEGF5 4 /* segment OAM F5 flow related cell */
|
||||
#define ATM_PTI_E2EF5 5 /* end-to-end OAM F5 flow related cell */
|
||||
#define ATM_PTI_RSV_RM 6 /* reserved for traffic control/resource mgmt */
|
||||
#define ATM_PTI_RSV 7 /* reserved */
|
||||
/* END_PTI */
|
||||
|
||||
|
||||
/*
|
||||
* The following items should stay in linux/atm.h, which should be linked to
|
||||
* netatm/atm.h
|
||||
*/
|
||||
|
||||
/* Traffic description */
|
||||
|
||||
#define ATM_NONE 0 /* no traffic */
|
||||
#define ATM_UBR 1
|
||||
#define ATM_CBR 2
|
||||
#define ATM_VBR 3
|
||||
#define ATM_ABR 4
|
||||
#define ATM_ANYCLASS 5 /* compatible with everything */
|
||||
|
||||
#define ATM_MAX_PCR -1 /* maximum available PCR */
|
||||
|
||||
struct atm_trafprm {
|
||||
unsigned char traffic_class; /* traffic class (ATM_UBR, ...) */
|
||||
int max_pcr; /* maximum PCR in cells per second */
|
||||
int pcr; /* desired PCR in cells per second */
|
||||
int min_pcr; /* minimum PCR in cells per second */
|
||||
int max_cdv; /* maximum CDV in microseconds */
|
||||
int max_sdu; /* maximum SDU in bytes */
|
||||
/* extra params for ABR */
|
||||
unsigned int icr; /* Initial Cell Rate (24-bit) */
|
||||
unsigned int tbe; /* Transient Buffer Exposure (24-bit) */
|
||||
unsigned int frtt : 24; /* Fixed Round Trip Time (24-bit) */
|
||||
unsigned int rif : 4; /* Rate Increment Factor (4-bit) */
|
||||
unsigned int rdf : 4; /* Rate Decrease Factor (4-bit) */
|
||||
unsigned int nrm_pres :1; /* nrm present bit */
|
||||
unsigned int trm_pres :1; /* rm present bit */
|
||||
unsigned int adtf_pres :1; /* adtf present bit */
|
||||
unsigned int cdf_pres :1; /* cdf present bit*/
|
||||
unsigned int nrm :3; /* Max # of Cells for each forward RM cell (3-bit) */
|
||||
unsigned int trm :3; /* Time between forward RM cells (3-bit) */
|
||||
unsigned int adtf :10; /* ACR Decrease Time Factor (10-bit) */
|
||||
unsigned int cdf :3; /* Cutoff Decrease Factor (3-bit) */
|
||||
unsigned int spare :9; /* spare bits */
|
||||
};
|
||||
|
||||
struct atm_qos {
|
||||
struct atm_trafprm txtp; /* parameters in TX direction */
|
||||
struct atm_trafprm rxtp __ATM_API_ALIGN;
|
||||
/* parameters in RX direction */
|
||||
unsigned char aal __ATM_API_ALIGN;
|
||||
};
|
||||
|
||||
/* PVC addressing */
|
||||
|
||||
#define ATM_ITF_ANY -1 /* "magic" PVC address values */
|
||||
#define ATM_VPI_ANY -1
|
||||
#define ATM_VCI_ANY -1
|
||||
#define ATM_VPI_UNSPEC -2
|
||||
#define ATM_VCI_UNSPEC -2
|
||||
|
||||
|
||||
struct sockaddr_atmpvc {
|
||||
unsigned short sap_family; /* address family, AF_ATMPVC */
|
||||
struct { /* PVC address */
|
||||
short itf; /* ATM interface */
|
||||
short vpi; /* VPI (only 8 bits at UNI) */
|
||||
int vci; /* VCI (only 16 bits at UNI) */
|
||||
} sap_addr __ATM_API_ALIGN; /* PVC address */
|
||||
};
|
||||
|
||||
/* SVC addressing */
|
||||
|
||||
#define ATM_ESA_LEN 20 /* ATM End System Address length */
|
||||
#define ATM_E164_LEN 12 /* maximum E.164 number length */
|
||||
|
||||
#define ATM_AFI_DCC 0x39 /* DCC ATM Format */
|
||||
#define ATM_AFI_ICD 0x47 /* ICD ATM Format */
|
||||
#define ATM_AFI_E164 0x45 /* E.164 ATM Format */
|
||||
#define ATM_AFI_LOCAL 0x49 /* Local ATM Format */
|
||||
|
||||
#define ATM_AFI_DCC_GROUP 0xBD /* DCC ATM Group Format */
|
||||
#define ATM_AFI_ICD_GROUP 0xC5 /* ICD ATM Group Format */
|
||||
#define ATM_AFI_E164_GROUP 0xC3 /* E.164 ATM Group Format */
|
||||
#define ATM_AFI_LOCAL_GROUP 0xC7 /* Local ATM Group Format */
|
||||
|
||||
#define ATM_LIJ_NONE 0 /* no leaf-initiated join */
|
||||
#define ATM_LIJ 1 /* request joining */
|
||||
#define ATM_LIJ_RPJ 2 /* set to root-prompted join */
|
||||
#define ATM_LIJ_NJ 3 /* set to network join */
|
||||
|
||||
|
||||
struct sockaddr_atmsvc {
|
||||
unsigned short sas_family; /* address family, AF_ATMSVC */
|
||||
struct { /* SVC address */
|
||||
unsigned char prv[ATM_ESA_LEN];/* private ATM address */
|
||||
char pub[ATM_E164_LEN+1]; /* public address (E.164) */
|
||||
/* unused addresses must be bzero'ed */
|
||||
char lij_type; /* role in LIJ call; one of ATM_LIJ* */
|
||||
__u32 lij_id; /* LIJ call identifier */
|
||||
} sas_addr __ATM_API_ALIGN; /* SVC address */
|
||||
};
|
||||
|
||||
|
||||
static __inline__ int atmsvc_addr_in_use(struct sockaddr_atmsvc addr)
|
||||
{
|
||||
return *addr.sas_addr.prv || *addr.sas_addr.pub;
|
||||
}
|
||||
|
||||
|
||||
static __inline__ int atmpvc_addr_in_use(struct sockaddr_atmpvc addr)
|
||||
{
|
||||
return addr.sap_addr.itf || addr.sap_addr.vpi || addr.sap_addr.vci;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Some stuff for linux/sockios.h
|
||||
*/
|
||||
|
||||
struct atmif_sioc {
|
||||
int number;
|
||||
int length;
|
||||
void *arg;
|
||||
};
|
||||
|
||||
|
||||
typedef unsigned short atm_backend_t;
|
||||
#endif /* _LINUX_ATM_H */
|
||||
@@ -0,0 +1,30 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* atmapi.h - ATM API user space/kernel compatibility */
|
||||
|
||||
/* Written 1999,2000 by Werner Almesberger, EPFL ICA */
|
||||
|
||||
|
||||
#ifndef _LINUX_ATMAPI_H
|
||||
#define _LINUX_ATMAPI_H
|
||||
|
||||
#if defined(__sparc__) || defined(__ia64__)
|
||||
/* such alignment is not required on 32 bit sparcs, but we can't
|
||||
figure that we are on a sparc64 while compiling user-space programs. */
|
||||
#define __ATM_API_ALIGN __attribute__((aligned(8)))
|
||||
#else
|
||||
#define __ATM_API_ALIGN
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Opaque type for kernel pointers. Note that _ is never accessed. We need
|
||||
* the struct in order hide the array, so that we can make simple assignments
|
||||
* instead of being forced to use memcpy. It also improves error reporting for
|
||||
* code that still assumes that we're passing unsigned longs.
|
||||
*
|
||||
* Convention: NULL pointers are passed as a field of all zeroes.
|
||||
*/
|
||||
|
||||
typedef struct { unsigned char _[8]; } __ATM_API_ALIGN atm_kptr_t;
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,42 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* atmioc.h - ranges for ATM-related ioctl numbers */
|
||||
|
||||
/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
|
||||
|
||||
|
||||
/*
|
||||
* See https://icawww1.epfl.ch/linux-atm/magic.html for the complete list of
|
||||
* "magic" ioctl numbers.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _LINUX_ATMIOC_H
|
||||
#define _LINUX_ATMIOC_H
|
||||
|
||||
#include <asm/ioctl.h>
|
||||
/* everybody including atmioc.h will also need _IO{,R,W,WR} */
|
||||
|
||||
#define ATMIOC_PHYCOM 0x00 /* PHY device common ioctls, globally unique */
|
||||
#define ATMIOC_PHYCOM_END 0x0f
|
||||
#define ATMIOC_PHYTYP 0x10 /* PHY dev type ioctls, unique per PHY type */
|
||||
#define ATMIOC_PHYTYP_END 0x2f
|
||||
#define ATMIOC_PHYPRV 0x30 /* PHY dev private ioctls, unique per driver */
|
||||
#define ATMIOC_PHYPRV_END 0x4f
|
||||
#define ATMIOC_SARCOM 0x50 /* SAR device common ioctls, globally unique */
|
||||
#define ATMIOC_SARCOM_END 0x50
|
||||
#define ATMIOC_SARPRV 0x60 /* SAR dev private ioctls, unique per driver */
|
||||
#define ATMIOC_SARPRV_END 0x7f
|
||||
#define ATMIOC_ITF 0x80 /* Interface ioctls, globally unique */
|
||||
#define ATMIOC_ITF_END 0x8f
|
||||
#define ATMIOC_BACKEND 0x90 /* ATM generic backend ioctls, u. per backend */
|
||||
#define ATMIOC_BACKEND_END 0xaf
|
||||
/* 0xb0-0xbf: Reserved for future use */
|
||||
#define ATMIOC_AREQUIPA 0xc0 /* Application requested IP over ATM, glob. u. */
|
||||
#define ATMIOC_LANE 0xd0 /* LAN Emulation, globally unique */
|
||||
#define ATMIOC_MPOA 0xd8 /* MPOA, globally unique */
|
||||
#define ATMIOC_CLIP 0xe0 /* Classical IP over ATM control, globally u. */
|
||||
#define ATMIOC_CLIP_END 0xef
|
||||
#define ATMIOC_SPECIAL 0xf0 /* Special-purpose controls, globally unique */
|
||||
#define ATMIOC_SPECIAL_END 0xff
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,163 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* atmsap.h - ATM Service Access Point addressing definitions */
|
||||
|
||||
/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
|
||||
|
||||
|
||||
#ifndef _LINUX_ATMSAP_H
|
||||
#define _LINUX_ATMSAP_H
|
||||
|
||||
#include <linux/atmapi.h>
|
||||
|
||||
/*
|
||||
* BEGIN_xx and END_xx markers are used for automatic generation of
|
||||
* documentation. Do not change them.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Layer 2 protocol identifiers
|
||||
*/
|
||||
|
||||
/* BEGIN_L2 */
|
||||
#define ATM_L2_NONE 0 /* L2 not specified */
|
||||
#define ATM_L2_ISO1745 0x01 /* Basic mode ISO 1745 */
|
||||
#define ATM_L2_Q291 0x02 /* ITU-T Q.291 (Rec. I.441) */
|
||||
#define ATM_L2_X25_LL 0x06 /* ITU-T X.25, link layer */
|
||||
#define ATM_L2_X25_ML 0x07 /* ITU-T X.25, multilink */
|
||||
#define ATM_L2_LAPB 0x08 /* Extended LAPB, half-duplex (Rec. T.71) */
|
||||
#define ATM_L2_HDLC_ARM 0x09 /* HDLC ARM (ISO/IEC 4335) */
|
||||
#define ATM_L2_HDLC_NRM 0x0a /* HDLC NRM (ISO/IEC 4335) */
|
||||
#define ATM_L2_HDLC_ABM 0x0b /* HDLC ABM (ISO/IEC 4335) */
|
||||
#define ATM_L2_ISO8802 0x0c /* LAN LLC (ISO/IEC 8802/2) */
|
||||
#define ATM_L2_X75 0x0d /* ITU-T X.75, SLP */
|
||||
#define ATM_L2_Q922 0x0e /* ITU-T Q.922 */
|
||||
#define ATM_L2_USER 0x10 /* user-specified */
|
||||
#define ATM_L2_ISO7776 0x11 /* ISO 7776 DTE-DTE */
|
||||
/* END_L2 */
|
||||
|
||||
|
||||
/*
|
||||
* Layer 3 protocol identifiers
|
||||
*/
|
||||
|
||||
/* BEGIN_L3 */
|
||||
#define ATM_L3_NONE 0 /* L3 not specified */
|
||||
#define ATM_L3_X25 0x06 /* ITU-T X.25, packet layer */
|
||||
#define ATM_L3_ISO8208 0x07 /* ISO/IEC 8208 */
|
||||
#define ATM_L3_X223 0x08 /* ITU-T X.223 | ISO/IEC 8878 */
|
||||
#define ATM_L3_ISO8473 0x09 /* ITU-T X.233 | ISO/IEC 8473 */
|
||||
#define ATM_L3_T70 0x0a /* ITU-T T.70 minimum network layer */
|
||||
#define ATM_L3_TR9577 0x0b /* ISO/IEC TR 9577 */
|
||||
#define ATM_L3_H310 0x0c /* ITU-T Recommendation H.310 */
|
||||
#define ATM_L3_H321 0x0d /* ITU-T Recommendation H.321 */
|
||||
#define ATM_L3_USER 0x10 /* user-specified */
|
||||
/* END_L3 */
|
||||
|
||||
|
||||
/*
|
||||
* High layer identifiers
|
||||
*/
|
||||
|
||||
/* BEGIN_HL */
|
||||
#define ATM_HL_NONE 0 /* HL not specified */
|
||||
#define ATM_HL_ISO 0x01 /* ISO */
|
||||
#define ATM_HL_USER 0x02 /* user-specific */
|
||||
#define ATM_HL_HLP 0x03 /* high layer profile - UNI 3.0 only */
|
||||
#define ATM_HL_VENDOR 0x04 /* vendor-specific application identifier */
|
||||
/* END_HL */
|
||||
|
||||
|
||||
/*
|
||||
* ITU-T coded mode of operation
|
||||
*/
|
||||
|
||||
/* BEGIN_IMD */
|
||||
#define ATM_IMD_NONE 0 /* mode not specified */
|
||||
#define ATM_IMD_NORMAL 1 /* normal mode of operation */
|
||||
#define ATM_IMD_EXTENDED 2 /* extended mode of operation */
|
||||
/* END_IMD */
|
||||
|
||||
/*
|
||||
* H.310 code points
|
||||
*/
|
||||
|
||||
#define ATM_TT_NONE 0 /* terminal type not specified */
|
||||
#define ATM_TT_RX 1 /* receive only */
|
||||
#define ATM_TT_TX 2 /* send only */
|
||||
#define ATM_TT_RXTX 3 /* receive and send */
|
||||
|
||||
#define ATM_MC_NONE 0 /* no multiplexing */
|
||||
#define ATM_MC_TS 1 /* transport stream (TS) */
|
||||
#define ATM_MC_TS_FEC 2 /* transport stream with forward error corr. */
|
||||
#define ATM_MC_PS 3 /* program stream (PS) */
|
||||
#define ATM_MC_PS_FEC 4 /* program stream with forward error corr. */
|
||||
#define ATM_MC_H221 5 /* ITU-T Rec. H.221 */
|
||||
|
||||
/*
|
||||
* SAP structures
|
||||
*/
|
||||
|
||||
#define ATM_MAX_HLI 8 /* maximum high-layer information length */
|
||||
|
||||
|
||||
struct atm_blli {
|
||||
unsigned char l2_proto; /* layer 2 protocol */
|
||||
union {
|
||||
struct {
|
||||
unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */
|
||||
/* absent */
|
||||
unsigned char window; /* window size (k), 1-127 (0 to omit) */
|
||||
} itu; /* ITU-T encoding */
|
||||
unsigned char user; /* user-specified l2 information */
|
||||
} l2;
|
||||
unsigned char l3_proto; /* layer 3 protocol */
|
||||
union {
|
||||
struct {
|
||||
unsigned char mode; /* mode of operation (ATM_IMD_xxx), 0 if */
|
||||
/* absent */
|
||||
unsigned char def_size; /* default packet size (log2), 4-12 (0 to */
|
||||
/* omit) */
|
||||
unsigned char window;/* packet window size, 1-127 (0 to omit) */
|
||||
} itu; /* ITU-T encoding */
|
||||
unsigned char user; /* user specified l3 information */
|
||||
struct { /* if l3_proto = ATM_L3_H310 */
|
||||
unsigned char term_type; /* terminal type */
|
||||
unsigned char fw_mpx_cap; /* forward multiplexing capability */
|
||||
/* only if term_type != ATM_TT_NONE */
|
||||
unsigned char bw_mpx_cap; /* backward multiplexing capability */
|
||||
/* only if term_type != ATM_TT_NONE */
|
||||
} h310;
|
||||
struct { /* if l3_proto = ATM_L3_TR9577 */
|
||||
unsigned char ipi; /* initial protocol id */
|
||||
unsigned char snap[5];/* IEEE 802.1 SNAP identifier */
|
||||
/* (only if ipi == NLPID_IEEE802_1_SNAP) */
|
||||
} tr9577;
|
||||
} l3;
|
||||
} __ATM_API_ALIGN;
|
||||
|
||||
|
||||
struct atm_bhli {
|
||||
unsigned char hl_type; /* high layer information type */
|
||||
unsigned char hl_length; /* length (only if hl_type == ATM_HL_USER || */
|
||||
/* hl_type == ATM_HL_ISO) */
|
||||
unsigned char hl_info[ATM_MAX_HLI];/* high layer information */
|
||||
};
|
||||
|
||||
|
||||
#define ATM_MAX_BLLI 3 /* maximum number of BLLI elements */
|
||||
|
||||
|
||||
struct atm_sap {
|
||||
struct atm_bhli bhli; /* local SAP, high-layer information */
|
||||
struct atm_blli blli[ATM_MAX_BLLI] __ATM_API_ALIGN;
|
||||
/* local SAP, low-layer info */
|
||||
};
|
||||
|
||||
|
||||
static __inline__ int blli_in_use(struct atm_blli blli)
|
||||
{
|
||||
return blli.l2_proto || blli.l3_proto;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,107 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
#ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H
|
||||
#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H
|
||||
|
||||
#ifndef __LITTLE_ENDIAN
|
||||
#define __LITTLE_ENDIAN 1234
|
||||
#endif
|
||||
#ifndef __LITTLE_ENDIAN_BITFIELD
|
||||
#define __LITTLE_ENDIAN_BITFIELD
|
||||
#endif
|
||||
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/swab.h>
|
||||
|
||||
#define __constant_htonl(x) ((__be32)___constant_swab32((x)))
|
||||
#define __constant_ntohl(x) ___constant_swab32((__be32)(x))
|
||||
#define __constant_htons(x) ((__be16)___constant_swab16((x)))
|
||||
#define __constant_ntohs(x) ___constant_swab16((__be16)(x))
|
||||
#define __constant_cpu_to_le64(x) ((__le64)(__u64)(x))
|
||||
#define __constant_le64_to_cpu(x) ((__u64)(__le64)(x))
|
||||
#define __constant_cpu_to_le32(x) ((__le32)(__u32)(x))
|
||||
#define __constant_le32_to_cpu(x) ((__u32)(__le32)(x))
|
||||
#define __constant_cpu_to_le16(x) ((__le16)(__u16)(x))
|
||||
#define __constant_le16_to_cpu(x) ((__u16)(__le16)(x))
|
||||
#define __constant_cpu_to_be64(x) ((__be64)___constant_swab64((x)))
|
||||
#define __constant_be64_to_cpu(x) ___constant_swab64((__u64)(__be64)(x))
|
||||
#define __constant_cpu_to_be32(x) ((__be32)___constant_swab32((x)))
|
||||
#define __constant_be32_to_cpu(x) ___constant_swab32((__u32)(__be32)(x))
|
||||
#define __constant_cpu_to_be16(x) ((__be16)___constant_swab16((x)))
|
||||
#define __constant_be16_to_cpu(x) ___constant_swab16((__u16)(__be16)(x))
|
||||
#define __cpu_to_le64(x) ((__le64)(__u64)(x))
|
||||
#define __le64_to_cpu(x) ((__u64)(__le64)(x))
|
||||
#define __cpu_to_le32(x) ((__le32)(__u32)(x))
|
||||
#define __le32_to_cpu(x) ((__u32)(__le32)(x))
|
||||
#define __cpu_to_le16(x) ((__le16)(__u16)(x))
|
||||
#define __le16_to_cpu(x) ((__u16)(__le16)(x))
|
||||
#define __cpu_to_be64(x) ((__be64)__swab64((x)))
|
||||
#define __be64_to_cpu(x) __swab64((__u64)(__be64)(x))
|
||||
#define __cpu_to_be32(x) ((__be32)__swab32((x)))
|
||||
#define __be32_to_cpu(x) __swab32((__u32)(__be32)(x))
|
||||
#define __cpu_to_be16(x) ((__be16)__swab16((x)))
|
||||
#define __be16_to_cpu(x) __swab16((__u16)(__be16)(x))
|
||||
|
||||
static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
|
||||
{
|
||||
return (__le64)*p;
|
||||
}
|
||||
static __always_inline __u64 __le64_to_cpup(const __le64 *p)
|
||||
{
|
||||
return (__u64)*p;
|
||||
}
|
||||
static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
|
||||
{
|
||||
return (__le32)*p;
|
||||
}
|
||||
static __always_inline __u32 __le32_to_cpup(const __le32 *p)
|
||||
{
|
||||
return (__u32)*p;
|
||||
}
|
||||
static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
|
||||
{
|
||||
return (__le16)*p;
|
||||
}
|
||||
static __always_inline __u16 __le16_to_cpup(const __le16 *p)
|
||||
{
|
||||
return (__u16)*p;
|
||||
}
|
||||
static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
|
||||
{
|
||||
return (__be64)__swab64p(p);
|
||||
}
|
||||
static __always_inline __u64 __be64_to_cpup(const __be64 *p)
|
||||
{
|
||||
return __swab64p((__u64 *)p);
|
||||
}
|
||||
static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
|
||||
{
|
||||
return (__be32)__swab32p(p);
|
||||
}
|
||||
static __always_inline __u32 __be32_to_cpup(const __be32 *p)
|
||||
{
|
||||
return __swab32p((__u32 *)p);
|
||||
}
|
||||
static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
|
||||
{
|
||||
return (__be16)__swab16p(p);
|
||||
}
|
||||
static __always_inline __u16 __be16_to_cpup(const __be16 *p)
|
||||
{
|
||||
return __swab16p((__u16 *)p);
|
||||
}
|
||||
#define __cpu_to_le64s(x) do { (void)(x); } while (0)
|
||||
#define __le64_to_cpus(x) do { (void)(x); } while (0)
|
||||
#define __cpu_to_le32s(x) do { (void)(x); } while (0)
|
||||
#define __le32_to_cpus(x) do { (void)(x); } while (0)
|
||||
#define __cpu_to_le16s(x) do { (void)(x); } while (0)
|
||||
#define __le16_to_cpus(x) do { (void)(x); } while (0)
|
||||
#define __cpu_to_be64s(x) __swab64s((x))
|
||||
#define __be64_to_cpus(x) __swab64s((x))
|
||||
#define __cpu_to_be32s(x) __swab32s((x))
|
||||
#define __be32_to_cpus(x) __swab32s((x))
|
||||
#define __cpu_to_be16s(x) __swab16s((x))
|
||||
#define __be16_to_cpus(x) __swab16s((x))
|
||||
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */
|
||||
@@ -0,0 +1,185 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* linux/can/netlink.h
|
||||
*
|
||||
* Definitions for the CAN netlink interface
|
||||
*
|
||||
* Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the version 2 of the GNU General Public License
|
||||
* as published by the Free Software Foundation
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _CAN_NETLINK_H
|
||||
#define _CAN_NETLINK_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* CAN bit-timing parameters
|
||||
*
|
||||
* For further information, please read chapter "8 BIT TIMING
|
||||
* REQUIREMENTS" of the "Bosch CAN Specification version 2.0"
|
||||
* at http://www.semiconductors.bosch.de/pdf/can2spec.pdf.
|
||||
*/
|
||||
struct can_bittiming {
|
||||
__u32 bitrate; /* Bit-rate in bits/second */
|
||||
__u32 sample_point; /* Sample point in one-tenth of a percent */
|
||||
__u32 tq; /* Time quanta (TQ) in nanoseconds */
|
||||
__u32 prop_seg; /* Propagation segment in TQs */
|
||||
__u32 phase_seg1; /* Phase buffer segment 1 in TQs */
|
||||
__u32 phase_seg2; /* Phase buffer segment 2 in TQs */
|
||||
__u32 sjw; /* Synchronisation jump width in TQs */
|
||||
__u32 brp; /* Bit-rate prescaler */
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN hardware-dependent bit-timing constant
|
||||
*
|
||||
* Used for calculating and checking bit-timing parameters
|
||||
*/
|
||||
struct can_bittiming_const {
|
||||
char name[16]; /* Name of the CAN controller hardware */
|
||||
__u32 tseg1_min; /* Time segment 1 = prop_seg + phase_seg1 */
|
||||
__u32 tseg1_max;
|
||||
__u32 tseg2_min; /* Time segment 2 = phase_seg2 */
|
||||
__u32 tseg2_max;
|
||||
__u32 sjw_max; /* Synchronisation jump width */
|
||||
__u32 brp_min; /* Bit-rate prescaler */
|
||||
__u32 brp_max;
|
||||
__u32 brp_inc;
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN clock parameters
|
||||
*/
|
||||
struct can_clock {
|
||||
__u32 freq; /* CAN system clock frequency in Hz */
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN operational and error states
|
||||
*/
|
||||
enum can_state {
|
||||
CAN_STATE_ERROR_ACTIVE = 0, /* RX/TX error count < 96 */
|
||||
CAN_STATE_ERROR_WARNING, /* RX/TX error count < 128 */
|
||||
CAN_STATE_ERROR_PASSIVE, /* RX/TX error count < 256 */
|
||||
CAN_STATE_BUS_OFF, /* RX/TX error count >= 256 */
|
||||
CAN_STATE_STOPPED, /* Device is stopped */
|
||||
CAN_STATE_SLEEPING, /* Device is sleeping */
|
||||
CAN_STATE_MAX
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN bus error counters
|
||||
*/
|
||||
struct can_berr_counter {
|
||||
__u16 txerr;
|
||||
__u16 rxerr;
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN controller mode
|
||||
*/
|
||||
struct can_ctrlmode {
|
||||
__u32 mask;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
#define CAN_CTRLMODE_LOOPBACK 0x01 /* Loopback mode */
|
||||
#define CAN_CTRLMODE_LISTENONLY 0x02 /* Listen-only mode */
|
||||
#define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */
|
||||
#define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */
|
||||
#define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */
|
||||
#define CAN_CTRLMODE_FD 0x20 /* CAN FD mode */
|
||||
#define CAN_CTRLMODE_PRESUME_ACK 0x40 /* Ignore missing CAN ACKs */
|
||||
#define CAN_CTRLMODE_FD_NON_ISO 0x80 /* CAN FD in non-ISO mode */
|
||||
#define CAN_CTRLMODE_CC_LEN8_DLC 0x100 /* Classic CAN DLC option */
|
||||
#define CAN_CTRLMODE_TDC_AUTO 0x200 /* CAN transiver automatically calculates TDCV */
|
||||
#define CAN_CTRLMODE_TDC_MANUAL 0x400 /* TDCV is manually set up by user */
|
||||
|
||||
/*
|
||||
* CAN device statistics
|
||||
*/
|
||||
struct can_device_stats {
|
||||
__u32 bus_error; /* Bus errors */
|
||||
__u32 error_warning; /* Changes to error warning state */
|
||||
__u32 error_passive; /* Changes to error passive state */
|
||||
__u32 bus_off; /* Changes to bus off state */
|
||||
__u32 arbitration_lost; /* Arbitration lost errors */
|
||||
__u32 restarts; /* CAN controller re-starts */
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN netlink interface
|
||||
*/
|
||||
enum {
|
||||
IFLA_CAN_UNSPEC,
|
||||
IFLA_CAN_BITTIMING,
|
||||
IFLA_CAN_BITTIMING_CONST,
|
||||
IFLA_CAN_CLOCK,
|
||||
IFLA_CAN_STATE,
|
||||
IFLA_CAN_CTRLMODE,
|
||||
IFLA_CAN_RESTART_MS,
|
||||
IFLA_CAN_RESTART,
|
||||
IFLA_CAN_BERR_COUNTER,
|
||||
IFLA_CAN_DATA_BITTIMING,
|
||||
IFLA_CAN_DATA_BITTIMING_CONST,
|
||||
IFLA_CAN_TERMINATION,
|
||||
IFLA_CAN_TERMINATION_CONST,
|
||||
IFLA_CAN_BITRATE_CONST,
|
||||
IFLA_CAN_DATA_BITRATE_CONST,
|
||||
IFLA_CAN_BITRATE_MAX,
|
||||
IFLA_CAN_TDC,
|
||||
IFLA_CAN_CTRLMODE_EXT,
|
||||
|
||||
/* add new constants above here */
|
||||
__IFLA_CAN_MAX,
|
||||
IFLA_CAN_MAX = __IFLA_CAN_MAX - 1
|
||||
};
|
||||
|
||||
/*
|
||||
* CAN FD Transmitter Delay Compensation (TDC)
|
||||
*
|
||||
* Please refer to struct can_tdc_const and can_tdc in
|
||||
* include/linux/can/bittiming.h for further details.
|
||||
*/
|
||||
enum {
|
||||
IFLA_CAN_TDC_UNSPEC,
|
||||
IFLA_CAN_TDC_TDCV_MIN, /* u32 */
|
||||
IFLA_CAN_TDC_TDCV_MAX, /* u32 */
|
||||
IFLA_CAN_TDC_TDCO_MIN, /* u32 */
|
||||
IFLA_CAN_TDC_TDCO_MAX, /* u32 */
|
||||
IFLA_CAN_TDC_TDCF_MIN, /* u32 */
|
||||
IFLA_CAN_TDC_TDCF_MAX, /* u32 */
|
||||
IFLA_CAN_TDC_TDCV, /* u32 */
|
||||
IFLA_CAN_TDC_TDCO, /* u32 */
|
||||
IFLA_CAN_TDC_TDCF, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__IFLA_CAN_TDC,
|
||||
IFLA_CAN_TDC_MAX = __IFLA_CAN_TDC - 1
|
||||
};
|
||||
|
||||
/*
|
||||
* IFLA_CAN_CTRLMODE_EXT nest: controller mode extended parameters
|
||||
*/
|
||||
enum {
|
||||
IFLA_CAN_CTRLMODE_UNSPEC,
|
||||
IFLA_CAN_CTRLMODE_SUPPORTED, /* u32 */
|
||||
|
||||
/* add new constants above here */
|
||||
__IFLA_CAN_CTRLMODE,
|
||||
IFLA_CAN_CTRLMODE_MAX = __IFLA_CAN_CTRLMODE - 1
|
||||
};
|
||||
|
||||
/* u16 termination range: 1..65535 Ohms */
|
||||
#define CAN_TERMINATION_DISABLED 0
|
||||
|
||||
#endif /* !_UAPI_CAN_NETLINK_H */
|
||||
@@ -0,0 +1,36 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/* const.h: Macros for dealing with constants. */
|
||||
|
||||
#ifndef _LINUX_CONST_H
|
||||
#define _LINUX_CONST_H
|
||||
|
||||
/* Some constant macros are used in both assembler and
|
||||
* C code. Therefore we cannot annotate them always with
|
||||
* 'UL' and other type specifiers unilaterally. We
|
||||
* use the following macros to deal with this.
|
||||
*
|
||||
* Similarly, _AT() will cast an expression with a type in C, but
|
||||
* leave it unchanged in asm.
|
||||
*/
|
||||
|
||||
#ifdef __ASSEMBLY__
|
||||
#define _AC(X,Y) X
|
||||
#define _AT(T,X) X
|
||||
#else
|
||||
#define __AC(X,Y) (X##Y)
|
||||
#define _AC(X,Y) __AC(X,Y)
|
||||
#define _AT(T,X) ((T)(X))
|
||||
#endif
|
||||
|
||||
#define _UL(x) (_AC(x, UL))
|
||||
#define _ULL(x) (_AC(x, ULL))
|
||||
|
||||
#define _BITUL(x) (_UL(1) << (x))
|
||||
#define _BITULL(x) (_ULL(1) << (x))
|
||||
|
||||
#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
|
||||
#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask))
|
||||
|
||||
#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
|
||||
|
||||
#endif /* _LINUX_CONST_H */
|
||||