Lines Matching refs:address
14 const __be32 *address; /* In network byte order. */ member
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()
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()
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()
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()
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()
515 i->address = (__be32 *) in tomoyo_check_inet_address()
523 i->address = (__be32 *) in tomoyo_check_inet_address()
530 if (address->protocol == SOCK_RAW) in tomoyo_check_inet_address()
532 return tomoyo_inet_entry(address); in tomoyo_check_inet_address()
544 static int tomoyo_unix_entry(const struct tomoyo_addr_info *address) in tomoyo_unix_entry() argument
549 const u8 type = tomoyo_unix2mac[address->protocol][address->operation]; in tomoyo_unix_entry()
553 char *buf = address->unix0.addr; in tomoyo_unix_entry()
554 int len = address->unix0.addr_len - sizeof(sa_family_t); in tomoyo_unix_entry()
569 r.param.unix_network.protocol = address->protocol; in tomoyo_unix_entry()
570 r.param.unix_network.operation = address->operation; in tomoyo_unix_entry()
571 r.param.unix_network.address = &addr; in tomoyo_unix_entry()
595 struct tomoyo_addr_info *address) in tomoyo_check_unix_address() argument
597 struct tomoyo_unix_addr_info *u = &address->unix0; in tomoyo_check_unix_address()
605 return tomoyo_unix_entry(address); in tomoyo_check_unix_address()
652 struct tomoyo_addr_info address; in tomoyo_socket_listen_permission() local
668 address.protocol = type; in tomoyo_socket_listen_permission()
669 address.operation = TOMOYO_NETWORK_LISTEN; in tomoyo_socket_listen_permission()
672 addr_len, &address); in tomoyo_socket_listen_permission()
674 0, &address); in tomoyo_socket_listen_permission()
689 struct tomoyo_addr_info address; in tomoyo_socket_connect_permission() local
695 address.protocol = type; in tomoyo_socket_connect_permission()
699 address.operation = TOMOYO_NETWORK_SEND; in tomoyo_socket_connect_permission()
703 address.operation = TOMOYO_NETWORK_CONNECT; in tomoyo_socket_connect_permission()
709 return tomoyo_check_unix_address(addr, addr_len, &address); in tomoyo_socket_connect_permission()
711 &address); in tomoyo_socket_connect_permission()
726 struct tomoyo_addr_info address; in tomoyo_socket_bind_permission() local
737 address.protocol = type; in tomoyo_socket_bind_permission()
738 address.operation = TOMOYO_NETWORK_BIND; in tomoyo_socket_bind_permission()
744 return tomoyo_check_unix_address(addr, addr_len, &address); in tomoyo_socket_bind_permission()
746 &address); in tomoyo_socket_bind_permission()
761 struct tomoyo_addr_info address; in tomoyo_socket_sendmsg_permission() local
768 address.protocol = type; in tomoyo_socket_sendmsg_permission()
769 address.operation = TOMOYO_NETWORK_SEND; in tomoyo_socket_sendmsg_permission()
773 msg->msg_namelen, &address); in tomoyo_socket_sendmsg_permission()
776 sock->sk->sk_protocol, &address); in tomoyo_socket_sendmsg_permission()