Suricata-7,网络安全学习教程

* of a flow. This is why we can access those without protection of the lock.
*
Flow的结构体,用于表示流数据的结构。这个结构体的各个成员的含义:

这个结构体定义了用于表示网络数据流的各种属性和状态信息,包括地址、端口、协议类型、超时信息、线程信息、锁信息、协议特定数据指针等。
*/

typedef struct Flow_
{
/* flow “header”, used for hashing and flow lookup. Static after init,
* so safe to look at without lock */
FlowAddress src, dst; /*表示流的源地址和目的地址。*/

/* sp,dp:表示源端口和目的端口。*/
union {
Port sp; /**< tcp/udp source port */
struct {
uint8_t type; /**< icmp type */
uint8_t code; /**< icmp code */
} icmp_s;

struct {
uint32_t spi; /**< esp spi */
} esp;
};
union {
Port dp; /**< tcp/udp destination port */
struct {
uint8_t type; /**< icmp type */
uint8_t code; /**< icmp code */
} icmp_d;
};
uint8_t proto; /*表示协议类型。*/
uint8_t recursion_level;/*表示递归级别。 */
uint16_t vlan_id[VLAN_MAX_LAYERS]; /* 表示 VLAN ID 和 VLAN 索引。*/

uint8_t vlan_idx;

/* track toserver/toclient flow timeout needs
ffr_ts、ffr_tc、ffr
用于跟踪流的超时需求。
*/
union {
struct {
uint8_t ffr_ts:4;
uint8_t ffr_tc:4;
};
uint8_t ffr;
};

/** timestamp in seconds of the moment this flow will timeout
* according to the timeout policy. Does *not* take emergency
* mode into account.
timeout_at:表示流的超时时间戳。
*/
uint32_t timeout_at;

/** Thread ID for the stream/detect portion of this flow
thread_id:用于存储流的线程 ID。
*/
FlowThreadId thread_id[2];

struct Flow_ *next; /* (hash) list next 指向下一个流的指针。 */
/** Incoming interface
livedev:表示流的输入接口。
*/
struct LiveDevice_ *livedev;

/** flow hash - the flow hash before hash table size mod.
flow_hash:表示流的哈希值。
*/
uint32_t flow_hash;

/** timeout policy value in seconds to add to the lastts.tv_sec
* when a packet has been received.
timeout_policy:表示超时策略的数值。
*/
uint32_t timeout_policy;

/* time stamp of last update (last packet). Set/updated under the
* flow and flow hash row locks, safe to read under either the
* flow lock or flow hash row lock.
lastts:表示流的最后更新时间戳。
*/
SCTime_t lastts;

/* flow_state:表示流的状态类型。*/
FlowStateType flow_state;

/** flow tenant id, used to setup flow timeout and stream pseudo
* packets with the correct tenant id set
tenant_id:表示租户 ID。
*/
uint32_t tenant_id;

/*
probing_parser_toserver_alproto_masks、probing_parser_toclient_alproto_masks:用于探测解析器的掩码。
*/
uint32_t probing_parser_toserver_alproto_masks;
uint32_t probing_parser_toclient_alproto_masks;

uint32_t flags; /**< generic flags flags:表示流的通用标志。*/

uint16_t file_flags; /**< file tracking/extraction flags file_flags:表示文件跟踪/提取标志。*/

/** destination port to be used in protocol detection. This is meant
* for use with STARTTLS and HTTP CONNECT detection
protodetect_dp:用于协议检测的目的端口。
*/
uint16_t protodetect_dp; /**< 0 if not used */

/* Parent flow id for protocol like ftp
parent_id:表示协议的父流 ID。
*/
int64_t parent_id;

/*
r、m:用于流锁的读写锁或互斥锁。
*/
#ifdef FLOWLOCK_RWLOCK
SCRWLock r;
#elif defined FLOWLOCK_MUTEX
SCMutex m;
#else
#error Enable FLOWLOCK_RWLOCK or FLOWLOCK_MUTEX
#endif

/** protocol specific data pointer, e.g. for TcpSession
protoctx:指向协议特定数据的指针。
*/
void *protoctx;

/** mapping to Flow’s protocol specific protocols for timeouts
and state and free functions.
protomap:用于超时和状态函数的协议映射。
*/
uint8_t protomap;

/* flow_end_flags:流结束标志。*/
uint8_t flow_end_flags;
/* coccinelle: Flow:flow_end_flags:FLOW_END_FLAG_ */

/*alproto、alproto_ts、alproto_tc、alproto_orig、alproto_expect:表示应用层协议类型。*/
AppProto alproto; /**< \brief application level protocol */
AppProto alproto_ts;
AppProto alproto_tc;

/** original application level protocol. Used to indicate the previous

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数网络安全工程师,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年网络安全全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
img
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上网络安全知识点,真正体系化!

由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新

如果你觉得这些内容对你有帮助,可以添加VX:vip204888 (备注网络安全获取)
img

一、网安学习成长路线图

网安所有方向的技术点做的整理,形成各个领域的知识点汇总,它的用处就在于,你可以按照上面的知识点去找对应的学习资源,保证自己学得较为全面。
在这里插入图片描述

二、网安视频合集

观看零基础学习视频,看视频学习是最快捷也是最有效果的方式,跟着视频中老师的思路,从基础到深入,还是很容易入门的。
在这里插入图片描述

三、精品网安学习书籍

当我学到一定基础,有自己的理解能力的时候,会去阅读一些前辈整理的书籍或者手写的笔记资料,这些笔记详细记载了他们对一些技术点的理解,这些理解是比较独到,可以学到不一样的思路。
在这里插入图片描述

四、网络安全源码合集+工具包

光学理论是没用的,要学会跟着一起敲,要动手实操,才能将自己的所学运用到实际当中去,这时候可以搞点实战案例来学习。
在这里插入图片描述

五、网络安全面试题

最后就是大家最关心的网络安全面试题板块
在这里插入图片描述在这里插入图片描述

一个人可以走的很快,但一群人才能走的更远。如果你从事以下工作或对以下感兴趣,欢迎戳这里加入程序员的圈子,让我们一起学习成长!

AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算

89e65ecb71ac0)

AI人工智能、Android移动开发、AIGC大模型、C C#、Go语言、Java、Linux运维、云计算、MySQL、PMP、网络安全、Python爬虫、UE5、UI设计、Unity3D、Web前端开发、产品经理、车载开发、大数据、鸿蒙、计算机网络、嵌入式物联网、软件测试、数据结构与算法、音视频开发、Flutter、IOS开发、PHP开发、.NET、安卓逆向、云计算

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值