Chris PeBenito e181fe
# Copyright (C) 2005 Tresys Technology, LLC
Chris PeBenito 085faa
## <module name="corenetwork" layer="kernel">
Chris PeBenito 085faa
## <summary>Policy controlling access to network objects</summary>
Chris PeBenito e181fe
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_network_tcp_on_general_interface(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_general_interface',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 netif_t:netif { tcp_send tcp_recv };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_general_interface_depend',`
Chris PeBenito b4cd15
type netif_t;
Chris PeBenito 0e730c
class netif { tcp_send tcp_recv };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_udp_on_general_interface(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_general_interface',`
Chris PeBenito bd202f
corenetwork_send_udp_on_general_interface($1)
Chris PeBenito bd202f
corenetwork_receive_udp_on_general_interface($1)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_raw_on_general_interface(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_raw_on_general_interface',`
Chris PeBenito bd202f
corenetwork_send_raw_on_general_interface($1)
Chris PeBenito bd202f
corenetwork_receive_raw_on_general_interface($1)
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_send_udp_on_general_interface(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`corenetwork_send_udp_on_general_interface',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 netif_t:netif udp_send;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`corenetwork_send_udp_on_general_interface_depend',`
Chris PeBenito b4cd15
type netif_t;
Chris PeBenito b4cd15
class netif udp_send;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_receive_udp_on_general_interface(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_general_interface',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 netif_t:netif udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_general_interface_depend',`
Chris PeBenito 0e730c
type netif_t;
Chris PeBenito 0e730c
class netif udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_raw_on_general_interface(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`corenetwork_send_raw_on_general_interface',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 netif_t:netif rawip_send;
Chris PeBenito b4cd15
allow $1 self:capability net_raw;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`corenetwork_send_raw_on_general_interface_depend',`
Chris PeBenito b4cd15
type netif_t;
Chris PeBenito b4cd15
class netif rawip_send;
Chris PeBenito b4cd15
class capability net_raw;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_receive_raw_on_general_interface(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_general_interface',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 netif_t:netif rawip_recv;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_general_interface_depend',`
Chris PeBenito b4cd15
type netif_t;
Chris PeBenito 0e730c
class netif rawip_recv;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_network_tcp_on_all_interfaces(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_all_interfaces',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 netif_type:netif { tcp_send tcp_recv };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_all_interfaces_depend',`
Chris PeBenito 0e730c
attribute netif_type;
Chris PeBenito 0e730c
class netif { tcp_send tcp_recv };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_network_udp_on_all_interfaces(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_all_interfaces',`
Chris PeBenito bd202f
corenetwork_send_udp_on_all_interfaces($1)
Chris PeBenito bd202f
corenetwork_receive_udp_on_all_interfaces($1)
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_network_raw_on_all_interfaces(domain)
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_network_raw_on_all_interfaces',`
Chris PeBenito bd202f
corenetwork_send_raw_on_all_interfaces($1)
Chris PeBenito bd202f
corenetwork_receive_raw_on_all_interfaces($1)
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_send_udp_on_all_interfaces(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`corenetwork_send_udp_on_all_interfaces',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 netif_type:netif udp_send;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`corenetwork_send_udp_on_all_interfaces_depend',`
Chris PeBenito b4cd15
attribute netif_type;
Chris PeBenito b4cd15
class netif udp_send;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_send_raw_on_all_interfaces(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`corenetwork_send_raw_on_all_interfaces',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 netif_type:netif rawip_send;
Chris PeBenito b4cd15
allow $1 self:capability net_raw;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`corenetwork_send_raw_on_all_interfaces_depend',`
Chris PeBenito b4cd15
attribute netif_type;
Chris PeBenito b4cd15
class netif rawip_send;
Chris PeBenito b4cd15
class capability net_raw;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_receive_udp_on_all_interfaces(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`corenetwork_receive_udp_on_all_interfaces',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 netif_type:netif udp_recv;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`corenetwork_receive_udp_on_all_interfaces_depend',`
Chris PeBenito b4cd15
attribute netif_type;
Chris PeBenito b4cd15
class netif udp_recv;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#######################################
Chris PeBenito b4cd15
#
Chris PeBenito bd202f
# corenetwork_receive_raw_on_all_interfaces(domain)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`corenetwork_receive_raw_on_all_interfaces',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito b4cd15
allow $1 netif_type:netif rawip_recv;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
define(`corenetwork_receive_raw_on_all_interfaces_depend',`
Chris PeBenito b4cd15
attribute netif_type;
Chris PeBenito b4cd15
class netif rawip_recv;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_tcp_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_general_node',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_t:node { tcp_send tcp_recv };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_general_node_depend',`
Chris PeBenito 0e730c
type node_t;
Chris PeBenito 0e730c
class node { tcp_send tcp_recv };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_udp_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_general_node',`
Chris PeBenito 0e730c
corenetwork_send_udp_on_general_node($1,$2)
Chris PeBenito 0e730c
corenetwork_receive_udp_on_general_node($1,$2)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_raw_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_raw_on_general_node',`
Chris PeBenito 0e730c
corenetwork_send_raw_on_general_node($1,$2)
Chris PeBenito 0e730c
corenetwork_receive_raw_on_general_node($1,$2)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_udp_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_general_node',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_t:node udp_send;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_general_node_depend',`
Chris PeBenito 0e730c
type node_t;
Chris PeBenito 0e730c
class node udp_send;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_receive_udp_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_general_node',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_t:node udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_general_node_depend',`
Chris PeBenito 0e730c
type node_t;
Chris PeBenito 0e730c
class node udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_raw_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_raw_on_general_node',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_t:node rawip_send;
Chris PeBenito 0e730c
allow $1 self:capability net_raw;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_raw_on_general_node_depend',`
Chris PeBenito 0e730c
type node_t;
Chris PeBenito 0e730c
class node rawip_send;
Chris PeBenito 0e730c
class capability net_raw;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_receive_raw_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_general_node',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_t:node rawip_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_general_node_depend',`
Chris PeBenito 0e730c
type node_t;
Chris PeBenito 0e730c
class node rawip_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_tcp_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_general_node',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_t:tcp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_general_node_depend',`
Chris PeBenito 0e730c
type node_t;
Chris PeBenito 0e730c
class tcp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_udp_on_general_node(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_general_node',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_t:udp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_general_node_depend',`
Chris PeBenito 0e730c
type node_t;
Chris PeBenito 0e730c
class udp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_tcp_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_all_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_type:node { tcp_send tcp_recv };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_all_nodes_depend',`
Chris PeBenito 0e730c
attribute node_type;
Chris PeBenito 0e730c
class node { tcp_send tcp_recv };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_udp_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_all_nodes',`
Chris PeBenito bd202f
corenetwork_send_udp_on_all_nodes($1)
Chris PeBenito bd202f
corenetwork_receive_udp_on_all_nodes($1)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_raw_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_raw_on_all_nodes',`
Chris PeBenito 0e730c
corenetwork_send_raw_on_all_nodes($1,optional)
Chris PeBenito 0e730c
corenetwork_receive_raw_on_all_nodes($1,optional)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_udp_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_all_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_type:node udp_send;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_all_nodes_depend',`
Chris PeBenito 0e730c
attribute node_type;
Chris PeBenito 0e730c
class node udp_send;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_receive_udp_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_all_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_type:node udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_all_nodes_depend',`
Chris PeBenito 0e730c
attribute node_type;
Chris PeBenito 0e730c
class node udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_raw_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_raw_on_all_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_type:node rawip_send;
Chris PeBenito 0e730c
allow $1 self:capability net_raw;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_raw_on_all_nodes_depend',`
Chris PeBenito 0e730c
attribute node_type;
Chris PeBenito 0e730c
class node rawip_send;
Chris PeBenito 0e730c
class capability net_raw;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_receive_raw_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_all_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_type:node rawip_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_all_nodes_depend',`
Chris PeBenito 0e730c
attribute node_type;
Chris PeBenito 0e730c
class node rawip_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_tcp_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_all_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_type:tcp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito bd202f
define(`corenetwork_bind_tcp_on_all_nodes_depend',`
Chris PeBenito 219bcf
attribute node_type;
Chris PeBenito 0e730c
class tcp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_udp_on_all_nodes(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_all_nodes',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 node_type:udp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_all_nodes_depend',`
Chris PeBenito 219bcf
attribute node_type;
Chris PeBenito 0e730c
class udp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_tcp_on_general_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_general_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_t:tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_general_port_depend',`
Chris PeBenito 0e730c
type port_t;
Chris PeBenito 0e730c
class tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_udp_on_general_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_general_port',`
Chris PeBenito bd202f
corenetwork_send_udp_on_general_port($1)
Chris PeBenito bd202f
corenetwork_receive_udp_on_general_port($1)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_udp_on_general_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_general_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_t:udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_general_port_depend',`
Chris PeBenito 0e730c
type port_t;
Chris PeBenito 0e730c
class udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_receive_udp_on_general_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_general_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_t:udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_general_port_depend',`
Chris PeBenito 0e730c
type port_t;
Chris PeBenito 0e730c
class udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_tcp_on_general_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_general_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_t:tcp_socket name_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_general_port_depend',`
Chris PeBenito 0e730c
type port_t;
Chris PeBenito 0e730c
class tcp_socket name_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_udp_on_general_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_general_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_t:udp_socket name_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_general_port_depend',`
Chris PeBenito 0e730c
type port_t;
Chris PeBenito 0e730c
class udp_socket name_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_tcp_on_all_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_all_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_type:tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_all_ports_depend',`
Chris PeBenito 0e730c
attribute port_type;
Chris PeBenito 0e730c
class tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_udp_on_all_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_all_ports',`
Chris PeBenito bd202f
corenetwork_send_udp_on_all_ports($1)
Chris PeBenito bd202f
corenetwork_receive_udp_on_all_ports($1)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_udp_on_all_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_all_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_type:udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_all_ports_depend',`
Chris PeBenito 0e730c
attribute port_type;
Chris PeBenito 0e730c
class udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_receive_udp_on_all_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_all_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_type:udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_all_ports_depend',`
Chris PeBenito 0e730c
attribute port_type;
Chris PeBenito 0e730c
class udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
# corenetwork_bind_tcp_on_all_ports(domain,[`optional'])
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_all_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_type:tcp_socket name_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito bd202f
define(`corenetwork_bind_tcp_on_all_ports_depend',`
Chris PeBenito 23af43
attribute port_type;
Chris PeBenito 0e730c
class tcp_socket name_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_udp_on_all_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_all_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 port_type:udp_socket name_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_all_ports_depend',`
Chris PeBenito 23af43
attribute port_type;
Chris PeBenito 0e730c
class udp_socket name_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_tcp_on_reserved_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_reserved_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_t:tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_reserved_port_depend',`
Chris PeBenito 0e730c
type reserved_port_t;
Chris PeBenito 0e730c
class tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_udp_on_reserved_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_reserved_port',`
Chris PeBenito 0e730c
corenetwork_send_udp_on_reserved_port($1,$2)
Chris PeBenito 0e730c
corenetwork_receive_udp_on_reserved_port($1,$2)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_udp_on_reserved_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_reserved_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_t:udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_reserved_port_depend',`
Chris PeBenito 0e730c
type reserved_port_t;
Chris PeBenito 0e730c
class udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_receive_udp_on_reserved_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_reserved_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_t:udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_reserved_port_depend',`
Chris PeBenito 0e730c
type reserved_port_t;
Chris PeBenito 0e730c
class udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_tcp_on_reserved_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_reserved_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_t:tcp_socket name_bind;
Chris PeBenito 0e730c
allow $1 self:capability net_bind_service;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_reserved_port_depend',`
Chris PeBenito 0e730c
type reserved_port_t;
Chris PeBenito 0e730c
class tcp_socket name_bind;
Chris PeBenito 0e730c
class capability net_bind_service;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_udp_on_reserved_port(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_reserved_port',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_t:udp_socket name_bind;
Chris PeBenito 0e730c
allow $1 self:capability net_bind_service;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_reserved_port_depend',`
Chris PeBenito 0e730c
type reserved_port_t;
Chris PeBenito 0e730c
class udp_socket name_bind;
Chris PeBenito 0e730c
class capability net_bind_service;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_tcp_on_all_reserved_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_all_reserved_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_type:tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_all_reserved_ports_depend',`
Chris PeBenito 0e730c
attribute reserved_port_type;
Chris PeBenito 0e730c
class tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_network_udp_on_all_reserved_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_all_reserved_ports',`
Chris PeBenito 0e730c
corenetwork_send_udp_on_all_reserved_ports($1,optional)
Chris PeBenito 0e730c
corenetwork_receive_udp_on_all_reserved_ports($1,optional)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_send_udp_on_all_reserved_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_all_reserved_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_type:udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_all_reserved_ports_depend',`
Chris PeBenito 0e730c
attribute reserved_port_type;
Chris PeBenito 0e730c
class udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_receive_udp_on_all_reserved_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_all_reserved_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_type:udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_all_reserved_ports_depend',`
Chris PeBenito 0e730c
attribute reserved_port_type;
Chris PeBenito 0e730c
class udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito bd202f
# corenetwork_bind_tcp_on_all_reserved_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_all_reserved_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_type:tcp_socket name_bind;
Chris PeBenito 0e730c
allow $1 self:capability net_bind_service;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito bd202f
define(`corenetwork_bind_tcp_on_all_reserved_ports_depend',`
Chris PeBenito a2d824
attribute reserved_port_type;
Chris PeBenito 0e730c
class tcp_socket name_bind;
Chris PeBenito 0e730c
class capability net_bind_service;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
#######################################
Chris PeBenito 0e730c
#
Chris PeBenito b16c6b
# corenetwork_ignore_bind_tcp_on_all_reserved_ports(domain)
Chris PeBenito b16c6b
#
Chris PeBenito b16c6b
define(`corenetwork_ignore_bind_tcp_on_all_reserved_ports',`
Chris PeBenito b16c6b
requires_block_template(`$0'_depend)
Chris PeBenito b16c6b
dontaudit $1 reserved_port_type:tcp_socket name_bind;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
define(`corenetwork_ignore_bind_tcp_on_all_reserved_ports_depend',`
Chris PeBenito b16c6b
attribute reserved_port_type;
Chris PeBenito b16c6b
class tcp_socket name_bind;
Chris PeBenito b16c6b
')
Chris PeBenito b16c6b
Chris PeBenito b16c6b
#######################################
Chris PeBenito b16c6b
#
Chris PeBenito bd202f
# corenetwork_bind_udp_on_all_reserved_ports(domain)
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_all_reserved_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito 0e730c
allow $1 reserved_port_type:udp_socket name_bind;
Chris PeBenito 0e730c
allow $1 self:capability net_bind_service;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_all_reserved_ports_depend',`
Chris PeBenito a2d824
attribute reserved_port_type;
Chris PeBenito 0e730c
class udp_socket name_bind;
Chris PeBenito 0e730c
class self:capability net_bind_service;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito a2d824
#######################################
Chris PeBenito a2d824
#
Chris PeBenito bd202f
# corenetwork_ignore_bind_tcp_on_all_reserved_ports(domain)
Chris PeBenito a2d824
#
Chris PeBenito a2d824
define(`corenetwork_ignore_bind_tcp_on_all_reserved_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito a2d824
dontaudit $1 reserved_port_type:tcp_socket name_bind;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
define(`corenetwork_ignore_bind_udp_on_all_reserved_ports_depend',`
Chris PeBenito a2d824
attribute reserved_port_type;
Chris PeBenito a2d824
class tcp_socket name_bind;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
#######################################
Chris PeBenito a2d824
#
Chris PeBenito bd202f
# corenetwork_ignore_bind_udp_on_all_reserved_ports(domain)
Chris PeBenito a2d824
#
Chris PeBenito a2d824
define(`corenetwork_ignore_bind_udp_on_all_reserved_ports',`
Chris PeBenito bd202f
requires_block_template(`$0'_depend)
Chris PeBenito a2d824
dontaudit $1 reserved_port_type:udp_socket name_bind;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito a2d824
define(`corenetwork_ignore_bind_udp_on_all_reserved_ports_depend',`
Chris PeBenito a2d824
attribute reserved_port_type;
Chris PeBenito a2d824
class udp_socket name_bind;
Chris PeBenito a2d824
')
Chris PeBenito a2d824
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# This section is processed through m4 to create real interfaces
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
########################################
Chris PeBenito b4cd15
Chris PeBenito b4cd15
# dont generate anything but macros on this pass
Chris PeBenito b4cd15
ifdef(`interface_pass',`
Chris PeBenito b4cd15
define(`allow',`dnl')
Chris PeBenito b4cd15
define(`type',`dnl')
Chris PeBenito b4cd15
define(`attribute',`dnl')
Chris PeBenito b4cd15
define(`portcon',`dnl')
Chris PeBenito b4cd15
define(`devices_make_device_node',`dnl')
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
########################################
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
# Network Interface generated macros 
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
########################################
Chris PeBenito 0e730c
Chris PeBenito b4cd15
define(`create_netif_interfaces',``
Chris PeBenito 085faa
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_network_tcp_on_$1_interface">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and receive TCP network traffic on the $1 interface.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="both" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_$1_interface',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_netif_t:netif { tcp_send tcp_recv };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_$1_interface_depend',`
Chris PeBenito b4cd15
type $1_netif_t;
Chris PeBenito 0e730c
class netif { tcp_send tcp_recv };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_network_udp_on_$1_interface">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and receive UDP network traffic on the $1 interface.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="both" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_$1_interface',`
Chris PeBenito 0e730c
corenetwork_send_udp_on_$1_interface(dollarsone,dollarstwo)
Chris PeBenito 0e730c
corenetwork_receive_udp_on_$1_interface(dollarsone,dollarstwo)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_network_raw_on_$1_interface">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and receive raw IP packets on the $1 interface.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="both" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_raw_on_$1_interface',`
Chris PeBenito 0e730c
corenetwork_send_raw_on_$1_interface(dollarsone,dollarstwo)
Chris PeBenito 0e730c
corenetwork_receive_raw_on_$1_interface(dollarsone,dollarstwo)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_send_udp_on_$1_interface">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send UDP network traffic on the $1 interface.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="write" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_$1_interface',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito b4cd15
allow dollarsone $1_netif_t:netif udp_send;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_$1_interface_depend',`
Chris PeBenito b4cd15
type $1_netif_t;
Chris PeBenito b4cd15
class netif udp_send;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_receive_udp_on_$1_interface">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Receive UDP network traffic on the $1 interface.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="read" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_$1_interface',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_netif_t:netif udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_$1_interface_depend',`
Chris PeBenito 0e730c
type $1_netif_t;
Chris PeBenito 0e730c
class netif udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_send_raw_on_$1_interface">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send raw IP packets on the $1 interface.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="write" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_send_raw_on_$1_interface',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito b4cd15
allow dollarsone $1_netif_t:netif rawip_send;
Chris PeBenito b4cd15
allow dollarsone self:capability net_raw;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`corenetwork_send_raw_on_$1_interface_depend',`
Chris PeBenito b4cd15
type $1_netif_t;
Chris PeBenito b4cd15
class netif rawip_send;
Chris PeBenito b4cd15
class capability net_raw;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_receive_raw_on_$1_interface">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Receive raw IP packets on the $1 interface.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="read" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_$1_interface',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_netif_t:netif rawip_recv;
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_$1_interface_depend',`
Chris PeBenito b4cd15
type $1_netif_t;
Chris PeBenito 0e730c
class netif rawip_recv;
Chris PeBenito b4cd15
')
Chris PeBenito 0e730c
'') dnl end create_netif_interfaces
Chris PeBenito b4cd15
Chris PeBenito 0e730c
########################################
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
# Network node generated macros 
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
########################################
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`create_node_interfaces',``
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_network_tcp_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and receive TCP traffic on the $1 node.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="both" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_$1_node',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_node_t:node { tcp_send tcp_recv };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_$1_node_depend',`
Chris PeBenito 0e730c
type $1_node_t;
Chris PeBenito 0e730c
class node { tcp_send tcp_recv };
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_network_udp_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and receive UDP traffic on the $1 node.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="both" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito b4cd15
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_$1_node',`
Chris PeBenito bd202f
corenetwork_send_udp_on_$1_node(dollarsone)
Chris PeBenito bd202f
corenetwork_receive_udp_on_$1_node(dollarsone)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_network_raw_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and receive raw IP packets on the $1 node.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="both" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_raw_on_$1_node',`
Chris PeBenito bd202f
corenetwork_send_raw_on_$1_node(dollarsone)
Chris PeBenito bd202f
corenetwork_receive_raw_on_$1_node(dollarsone)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_send_udp_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and UDP traffic on the $1 node.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="write" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_$1_node',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_node_t:node udp_send;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_$1_node_depend',`
Chris PeBenito 0e730c
type $1_node_t;
Chris PeBenito 0e730c
class node udp_send;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_receive_udp_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Receive UDP traffic on the $1 node.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="read" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_$1_node',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_node_t:node udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_$1_node_depend',`
Chris PeBenito 0e730c
type $1_node_t;
Chris PeBenito 0e730c
class node udp_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_send_raw_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send raw IP packets on the $1 node.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="write" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_raw_on_$1_node',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_node_t:node rawip_send;
Chris PeBenito 0e730c
allow dollarsone self:capability net_raw;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_raw_on_$1_node_depend',`
Chris PeBenito 0e730c
type $1_node_t;
Chris PeBenito 0e730c
class node rawip_send;
Chris PeBenito 0e730c
class capability net_raw;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_receive_raw_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Receive raw IP packets on the $1 node.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="write" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_$1_node',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_node_t:node rawip_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_raw_on_$1_node_depend',`
Chris PeBenito 0e730c
type $1_node_t;
Chris PeBenito 0e730c
class node rawip_recv;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_bind_tcp_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Bind TCP sockets to node $1.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="none"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_$1_node',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_node_t:tcp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_$1_node_depend',`
Chris PeBenito 0e730c
type $1_node_t;
Chris PeBenito 0e730c
class tcp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_bind_udp_on_$1_node">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Bind UDP sockets to the $1 node.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="none"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_$1_node',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_node_t:udp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_$1_node_depend',`
Chris PeBenito 0e730c
type $1_node_t;
Chris PeBenito 0e730c
class udp_socket node_bind;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
'') dnl end create_node_interfaces
Chris PeBenito 0e730c
Chris PeBenito 0e730c
########################################
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
# Network port generated macros 
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
########################################
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`create_port_interfaces',``
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_network_tcp_on_$1_port">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and receive TCP traffic on the $1 port.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="both" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_$1_port',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_port_t:tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_network_tcp_on_$1_port_depend',`
Chris PeBenito 0e730c
type $1_port_t;
Chris PeBenito 0e730c
class tcp_socket { send_msg recv_msg };
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_network_udp_on_$1_port">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send and receive UDP traffic on the $1 port.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="both" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_network_udp_on_$1_port',`
Chris PeBenito 0e730c
corenetwork_send_udp_on_$1_port(dollarsone,dollarstwo)
Chris PeBenito 0e730c
corenetwork_receive_udp_on_$1_port(dollarsone,dollarstwo)
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_send_udp_on_$1_port">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Send UDP traffic on the $1 port.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="write" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_$1_port',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_port_t:udp_socket send_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_send_udp_on_$1_port_depend',`
Chris PeBenito 0e730c
type $1_port_t;
Chris PeBenito 0e730c
class udp_socket send_msg;
Chris PeBenito b4cd15
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_receive_udp_on_$1_port">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Receive UDP traffic on the $1 port.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="read" weight="10"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_$1_port',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_port_t:udp recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_receive_udp_on_$1_port_depend',`
Chris PeBenito 0e730c
type $1_port_t;
Chris PeBenito 0e730c
class udp_socket recv_msg;
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_bind_tcp_on_$1_port">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Bind TCP sockets to the $1 port.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="none"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_$1_port',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_port_t:tcp_socket name_bind;
Chris PeBenito 0e730c
$2
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_tcp_on_$1_port_depend',`
Chris PeBenito 0e730c
type $1_port_t;
Chris PeBenito 0e730c
class tcp_socket name_bind;
Chris PeBenito 0e730c
$3
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 085faa
########################################
Chris PeBenito 085faa
## <interface name="corenetwork_bind_udp_on_$1_port">
Chris PeBenito 085faa
##	<description>
Chris PeBenito 085faa
##		Bind UDP sockets to the $1 port.
Chris PeBenito 085faa
##	</description>
Chris PeBenito 085faa
##	<parameter name="domain">
Chris PeBenito 085faa
##		The type of the process performing this action.
Chris PeBenito 085faa
##	</parameter>
Chris PeBenito 085faa
##	<infoflow type="none"/>
Chris PeBenito 085faa
## </interface>
Chris PeBenito 0e730c
#
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_$1_port',`
Chris PeBenito bd202f
requires_block_template(`dollarszero'_depend)
Chris PeBenito 0e730c
allow dollarsone $1_port_t:udp_socket name_bind;
Chris PeBenito 0e730c
$2
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`corenetwork_bind_udp_on_$1_port_depend',`
Chris PeBenito 0e730c
type $1_port_t;
Chris PeBenito 0e730c
class udp_socket name_bind;
Chris PeBenito 0e730c
$3
Chris PeBenito 0e730c
')
Chris PeBenito 0e730c
'') dnl end create_port_interfaces
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito 085faa
# network_interface(linux_interfacename,mls_sensitivity)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`network_interface',`
Chris PeBenito b4cd15
ifdef(`interface_pass',`
Chris PeBenito b4cd15
create_netif_interfaces($1)
Chris PeBenito b4cd15
',`
Chris PeBenito b4cd15
type $1_netif_t alias netif_$1_t, netif_type;
Chris PeBenito b4cd15
requires_block_template(`type unlabeled_t')
Chris PeBenito 085faa
netifcon $1 context_template(system_u:object_r:$1_netif_t,$2) context_template(system_u:object_r:unlabeled_t,$2)
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito 085faa
# network_node(node_name,mls_sensitivity,address,netmask)
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`network_node',`
Chris PeBenito b4cd15
ifdef(`interface_pass',`
Chris PeBenito 0e730c
create_node_interfaces($1)
Chris PeBenito b4cd15
',`
Chris PeBenito b4cd15
type $1_node_t alias node_$1_t, node_type;
Chris PeBenito 085faa
nodecon $3 $4 context_template(system_u:object_r:$1_node_t,$2)
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito 0e730c
define(`determine_reserved_capability',`dnl
Chris PeBenito 0e730c
ifelse(eval($2 < 1024),1,``allow' dollarsone self:capability net_bind_service;',`dnl
Chris PeBenito 0e730c
ifelse($3,`',`',`determine_reserved_capability(shiftn(2,$*))')dnl end inner ifelse
Chris PeBenito 0e730c
')dnl end outer ifelse
Chris PeBenito 0e730c
') dnl end determine reserved capability
Chris PeBenito 0e730c
Chris PeBenito 0e730c
define(`determine_reserved_capability_depend',`dnl
Chris PeBenito 0e730c
ifelse(eval($2 < 1024),1,`class capability net_bind_service;',`dnl
Chris PeBenito 0e730c
ifelse($3,`',`',`determine_reserved_capability_depend(shiftn(2,$*))')dnl end inner ifelse
Chris PeBenito 0e730c
')dnl end outer ifelse
Chris PeBenito 0e730c
') dnl end determine reserved capability depend
Chris PeBenito 0e730c
Chris PeBenito b4cd15
define(`declare_ports',`dnl
Chris PeBenito b4cd15
ifelse(eval($3 < 1024),1,`typeattribute $1 reserved_port_type;',`dnl')
Chris PeBenito b4cd15
portcon $2 $3 system_u:object_r:$1
Chris PeBenito b4cd15
ifelse(`$4',`',`',`declare_ports($1,shiftn(3,$*))')dnl
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
# network_port(port_name,protocol portnum [,protocol portnum[,...]])
Chris PeBenito b4cd15
#
Chris PeBenito b4cd15
define(`network_port',`
Chris PeBenito b4cd15
ifdef(`interface_pass',`
Chris PeBenito 0e730c
create_port_interfaces($1,determine_reserved_capability(shift($*)),determine_reserved_capability_depend(shift($*)))
Chris PeBenito b4cd15
',`
Chris PeBenito b4cd15
type $1_port_t, port_type;
Chris PeBenito b4cd15
declare_ports($1_port_t,shift($*))
Chris PeBenito b4cd15
')
Chris PeBenito b4cd15
')
Chris PeBenito 085faa
Chris PeBenito 085faa
## </module>