• Home
  • Raw
  • Download

Lines Matching full:address

11 /* Structure for holding inet domain socket's address. */
14 const __be32 *address; /* In network byte order. */ member
18 /* Structure for holding unix domain socket's address. */
24 /* Structure for holding socket address. */
43 * tomoyo_parse_ipaddr_union - Parse an IP address.
55 char *address = tomoyo_read_token(param); in tomoyo_parse_ipaddr_union() local
58 if (!strchr(address, ':') && in tomoyo_parse_ipaddr_union()
59 in4_pton(address, -1, min, '-', &end) > 0) { in tomoyo_parse_ipaddr_union()
68 if (in6_pton(address, -1, min, '-', &end) > 0) { in tomoyo_parse_ipaddr_union()
81 * tomoyo_print_ipv4 - Print an IPv4 address.
98 * tomoyo_print_ipv6 - Print an IPv6 address.
116 * tomoyo_print_ip - Print an IP address.
199 tomoyo_same_ipaddr_union(&p1->address, &p2->address) && in tomoyo_same_inet_acl()
300 e.address.group = in tomoyo_write_inet_network()
302 if (!e.address.group) in tomoyo_write_inet_network()
305 if (!tomoyo_parse_ipaddr_union(param, &e.address)) in tomoyo_write_inet_network()
315 tomoyo_put_group(e.address.group); in tomoyo_write_inet_network()
359 * @address: Name of address.
365 const u8 operation, const char *address) in tomoyo_audit_net_log() argument
369 tomoyo_socket_keyword[operation], address); in tomoyo_audit_net_log()
383 const __be32 *address = r->param.inet_network.address; in tomoyo_audit_inet_log() local
387 address, (const struct in6_addr *) address); in tomoyo_audit_inet_log()
389 tomoyo_print_ipv4(buf, sizeof(buf), address, address); in tomoyo_audit_inet_log()
408 r->param.unix_network.address->name); in tomoyo_audit_unix_log()
430 if (acl->address.group) in tomoyo_check_inet_acl()
433 r->param.inet_network.address, acl->address.group); in tomoyo_check_inet_acl()
434 return acl->address.is_ipv6 == r->param.inet_network.is_ipv6 && in tomoyo_check_inet_acl()
435 memcmp(&acl->address.ip[0], in tomoyo_check_inet_acl()
436 r->param.inet_network.address, size) <= 0 && in tomoyo_check_inet_acl()
437 memcmp(r->param.inet_network.address, in tomoyo_check_inet_acl()
438 &acl->address.ip[1], size) <= 0; in tomoyo_check_inet_acl()
456 tomoyo_compare_name_union(r->param.unix_network.address, in tomoyo_check_unix_acl()
463 * @address: Pointer to "struct tomoyo_addr_info".
467 static int tomoyo_inet_entry(const struct tomoyo_addr_info *address) in tomoyo_inet_entry() argument
472 const u8 type = tomoyo_inet2mac[address->protocol][address->operation]; in tomoyo_inet_entry()
477 r.param.inet_network.protocol = address->protocol; in tomoyo_inet_entry()
478 r.param.inet_network.operation = address->operation; in tomoyo_inet_entry()
479 r.param.inet_network.is_ipv6 = address->inet.is_ipv6; in tomoyo_inet_entry()
480 r.param.inet_network.address = address->inet.address; in tomoyo_inet_entry()
481 r.param.inet_network.port = ntohs(address->inet.port); in tomoyo_inet_entry()
497 * @address: Pointer to "struct tomoyo_addr_info".
504 struct tomoyo_addr_info *address) in tomoyo_check_inet_address() argument
506 struct tomoyo_inet_addr_info *i = &address->inet; in tomoyo_check_inet_address()
513 i->address = (__be32 *) in tomoyo_check_inet_address()
521 i->address = (__be32 *) in tomoyo_check_inet_address()
528 if (address->protocol == SOCK_RAW) in tomoyo_check_inet_address()
530 return tomoyo_inet_entry(address); in tomoyo_check_inet_address()
538 * @address: Pointer to "struct tomoyo_addr_info".
542 static int tomoyo_unix_entry(const struct tomoyo_addr_info *address) in tomoyo_unix_entry() argument
547 const u8 type = tomoyo_unix2mac[address->protocol][address->operation]; in tomoyo_unix_entry()
551 char *buf = address->unix0.addr; in tomoyo_unix_entry()
552 int len = address->unix0.addr_len - sizeof(sa_family_t); in tomoyo_unix_entry()
567 r.param.unix_network.protocol = address->protocol; in tomoyo_unix_entry()
568 r.param.unix_network.operation = address->operation; in tomoyo_unix_entry()
569 r.param.unix_network.address = &addr; in tomoyo_unix_entry()
587 * @address: Pointer to "struct tomoyo_addr_info".
593 struct tomoyo_addr_info *address) in tomoyo_check_unix_address() argument
595 struct tomoyo_unix_addr_info *u = &address->unix0; in tomoyo_check_unix_address()
601 return tomoyo_unix_entry(address); in tomoyo_check_unix_address()
648 struct tomoyo_addr_info address; in tomoyo_socket_listen_permission() local
664 address.protocol = type; in tomoyo_socket_listen_permission()
665 address.operation = TOMOYO_NETWORK_LISTEN; in tomoyo_socket_listen_permission()
668 addr_len, &address); in tomoyo_socket_listen_permission()
670 0, &address); in tomoyo_socket_listen_permission()
674 * tomoyo_socket_connect_permission - Check permission for setting the remote address of a socket.
685 struct tomoyo_addr_info address; in tomoyo_socket_connect_permission() local
691 address.protocol = type; in tomoyo_socket_connect_permission()
695 address.operation = TOMOYO_NETWORK_SEND; in tomoyo_socket_connect_permission()
699 address.operation = TOMOYO_NETWORK_CONNECT; in tomoyo_socket_connect_permission()
705 return tomoyo_check_unix_address(addr, addr_len, &address); in tomoyo_socket_connect_permission()
707 &address); in tomoyo_socket_connect_permission()
711 * tomoyo_socket_bind_permission - Check permission for setting the local address of a socket.
722 struct tomoyo_addr_info address; in tomoyo_socket_bind_permission() local
733 address.protocol = type; in tomoyo_socket_bind_permission()
734 address.operation = TOMOYO_NETWORK_BIND; in tomoyo_socket_bind_permission()
740 return tomoyo_check_unix_address(addr, addr_len, &address); in tomoyo_socket_bind_permission()
742 &address); in tomoyo_socket_bind_permission()
757 struct tomoyo_addr_info address; in tomoyo_socket_sendmsg_permission() local
764 address.protocol = type; in tomoyo_socket_sendmsg_permission()
765 address.operation = TOMOYO_NETWORK_SEND; in tomoyo_socket_sendmsg_permission()
769 msg->msg_namelen, &address); in tomoyo_socket_sendmsg_permission()
772 sock->sk->sk_protocol, &address); in tomoyo_socket_sendmsg_permission()