Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:24:08 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static int smack_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, unsigned int *secid)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct socket * | sock | |
| struct sk_buff * | skb | |
| unsigned int * | secid |
| 3996 | struct socket_smack * ssp = NULL |
| 3999 | s = 0 |
| 4002 | If (skb != NULL) Then |
| 4003 | If protocol == htons(Internet Protocol packet ) Then family = PF_INET |
| 4006 | Else if protocol == htons(IPv6 over bluebook ) Then family = PF_INET6 |
| 4010 | If (family == Protocol families, same as address families. && sock != NULL) Then family = sk_family |
| 4021 | If s != 0 Then Break |
| 4027 | If (sock != NULL && sk != NULL) Then ssp = sk_security |
| 4030 | rc = netlbl_skbuff_getattr(skb, family, & secattr) |
| 4031 | If rc == 0 Then |
| 4036 | Break |
| 4046 | Return 0 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |