文章目录

  • 源代码结构
  • Components
  • 数据结构

strongswan Github下载地址

源代码结构

目录下内容

strongswan$ ls
Android.common.mk.in  ChangeLog        COPYING      HACKING  m4           README            SECURITY.md               TODO
Android.mk            conf             doc          init     Makefile.am  README_LEGACY.md  sonar-project.properties
AUTHORS               configure.ac     Doxyfile.in  INSTALL  man          README.md         src
autogen.sh            CONTRIBUTING.md  fuzz         LICENSE  NEWS         scripts           testing
文件夹 描述
conf 配置文件
doc RFC标准文档
init 初始化信息
src 源代码文件
scripts 脚本信息
testing 测试程序

Components

The src directory in the strongSwan distribution contains the following components:

Component Description
aikgen Utility to generate an Attestation Identity Key bound to a TPM 1.2
charon The IKE keying daemon
charon-cmd A command line IKE client
charon-nm The back end for the NetworkManager D-BUS plugin
charon-svc The Windows IKE service
charon-systemd An IKE daemon similar to charon but specifically designed for use with systemd
charon-tkm A variant of charon that is backed by a Trusted Key Manager (TKM)
checksum Utility to generate checksums of built executables and libraries
conftest Conformance test tool
frontends/android VPN client for Android
frontends/gnome NetworkManager plugin
frontends/osx charon-xpc helper daemon for the native macOS application
ipsec The legacy ipsec command line tool wrapping commands and other tools
libcharon Contains most of the code and the plugins of the charon daemon
libfast A lightweight framework to build native web applications using ClearSilver and FastCGI
libimcv Various Integrity Measurement Collectors (IMCs), Integrity Measuremeent Validators (IMVs) and the library code shared by them
libipsec A userland IPsec implementation used by kernel-libipsec and the Android VPN Client app
libpts Contains code for TPM-based Platform Trust Services (PTS) and SWID tag handling
libpttls Implements the PT-TLS protocol
libradius RADIUS protocol implementation used by e.g. the eap-radius and tnc-pdp plugins
libsimaka Contains code shared by several EAP-SIM/AKA plugins
libstrongswan The strongSwan library with basic functions used by the daemons and utilities
libtls TLS implementation used by the eap-tls, eap-ttls, eap-peap and other plugins
libtnccs Implements the IF-TNCCS interface
libtncif Implmements the IF-IMC/IF-IMV interfaces
manager A deprecated graphical management application for charon based on libfast
medsrv An experimental management front end for mediation servers based on libfast
pki Public Key Infrastructure utility
pool Utility to manage attributes and IP address pools provided by the attr-sql plugin
pt-tls-client Integrity measurement client using the PT-TLS protocol
scepclient Utility to enroll certificates using the SCEP protocol
sec-updater Utility extracting information about security updates and backports of Linux repositories (e.g. Debian or Ubuntu)
starter Legacy daemon that reads ipsec.conf and controls the keying daemon charon
stroke Legacy command line utility to control charon via the stroke protocol
swanctl Configuration and control utility that communicates via the vici interface
sw-collector Utility extracting information about software package installation, update or removal events from the apt history log
tpm_extendpcr Tool that extends a digest into a TPM PCR
_updown Default script called by the updown plugin on tunnel up/down events
xfrmi Create an XFRM interface

libstrongswan/目录下文件描述

文件 描述
backtrace.c backtrace.h 回溯
chunk.c chunk.h
debug.c debug.h 调试
integrity_checker.c integrity_checker.h 完整性检查
lexparser.c lexparser.h
printf_hook/
utils/ utils.c utils.h
compat/ 兼容性
enum.c enum.h 枚举
optionsfrom.c optionsfrom.h 参数
process.c process.h 处理
capabilities.c capabilities.h 能力
cpu_feature.c cpu_feature.h CPU特性
leak_detective.c leak_detective.h 丢包检测
identification.c identification.h 识别
parser_helper.c parser_helper.h 解析帮助
test.c test.h 测试

数据结构

strongswan/src/libstrongswan/utils/utils/object.h

