Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\network.c Create Date:2022-07-28 19:45:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_sock_family - Get socket's family.*@sk: Pointer to "struct sock".* Returns one of PF_INET, PF_INET6, PF_UNIX or 0.

Proto:static u8 tomoyo_sock_family(struct sock *sk)

Type:u8

Parameter:

TypeParameterName
struct sock *sk
630  If moyo_kernel_service - Check whether I'm kernel service or not.* Returns true if I'm kernel service, false otherwise. Then Return 0
632  family = sk_family
634  Case family == PF_INET
635  Case family == PF_INET6
636  Case family == PF_UNIX
637  Return family
638  Default
639  Return 0
Caller
NameDescribe
tomoyo_socket_listen_permissionmoyo_socket_listen_permission - Check permission for listening a socket.*@sock: Pointer to "struct socket".* Returns 0 on success, negative value otherwise.
tomoyo_socket_connect_permissionmoyo_socket_connect_permission - Check permission for setting the remote address of a socket.*@sock: Pointer to "struct socket".*@addr: Pointer to "struct sockaddr".*@addr_len: Size of @addr.* Returns 0 on success, negative value otherwise.
tomoyo_socket_bind_permissionmoyo_socket_bind_permission - Check permission for setting the local address of a socket.*@sock: Pointer to "struct socket".*@addr: Pointer to "struct sockaddr".*@addr_len: Size of @addr.* Returns 0 on success, negative value otherwise.
tomoyo_socket_sendmsg_permissionmoyo_socket_sendmsg_permission - Check permission for sending a datagram.*@sock: Pointer to "struct socket".*@msg: Pointer to "struct msghdr".*@size: Unused.* Returns 0 on success, negative value otherwise.