network.h

Go to the documentation of this file.
00001 /************************************* */
00002 /* Rule Set Based Access Control       */
00003 /* Author and (c) 1999-2004:           */
00004 /*   Amon Ott <ao@rsbac.org>           */
00005 /* Network helper functions            */
00006 /* Last modified: 07/Dec/2004          */
00007 /************************************* */
00008 
00009 #ifndef __RSBAC_NETWORK_H
00010 #define __RSBAC_NETWORK_H
00011 
00012 #include <rsbac/types.h>
00013 #include <rsbac/network_types.h>
00014 #include <linux/net.h>
00015 #include <linux/un.h>
00016 #include <net/sock.h>
00017 #include <net/af_unix.h>
00018 #include <net/route.h>
00019 
00020 /* functions */
00021 
00022 int rsbac_ta_net_list_all_netdev(rsbac_list_ta_number_t ta_number, rsbac_netdev_id_t ** id_pp);
00023 
00024 static inline int rsbac_net_list_all_netdev(rsbac_netdev_id_t ** id_pp)
00025   {
00026     return rsbac_ta_net_list_all_netdev(0, id_pp);
00027   }
00028 
00029 __u32 rsbac_net_make_mask_u32(__u8 valid_bits);
00030 
00031 int rsbac_net_compare_data(void * data1, void * data2);
00032 
00033 int rsbac_net_get_id(
00034          rsbac_list_ta_number_t ta_number,
00035   struct rsbac_net_description_t * desc_p,
00036          rsbac_net_temp_id_t * id_p);
00037 
00038 // void rsbac_net_obj_cleanup(rsbac_net_obj_id_t netobj);
00039 
00040 int rsbac_ta_net_lookup_templates(
00041          rsbac_list_ta_number_t ta_number,
00042   struct rsbac_net_obj_desc_t * netobj_p,
00043          rsbac_net_temp_id_t * local_temp_p,
00044          rsbac_net_temp_id_t * remote_temp_p);
00045 
00046 static inline int rsbac_net_lookup_templates(
00047   struct rsbac_net_obj_desc_t * netobj_p,
00048          rsbac_net_temp_id_t * local_temp_p,
00049          rsbac_net_temp_id_t * remote_temp_p)
00050   {
00051     return rsbac_ta_net_lookup_templates(0, netobj_p, local_temp_p, remote_temp_p);
00052   }
00053 
00054 int rsbac_ta_net_template(
00055   rsbac_list_ta_number_t ta_number,
00056   enum rsbac_net_temp_syscall_t call,
00057   rsbac_net_temp_id_t id,
00058   union rsbac_net_temp_syscall_data_t * data_p);
00059 
00060 static inline int rsbac_net_template(enum rsbac_net_temp_syscall_t call,
00061                        rsbac_net_temp_id_t id,
00062                        union rsbac_net_temp_syscall_data_t * data_p)
00063   {
00064     return rsbac_ta_net_template(0, call, id, data_p);
00065   }
00066 
00067 int rsbac_ta_net_list_all_template(rsbac_list_ta_number_t ta_number,
00068                                    rsbac_net_temp_id_t ** id_pp);
00069 
00070 static inline int rsbac_net_list_all_template(rsbac_net_temp_id_t ** id_pp)
00071   {
00072     return rsbac_ta_net_list_all_template(0, id_pp);
00073   }
00074 
00075 int rsbac_ta_net_template_exist(rsbac_list_ta_number_t ta_number, rsbac_net_temp_id_t temp);
00076 
00077 static inline int rsbac_net_template_exist(rsbac_net_temp_id_t temp)
00078   {
00079     return rsbac_ta_net_template_exist(0, temp);
00080   }
00081 
00082 /* Whether request should be checked for remote endpoint */
00083 int rsbac_net_remote_request(enum rsbac_adf_request_t request);
00084 
00085 #endif

Generated on Fri Jun 17 09:45:18 2005 for RSBAC by  doxygen 1.4.2