Function report |
Source Code:security\tomoyo\network.c |
Create Date:2022-07-28 19:45:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:moyo_check_inet_address - Check permission for inet domain socket's operation.*@addr: Pointer to "struct sockaddr".*@addr_len: Size of @addr.*@port: Port number.*@address: Pointer to "struct tomoyo_addr_info".
Proto:static int tomoyo_check_inet_address(const struct sockaddr *addr, const unsigned int addr_len, const u16 port, struct tomoyo_addr_info *address)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const struct sockaddr * | addr | |
const unsigned int | addr_len | |
const u16 | port | |
struct tomoyo_addr_info * | address |
508 | If addr_len < get the member end offset of(structsockaddr, sa_family) Then Return 0 |
511 | Case address family, AF_xxx == IP version 6 |
519 | Case address family, AF_xxx == Internet IP Protocol |
520 | If addr_len < sizeof(structsockaddr_in) Then Go to skip |
522 | is_ipv6 = false |
523 | In network byte order. = (__be32 * ) & sin_addr |
526 | Break |
527 | Default |
528 | Go to skip |
530 | If protocol == SOCK_RAW Then In network byte order. = htons(port) |
533 | skip : |
534 | Return 0 |
Name | Describe |
---|---|
tomoyo_socket_listen_permission | moyo_socket_listen_permission - Check permission for listening a socket.*@sock: Pointer to "struct socket".* Returns 0 on success, negative value otherwise. |
tomoyo_socket_connect_permission | moyo_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_permission | moyo_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_permission | moyo_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. |
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 |