函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_skb_to_addr_ipv6

函数原型:static int smk_skb_to_addr_ipv6(struct sk_buff *skb, struct sockaddr_in6 *sip)

返回类型:int

参数:

类型参数名称
struct sk_buff *skb
struct sockaddr_in6 *sip
3789  proto等于负EINVAL
3797  Transport layer port # 等于0
3799  offset等于skb_network_offset(skb)
3800  ip6等于skb_header_pointer(skb, offset, _ipv6h的长度, & _ipv6h)
3801  如果(ip6 == NULL)则返回:负EINVAL
3803  IPv6 address 等于saddr
3805  nexthdr等于nexthdr
3806  offset加等于_ipv6h的长度
3807  offset等于ipv6_skip_exthdr(skb, offset, & nexthdr, & frag_off)
3808  如果offset小于0则返回:负EINVAL
3811  proto等于nexthdr
3813  :proto恒等于IPPROTO_TCP
3814  th等于skb_header_pointer(skb, offset, _tcph的长度, & _tcph)
3815  如果(th != NULL)则 Transport layer port # 等于source
3817  退出
3818  :proto恒等于IPPROTO_UDP
3819  :proto恒等于IPPROTO_UDPLITE
3820  uh等于skb_header_pointer(skb, offset, _udph的长度, & _udph)
3821  如果(uh != NULL)则 Transport layer port # 等于source
3823  退出
3824  :proto恒等于IPPROTO_DCCP
3825  dh等于skb_header_pointer(skb, offset, _dccph的长度, & _dccph)
3826  如果(dh != NULL)则 Transport layer port # 等于dccph_sport
3828  退出
3830  返回:proto
调用者
名称描述
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