/*** Object allocation/initialization macro, using designated initializer.*/
#define INIT(this, ...) { (this) = malloc(sizeof(*(this))); \*(this) = (typeof(*(this))){ __VA_ARGS__ }; }/*** Method declaration/definition macro, providing private and public interface.** Defines a method name with this as first parameter and a return value ret,* and an alias for this method with a _ prefix, having the this argument* safely casted to the public interface iface.* _name is provided a function pointer, but will get optimized out by GCC.*/
#define METHOD(iface, name, ret, this, ...) \static ret name(union {iface *_public; this;} \__attribute__((transparent_union)), ##__VA_ARGS__); \static typeof(name) *_##name = (typeof(name)*)name; \static ret name(this, ##__VA_ARGS__)/*** Callback declaration/definition macro, allowing casted first parameter.** This is very similar to METHOD, but instead of casting the first parameter* to a public interface, it uses a void*. This allows type safe definition* of a callback function, while using the real type for the first parameter.*/
#define CALLBACK(name, ret, param1, ...) \static ret _cb_##name(union {void *_generic; param1;} \__attribute__((transparent_union)), ##__VA_ARGS__); \static typeof(_cb_##name) *name = (typeof(_cb_##name)*)_cb_##name; \static ret _cb_##name(param1, ##__VA_ARGS__)

strongswan/src/libstrongswan/utils/enum.h

/*** Begin a new enum_name list.** @param name  name of the enum_name list* @param first enum value of the first enum string* @param last  enum value of the last enum string* @param ...   a list of strings*/
#define ENUM_BEGIN(name, first, last, ...) \static enum_name_t name##last = {first, last + \BUILD_ASSERT(((last)-(first)+1) == countof(((char*[]){__VA_ARGS__}))), \NULL, { __VA_ARGS__ }}/*** Continue a enum name list started with ENUM_BEGIN.** @param name  name of the enum_name list* @param first enum value of the first enum string* @param last  enum value of the last enum string* @param prev  enum value of the "last" defined in ENUM_BEGIN/previous ENUM_NEXT* @param ...   a list of strings*/
#define ENUM_NEXT(name, first, last, prev, ...) \static enum_name_t name##last = {first, last + \BUILD_ASSERT(((last)-(first)+1) == countof(((char*[]){__VA_ARGS__}))), \&name##prev, { __VA_ARGS__ }}/*** Complete enum name list started with ENUM_BEGIN.** @param name  name of the enum_name list* @param prev  enum value of the "last" defined in ENUM_BEGIN/previous ENUM_NEXT*/
#define ENUM_END(name, prev) enum_name_t *name = &name##prev;/*** Define a enum name with only one range.** This is a convenience macro to use when a enum_name list contains only* one range, and is equal as defining ENUM_BEGIN followed by ENUM_END.** @param name  name of the enum_name list* @param first enum value of the first enum string* @param last  enum value of the last enum string* @param ...   a list of strings*/
#define ENUM(name, first, last, ...) \ENUM_BEGIN(name, first, last, __VA_ARGS__); ENUM_END(name, last)

strongswan/src/libstrongswan/utils/chunk.h

typedef struct chunk_t chunk_t;/*** General purpose pointer/length abstraction.*/
struct chunk_t {/** Pointer to start of data */u_char *ptr;/** Length of data in bytes */size_t len;
};

