/daten/src/linux-2.4.27-rsbac-v1.2.3/include/rsbac/network_types.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
#ifndef __RSBAC_NETWORK_TYPES_H
00010
#define __RSBAC_NETWORK_TYPES_H
00011
00012 #define RSBAC_NET_ANY 0
00013 #define RSBAC_NET_UNKNOWN 0
00014
00015 #define RSBAC_NET_TEMP_VERSION 1
00016 #define RSBAC_NET_TEMP_KEY 0x815affe
00017 #define RSBAC_NET_TEMP_NAME "nettemp"
00018
00019 typedef __u32
rsbac_net_temp_id_t;
00020
00021 #define RSBAC_NET_MAX_ADDRESS_LEN 128
00022 #define RSBAC_NET_TEMP_NAMELEN 16
00023
00024 struct rsbac_net_temp_data_t
00025 {
00026
00027 char address[
RSBAC_NET_MAX_ADDRESS_LEN];
00028 __u8
address_family;
00029 __u8
valid_len;
00030 __u8
type;
00031 __u8
protocol;
00032 rsbac_netdev_id_t netdev;
00033 __u16
min_port;
00034 __u16
max_port;
00035 char name[
RSBAC_NET_TEMP_NAMELEN];
00036 };
00037
00038
00039 #define RSBAC_NET_TEMP_DEFAULT_DATA \
00040
{ \
00041
"", \
00042 AF_MAX, \
00043 0, \
00044 RSBAC_NET_ANY, \
00045 RSBAC_NET_ANY, \
00046 "", \
00047 0, \
00048 0, \
00049 "DEFAULT" \
00050 }
00051
00052
00053 #define RSBAC_NET_TEMP_UNIX_ID 100010
00054 #define RSBAC_NET_TEMP_UNIX_DATA \
00055
{ \
00056
"", \
00057 AF_UNIX, \
00058 0, \
00059 0, \
00060 0, \
00061 "", \
00062 0, \
00063 0, \
00064 "AF_UNIX" \
00065 }
00066
00067
00068 #define RSBAC_NET_TEMP_LNET_ID 100101
00069 #define RSBAC_NET_TEMP_LNET_ADDRESS "127.0.0.0"
00070 #define RSBAC_NET_TEMP_LNET_DATA \
00071
{ \
00072
"", \
00073 AF_INET, \
00074 8, \
00075 RSBAC_NET_ANY, \
00076 RSBAC_NET_ANY, \
00077 "", \
00078 0, \
00079 65535, \
00080 "localnet" \
00081 }
00082
00083
00084 #define RSBAC_NET_TEMP_LAN_ID 100102
00085 #define RSBAC_NET_TEMP_LAN_ADDRESS "192.168.0.0"
00086 #define RSBAC_NET_TEMP_LAN_DATA \
00087
{ \
00088
"", \
00089 AF_INET, \
00090 16, \
00091 RSBAC_NET_ANY, \
00092 RSBAC_NET_ANY, \
00093 "", \
00094 0, \
00095 65535, \
00096 "Internal LAN" \
00097 }
00098
00099
00100
00101 #define RSBAC_NET_TEMP_AUTO_ID 100105
00102 #define RSBAC_NET_TEMP_AUTO_ADDRESS "0.0.0.0"
00103 #define RSBAC_NET_TEMP_AUTO_DATA \
00104
{ \
00105
"", \
00106 AF_INET, \
00107 32, \
00108 RSBAC_NET_ANY, \
00109 RSBAC_NET_ANY, \
00110 "", \
00111 0, \
00112 65535, \
00113 "Auto-IPv4" \
00114 }
00115
00116
00117 #define RSBAC_NET_TEMP_INET_ID 100110
00118 #define RSBAC_NET_TEMP_INET_DATA \
00119
{ \
00120
"", \
00121 AF_INET, \
00122 0, \
00123 RSBAC_NET_ANY, \
00124 RSBAC_NET_ANY, \
00125 "", \
00126 0, \
00127 65535, \
00128 "AF_INET" \
00129 }
00130
00131
00132 #define RSBAC_NET_TEMP_ALL_ID ((rsbac_net_temp_id_t) -1)
00133 #define RSBAC_NET_TEMP_ALL_DATA \
00134
{ \
00135
"", \
00136 RSBAC_NET_ANY, \
00137 0, \
00138 RSBAC_NET_ANY, \
00139 RSBAC_NET_ANY, \
00140 "", \
00141 0, \
00142 65535, \
00143 "ALL" \
00144 }
00145
00146 struct rsbac_net_description_t
00147 {
00148 __u8
address_family;
00149 void *
address;
00150 __u8
address_len;
00151 __u8
type;
00152 __u8
protocol;
00153 rsbac_netdev_id_t netdev;
00154 __u16
port;
00155 };
00156
00157 enum rsbac_net_temp_syscall_t
00158 {
00159
NTS_new_template,
00160
NTS_copy_template,
00161
NTS_delete_template,
00162
NTS_check_id,
00163
NTS_get_address,
00164
NTS_get_address_family,
00165
NTS_get_valid_len,
00166
NTS_get_type,
00167
NTS_get_protocol,
00168
NTS_get_netdev,
00169
NTS_get_min_port,
00170
NTS_get_max_port,
00171
NTS_get_name,
00172
NTS_set_address,
00173
NTS_set_address_family,
00174
NTS_set_valid_len,
00175
NTS_set_type,
00176
NTS_set_protocol,
00177
NTS_set_netdev,
00178
NTS_set_min_port,
00179
NTS_set_max_port,
00180
NTS_set_name,
00181
NTS_none
00182 };
00183
00184 union rsbac_net_temp_syscall_data_t
00185 {
00186 rsbac_net_temp_id_t id;
00187 char address[
RSBAC_NET_MAX_ADDRESS_LEN];
00188 __u8
address_family;
00189 __u8
valid_len;
00190 __u8
type;
00191 __u8
protocol;
00192 rsbac_netdev_id_t netdev;
00193 __u16
min_port;
00194 __u16
max_port;
00195 char name[
RSBAC_NET_TEMP_NAMELEN];
00196 };
00197
00198
00199
00200
00201
00202
#ifndef NIPQUAD
00203 #define NIPQUAD(addr) \
00204
((unsigned char *)&addr)[0], \
00205
((unsigned char *)&addr)[1], \
00206
((unsigned char *)&addr)[2], \
00207
((unsigned char *)&addr)[3]
00208
00209 #define HIPQUAD(addr) \
00210
((unsigned char *)&addr)[3], \
00211
((unsigned char *)&addr)[2], \
00212
((unsigned char *)&addr)[1], \
00213
((unsigned char *)&addr)[0]
00214
#endif
00215
00216
#endif
Generated on Tue Aug 31 10:05:22 2004 for RSBAC by
1.3.8