Lines Matching refs:address
11 /* Structure for holding inet domain socket's address. */
14 const __be32 *address; /* In network byte order. */
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);
58 if (!strchr(address, ':') &&
59 in4_pton(address, -1, min, '-', &end) > 0) {
68 if (in6_pton(address, -1, min, '-', &end) > 0) {
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) &&
300 e.address.group =
302 if (!e.address.group)
305 if (!tomoyo_parse_ipaddr_union(param, &e.address))
315 tomoyo_put_group(e.address.group);
359 * @address: Name of address.
365 const u8 operation, const char *address)
369 tomoyo_socket_keyword[operation], address);
383 const __be32 *address = r->param.inet_network.address;
387 address, (const struct in6_addr *) address);
389 tomoyo_print_ipv4(buf, sizeof(buf), address, address);
408 r->param.unix_network.address->name);
430 if (acl->address.group)
433 r->param.inet_network.address, acl->address.group);
434 return acl->address.is_ipv6 == r->param.inet_network.is_ipv6 &&
435 memcmp(&acl->address.ip[0],
436 r->param.inet_network.address, size) <= 0 &&
437 memcmp(r->param.inet_network.address,
438 &acl->address.ip[1], size) <= 0;
456 tomoyo_compare_name_union(r->param.unix_network.address,
463 * @address: Pointer to "struct tomoyo_addr_info".
467 static int tomoyo_inet_entry(const struct tomoyo_addr_info *address)
472 const u8 type = tomoyo_inet2mac[address->protocol][address->operation];
477 r.param.inet_network.protocol = address->protocol;
478 r.param.inet_network.operation = address->operation;
479 r.param.inet_network.is_ipv6 = address->inet.is_ipv6;
480 r.param.inet_network.address = address->inet.address;
481 r.param.inet_network.port = ntohs(address->inet.port);
497 * @address: Pointer to "struct tomoyo_addr_info".
504 struct tomoyo_addr_info *address)
506 struct tomoyo_inet_addr_info *i = &address->inet;
515 i->address = (__be32 *)
523 i->address = (__be32 *)
530 if (address->protocol == SOCK_RAW)
532 return tomoyo_inet_entry(address);
540 * @address: Pointer to "struct tomoyo_addr_info".
544 static int tomoyo_unix_entry(const struct tomoyo_addr_info *address)
549 const u8 type = tomoyo_unix2mac[address->protocol][address->operation];
553 char *buf = address->unix0.addr;
554 int len = address->unix0.addr_len - sizeof(sa_family_t);
569 r.param.unix_network.protocol = address->protocol;
570 r.param.unix_network.operation = address->operation;
571 r.param.unix_network.address = &addr;
589 * @address: Pointer to "struct tomoyo_addr_info".
595 struct tomoyo_addr_info *address)
597 struct tomoyo_unix_addr_info *u = &address->unix0;
605 return tomoyo_unix_entry(address);
652 struct tomoyo_addr_info address;
668 address.protocol = type;
669 address.operation = TOMOYO_NETWORK_LISTEN;
672 addr_len, &address);
674 0, &address);
678 * tomoyo_socket_connect_permission - Check permission for setting the remote address of a socket.
689 struct tomoyo_addr_info address;
695 address.protocol = type;
699 address.operation = TOMOYO_NETWORK_SEND;
703 address.operation = TOMOYO_NETWORK_CONNECT;
709 return tomoyo_check_unix_address(addr, addr_len, &address);
711 &address);
715 * tomoyo_socket_bind_permission - Check permission for setting the local address of a socket.
726 struct tomoyo_addr_info address;
737 address.protocol = type;
738 address.operation = TOMOYO_NETWORK_BIND;
744 return tomoyo_check_unix_address(addr, addr_len, &address);
746 &address);
761 struct tomoyo_addr_info address;
768 address.protocol = type;
769 address.operation = TOMOYO_NETWORK_SEND;
773 msg->msg_namelen, &address);
776 sock->sk->sk_protocol, &address);