函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\lsm_audit.c Create Date:2022-07-27 21:00:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:pv4_skb_to_auditdata : fill auditdata from skb*@skb : the skb*@ad : the audit data to fill*@proto : the layer 4 protocol* return 0 on success

函数原型:int ipv4_skb_to_auditdata(struct sk_buff *skb, struct common_audit_data *ad, u8 *proto)

返回类型:int

参数:

类型参数名称
struct sk_buff *skb
struct common_audit_data *ad
u8 *proto
42  ret等于0
45  ih等于ip_hdr(skb)
46  如果(ih == NULL)则返回:负EINVAL
49  saddr等于saddr
50  daddr等于daddr
52  如果protoproto等于protocol
55  如果ntohs(frag_off)按位与"Fragment Offset" part 则返回:0
59  :protocol恒等于IPPROTO_TCP
60  th等于tcp_hdr(skb)
61  如果(th == NULL)则退出
64  sport等于source
65  dport等于dest
66  退出
68  :protocol恒等于IPPROTO_UDP
69  uh等于udp_hdr(skb)
70  如果(uh == NULL)则退出
73  sport等于source
74  dport等于dest
75  退出
77  :protocol恒等于IPPROTO_DCCP
78  dh等于dccp_hdr(skb)
79  如果(dh == NULL)则退出
82  sport等于dccph_sport
83  dport等于dccph_dport
84  退出
86  :protocol恒等于IPPROTO_SCTP
87  sh等于sctp_hdr(skb)
88  如果(sh == NULL)则退出
90  sport等于source
91  dport等于dest
92  退出
94  默认
95  ret等于负EINVAL
97  返回:ret
调用者
名称描述
smack_inet_conn_requestsmack_inet_conn_request - Smack access check on connect*@sk: socket involved*@skb: packet*@req: unused* Returns 0 if a task with the packet label could write to* the socket, otherwise an error code
smack_socket_sock_rcv_skbsmack_socket_sock_rcv_skb - Smack packet delivery access check*@sk: socket*@skb: packet* Returns 0 if the packet should be delivered, an error code otherwise