strongswan源代码结构与数据结构相关推荐

  1. MINA2 源代码学习--源代码结构梳理

    一.mina总体框架与案例: 1.总体结构图: 简述:以上是一张来自网上比較经典的图,总体上揭示了mina的结构,当中IoService包括clientIoConnector和服务端IoAccepto ...

  2. Chrome源代码结构

    首先,开始接触Chrome的童鞋可能有一个疑惑,Chrome和Chromium是同一个东西吗?答案是,Chrome是Google官方的浏览器项目名称,Chromium是Google官方对Chrome开 ...

  3. Android源代码结构

    Android源代码结构: Google提供的Android包含了原始Android的目标机代码,主机编译工具.仿真环境,代码包经过解压缩后,第一级别的目录和文件如下所示: . |-- Makefil ...

  4. android应用框架 平台结构 源代码结构 事件处理流程 Framework层收到事件的处理过程 电话处理流程

    android应用框架 平台结构 第1层: Linux操作系统及驱动 C语言实现 第2层: 本地框架和Java运行环境 C和C++实现 第3层: Java框架(framework) Java实现 第4 ...

  5. chromium源代码结构

    Chrome源代码结构 首先,开始接触Chrome的童鞋可能有一个疑惑,Chrome和Chromium是同一个东西吗?答案是,Chrome是Google官方的浏览器项目名称,Chromium是Goog ...

  6. 升讯威微信营销系统开发实践:(4)源代码结构说明 与 安装部署说明( 完整开源于 Github)...

    GitHub:https://github.com/iccb1013/Sheng.WeixinConstruction因为个人精力时间有限,不会再对现有代码进行更新维护,不过微信接口比较稳定,经测试至 ...

  7. java vector内存结构_Java 数据结构

    Java工具包提供了强大的数据结构.在Java中的数据结构主要包括以下几种接口和类: 枚举(Enumeration) 位集合(BitSet) 向量(Vector) 栈(Stack) 字典(Dictio ...

  8. 数组是逻辑结构还是存储结构_数据结构之存储方式

    数据结构的存储⽅式只有两种:数组(顺序存储)和链表(链式存储). 这句话怎么理解,不是还有散列表.栈.队列.堆.树.图等等各种数据结构吗? 我们分析问题,⼀定要有递归的思想,⾃顶向下,从抽象到具体.你 ...

  9. Redis源代码分析-内存数据结构intset

    这次研究了一下intset.研究的过程中,一度看不下过去,可是还是咬牙挺过来了.看懂了也就是那么回事.静下心来,切莫浮躁 Redis为了追求高效,在存储下做了非常多的优化,像intset就是作者为了节 ...

  10. access表怎么生成表结构_数据结构——单链表讲解

    单链表 单链表的创建分为头插入法和尾插入法两种,两者并无本质上的不同,都是利用指针指向下一个结点元素的方式进行逐个创建,只不过使用头插入法最终得到的结果是逆序的. 1.单链表概念&设计 单链表 ...

最新文章

  1. Nginx基本配置、性能优化指南
  2. Thread.currentThread().getContextClassLoader() 和 Class.getClassLoader()区别
  3. 【KubeVela 官方文档翻译】,欢迎大家踊跃参与
  4. Hue开发指南 - 提交 Spark 程序
  5. 《Java技术》第一次作业
  6. MySQL笔记-binlog理论及binlog回滚恢复数据
  7. 在微软 Team 中查看 GIF 文件就能触发账户劫持漏洞?
  8. 基于RGB图像的机器人抓取算法汇总
  9. asp.net 安全---File Sytem 安全
  10. mysql 写undolog_Mysq bin redo undo log
  11. Bellman-ford算法图解
  12. 北京大学计算机学院课程表,北京大学课程表.PDF
  13. 组归一化(Group Normalization)的解释
  14. .py文件应该怎样打开?
  15. 迅雷因版权问题不能访问
  16. 树叶叶脉的提取及描述
  17. 深度学习之卷积神经网络CNN 常用的几个模型
  18. 关于Python打包文件的步骤
  19. 阿里云ACP云计算错题集121-140
  20. android 电信4gapn,电信apn怎么设置4g最快最稳定的网络?

热门文章

  1. 计算机网络的组成有哪些
  2. 001Diamond学习002使用
  3. 有趣好玩的Linux之代码雨效果
  4. Codevs 3100 蜗牛的旅行
  5. React组件通信-父子组件间的通信
  6. bugly怎么读_腾讯Bugly学习了解
  7. C51- NRF24L01 无线串口模块
  8. 真彩色图像RGB,YIQ图像,HSV图像,YCbCr图像的相互转换(Matlab实现)
  9. ffmpeg编程查看视频文件信息
  10. IE主页被2345(782782)篡改解决办法