函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smack_socket_getpeersec_dgram - pull in packet label*@sock: the peer socket*@skb: packet data*@secid: pointer to where to put the secid of the packet* Sets the netlabel socket state on sk from parent

函数原型:static int smack_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, unsigned int *secid)

返回类型:int

参数:

类型参数名称
struct socket *sock
struct sk_buff *skb
unsigned int *secid
3996  struct socket_smack * ssp = NULL
3998  family等于Protocol families, same as address families.
3999  s等于0
4002  如果(skb != NULL)则
4003  如果protocol恒等于htons(Internet Protocol packet )则family等于PF_INET
4006  否则如果protocol恒等于htons(IPv6 over bluebook )则family等于PF_INET6
4010  如果(family == Protocol families, same as address families. && sock != NULL)则family等于sk_family
4014  :family恒等于PF_UNIX
4015  ssp等于sk_security
4016  s等于smk_secid
4017  退出
4018  :family恒等于PF_INET
4020  s等于secmark
4021  如果s不等于0则退出
4027  如果(sock != NULL && sk != NULL)则ssp等于sk_security
4029  lbl_secattr_init - Initialize a netlbl_lsm_secattr struct*@secattr: the struct to initialize* Description:* Initialize an already allocated netlbl_lsm_secattr struct.
4030  rc等于netlbl_skbuff_getattr(skb, family, & secattr)
4031  如果rc恒等于0则
4033  s等于smk_secid
4035  lbl_secattr_destroy - Clears a netlbl_lsm_secattr struct*@secattr: the struct to clear* Description:* Destroys the @secattr struct, including freeing all of the internal buffers.* The struct must be reset with a call to netlbl_secattr_init() before reuse.
4036  退出
4037  :family恒等于PF_INET6
4039  s等于secmark
4041  退出
4043  secid等于s
4044  如果s恒等于0则返回:负EINVAL
4046  返回:0