2005-10-21 13:11:17 +00:00
|
|
|
#
|
|
|
|
# shiftn(num,list...)
|
|
|
|
#
|
|
|
|
# shift the list num times
|
|
|
|
#
|
|
|
|
define(`shiftn',`ifelse($1,0,`shift($*)',`shiftn(decr($1),shift(shift($*)))')')
|
|
|
|
|
2005-06-08 21:46:39 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Network Interface generated macros
|
|
|
|
#
|
|
|
|
########################################
|
|
|
|
|
|
|
|
define(`create_netif_interfaces',``
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send and receive TCP network traffic on the $1 interface.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2006-01-16 18:48:57 +00:00
|
|
|
interface(`corenet_tcp_sendrecv_$1_if',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:netif { tcp_send tcp_recv };
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send UDP network traffic on the $1 interface.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2006-01-16 18:48:57 +00:00
|
|
|
interface(`corenet_udp_send_$1_if',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:netif udp_send;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Receive UDP network traffic on the $1 interface.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2006-01-16 18:48:57 +00:00
|
|
|
interface(`corenet_udp_receive_$1_if',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:netif udp_recv;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send and receive UDP network traffic on the $1 interface.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2006-01-16 18:48:57 +00:00
|
|
|
interface(`corenet_udp_sendrecv_$1_if',`
|
2006-02-17 15:07:48 +00:00
|
|
|
corenet_udp_send_$1_if(dollarsone)
|
|
|
|
corenet_udp_receive_$1_if(dollarsone)
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send raw IP packets on the $1 interface.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2006-01-16 18:48:57 +00:00
|
|
|
interface(`corenet_raw_send_$1_if',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:netif rawip_send;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Receive raw IP packets on the $1 interface.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2006-01-16 18:48:57 +00:00
|
|
|
interface(`corenet_raw_receive_$1_if',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:netif rawip_recv;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send and receive raw IP packets on the $1 interface.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2006-01-16 18:48:57 +00:00
|
|
|
interface(`corenet_raw_sendrecv_$1_if',`
|
2006-03-30 21:03:42 +00:00
|
|
|
corenet_raw_send_$1_if(dollarsone)
|
|
|
|
corenet_raw_receive_$1_if(dollarsone)
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
'') dnl end create_netif_interfaces
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Network node generated macros
|
|
|
|
#
|
|
|
|
########################################
|
|
|
|
|
|
|
|
define(`create_node_interfaces',``
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send and receive TCP traffic on the $1 node.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_tcp_sendrecv_$1_node',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:node { tcp_send tcp_recv };
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send UDP traffic on the $1 node.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_udp_send_$1_node',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:node udp_send;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Receive UDP traffic on the $1 node.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_udp_receive_$1_node',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:node udp_recv;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send and receive UDP traffic on the $1 node.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_udp_sendrecv_$1_node',`
|
2005-06-08 21:46:39 +00:00
|
|
|
corenet_udp_send_$1_node(dollarsone)
|
|
|
|
corenet_udp_receive_$1_node(dollarsone)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send raw IP packets on the $1 node.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_raw_send_$1_node',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:node rawip_send;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Receive raw IP packets on the $1 node.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_raw_receive_$1_node',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:node rawip_recv;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send and receive raw IP packets on the $1 node.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_raw_sendrecv_$1_node',`
|
2005-06-08 21:46:39 +00:00
|
|
|
corenet_raw_send_$1_node(dollarsone)
|
|
|
|
corenet_raw_receive_$1_node(dollarsone)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Bind TCP sockets to node $1.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_tcp_bind_$1_node',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:tcp_socket node_bind;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Bind UDP sockets to the $1 node.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_udp_bind_$1_node',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:udp_socket node_bind;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
'') dnl end create_node_interfaces
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Network port generated macros
|
|
|
|
#
|
|
|
|
########################################
|
|
|
|
|
|
|
|
define(`create_port_interfaces',``
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send and receive TCP traffic on the $1 port.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_tcp_sendrecv_$1_port',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:tcp_socket { send_msg recv_msg };
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send UDP traffic on the $1 port.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_udp_send_$1_port',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:udp_socket send_msg;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
2006-09-19 17:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to send UDP traffic on the $1 port.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_dontaudit_udp_send_$1_port',`
|
|
|
|
gen_require(`
|
|
|
|
$3 $1_$2;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit dollarsone $1_$2:udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
2005-06-08 21:46:39 +00:00
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Receive UDP traffic on the $1 port.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_udp_receive_$1_port',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:udp_socket recv_msg;
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
2006-09-19 17:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to receive UDP traffic on the $1 port.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_dontaudit_udp_receive_$1_port',`
|
|
|
|
gen_require(`
|
|
|
|
$3 $1_$2;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit dollarsone $1_$2:udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
2005-06-08 21:46:39 +00:00
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Send and receive UDP traffic on the $1 port.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_udp_sendrecv_$1_port',`
|
2005-06-08 21:46:39 +00:00
|
|
|
corenet_udp_send_$1_port(dollarsone)
|
|
|
|
corenet_udp_receive_$1_port(dollarsone)
|
|
|
|
')
|
|
|
|
|
2006-09-19 17:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to send and receive
|
|
|
|
## UDP traffic on the $1 port.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_dontaudit_udp_sendrecv_$1_port',`
|
|
|
|
corenet_dontaudit_udp_send_$1_port(dollarsone)
|
|
|
|
corenet_dontaudit_udp_receive_$1_port(dollarsone)
|
|
|
|
')
|
|
|
|
|
2005-06-08 21:46:39 +00:00
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Bind TCP sockets to the $1 port.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_tcp_bind_$1_port',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-07-22 15:38:01 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:tcp_socket name_bind;
|
|
|
|
$4
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-22 15:38:01 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Bind UDP sockets to the $1 port.
|
2005-07-22 15:38:01 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`corenet_udp_bind_$1_port',`
|
2005-06-17 18:59:34 +00:00
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-06-17 18:59:34 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:udp_socket name_bind;
|
|
|
|
$4
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
2005-07-22 15:38:01 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make a TCP connection to the $1 port.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-05-23 18:31:02 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-22 15:38:01 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corenet_tcp_connect_$1_port',`
|
|
|
|
gen_require(`
|
2006-01-16 18:48:57 +00:00
|
|
|
$3 $1_$2;
|
2005-07-22 15:38:01 +00:00
|
|
|
')
|
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
allow dollarsone $1_$2:tcp_socket name_connect;
|
2005-07-22 15:38:01 +00:00
|
|
|
')
|
2005-06-08 21:46:39 +00:00
|
|
|
'') dnl end create_port_interfaces
|
|
|
|
|
2006-05-23 18:31:02 +00:00
|
|
|
define(`create_packet_interfaces',``
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send $1 packets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_send_$1_packets',`
|
|
|
|
gen_require(`
|
2006-05-23 19:07:22 +00:00
|
|
|
type $1_packet_t;
|
2006-05-23 18:31:02 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow dollarsone $1_packet_t:packet send;
|
|
|
|
')
|
|
|
|
|
2006-09-19 17:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to send $1 packets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_dontaudit_send_$1_packets',`
|
|
|
|
gen_require(`
|
|
|
|
type $1_packet_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit dollarsone $1_packet_t:packet send;
|
|
|
|
')
|
|
|
|
|
2006-05-23 18:31:02 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Receive $1 packets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_receive_$1_packets',`
|
|
|
|
gen_require(`
|
2006-05-23 19:07:22 +00:00
|
|
|
type $1_packet_t;
|
2006-05-23 18:31:02 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow dollarsone $1_packet_t:packet recv;
|
|
|
|
')
|
|
|
|
|
2006-09-19 17:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to receive $1 packets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_dontaudit_receive_$1_packets',`
|
|
|
|
gen_require(`
|
|
|
|
type $1_packet_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit dollarsone $1_packet_t:packet recv;
|
|
|
|
')
|
|
|
|
|
2006-05-23 18:31:02 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send and receive $1 packets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_sendrecv_$1_packets',`
|
|
|
|
corenet_send_$1_packets(dollarsone)
|
|
|
|
corenet_receive_$1_packets(dollarsone)
|
|
|
|
')
|
|
|
|
|
2006-09-19 17:02:29 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to send and receive $1 packets.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
#
|
|
|
|
interface(`corenet_dontaudit_sendrecv_$1_packets',`
|
|
|
|
corenet_dontaudit_send_$1_packets(dollarsone)
|
|
|
|
corenet_dontaudit_receive_$1_packets(dollarsone)
|
|
|
|
')
|
|
|
|
|
2006-05-23 18:31:02 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Relabel packets to $1 the packet type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`corenet_relabelto_$1_packets',`
|
|
|
|
gen_require(`
|
2006-05-23 19:07:22 +00:00
|
|
|
type $1_packet_t;
|
2006-05-23 18:31:02 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow dollarsone $1_packet_t:packet relabelto;
|
|
|
|
')
|
|
|
|
'') dnl end create_port_interfaces
|
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
#
|
|
|
|
# create_netif_*_interfaces(linux_interfacename)
|
|
|
|
#
|
|
|
|
define(`create_netif_type_interfaces',`
|
|
|
|
create_netif_interfaces($1,netif_t,type)
|
|
|
|
')
|
|
|
|
define(`create_netif_attrib_interfaces',`
|
|
|
|
create_netif_interfaces($1,netif,attribute)
|
|
|
|
')
|
|
|
|
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
|
|
|
# network_interface(linux_interfacename,mls_sensitivity)
|
|
|
|
#
|
|
|
|
define(`network_interface',`
|
2006-01-16 18:48:57 +00:00
|
|
|
create_netif_type_interfaces($1)
|
|
|
|
')
|
|
|
|
|
|
|
|
#
|
|
|
|
# create_node_*_interfaces(node_name)
|
|
|
|
#
|
|
|
|
define(`create_node_type_interfaces',`
|
|
|
|
create_node_interfaces($1,node_t,type)
|
|
|
|
')
|
|
|
|
define(`create_node_attrib_interfaces',`
|
|
|
|
create_node_interfaces($1,node,attribute)
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#
|
|
|
|
# network_node(node_name,mls_sensitivity,address,netmask)
|
|
|
|
#
|
|
|
|
define(`network_node',`
|
2006-01-16 18:48:57 +00:00
|
|
|
create_node_type_interfaces($1)
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
# These next three macros have formatting, and should not me indented
|
|
|
|
define(`determine_reserved_capability',`dnl
|
2006-01-16 18:48:57 +00:00
|
|
|
ifelse($2,`',`',`dnl
|
2005-06-08 21:46:39 +00:00
|
|
|
ifelse(eval($2 < 1024),1,``allow' dollarsone self:capability net_bind_service;',`dnl
|
2006-01-16 18:48:57 +00:00
|
|
|
determine_reserved_capability(shiftn(3,$*))dnl
|
|
|
|
')dnl end inner ifelse
|
2005-06-08 21:46:39 +00:00
|
|
|
')dnl end outer ifelse
|
|
|
|
') dnl end determine reserved capability
|
|
|
|
|
2006-01-16 18:48:57 +00:00
|
|
|
#
|
|
|
|
# create_port_*_interfaces(port_name, protocol,portnum,mls_sensitivity [,protocol portnum mls_sensitivity[,...]])
|
|
|
|
# (these wrap create_port_interfaces to handle attributes and types)
|
|
|
|
define(`create_port_type_interfaces',`create_port_interfaces($1,port_t,type,determine_reserved_capability(shift($*)))')
|
|
|
|
define(`create_port_attrib_interfaces',`create_port_interfaces($1,port,attribute,determine_reserved_capability(shift($*)))')
|
2005-06-08 21:46:39 +00:00
|
|
|
|
|
|
|
#
|
2006-01-16 18:48:57 +00:00
|
|
|
# network_port(port_name,protocol portnum mls_sensitivity [,protocol,portnum,mls_sensitivity[,...]])
|
2005-06-08 21:46:39 +00:00
|
|
|
#
|
|
|
|
define(`network_port',`
|
2006-01-16 18:48:57 +00:00
|
|
|
create_port_type_interfaces($*)
|
2006-05-24 21:28:49 +00:00
|
|
|
create_packet_interfaces($1_client)
|
|
|
|
create_packet_interfaces($1_server)
|
2005-06-08 21:46:39 +00:00
|
|
|
')
|
2006-05-23 18:31:02 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# network_packet(packet_name)
|
|
|
|
#
|
|
|
|
define(`network_packet',`
|
|
|
|
create_packet_interfaces($1_client)
|
|
|
|
create_packet_interfaces($1_server)
|
|
|
|
')
|