net_getname.c File Reference

#include <rsbac/types.h>
#include <rsbac/getname.h>
#include <rsbac/net_getname.h>
#include <rsbac/helpers.h>
#include <rsbac/error.h>
#include <linux/socket.h>
#include <string.h>

Go to the source code of this file.

Defines

#define NR_PROTO   18

Functions

char * rsbac_get_net_temp_syscall_name (char *name, enum rsbac_net_temp_syscall_t value)
enum rsbac_net_temp_syscall_t rsbac_get_net_temp_syscall_nr (const char *name)
char * rsbac_get_net_family_name (char *name, u_int value)
int rsbac_get_net_family_nr (const char *name)
char * rsbac_get_net_protocol_name (char *name, u_int value)
int rsbac_get_net_protocol_nr (const char *name)
char * rsbac_get_net_type_name (char *name, u_int value)
int rsbac_get_net_type_nr (const char *name)

Variables

static char net_temp_syscall_list [NTS_none+1][19]
static char net_family_list [AF_MAX+1][19]
static struct proto_desc_t net_protocol_list [NR_PROTO]
static char rsbac_net_type_list [RSBAC_NET_TYPE_MAX+1][19]


Define Documentation

#define NR_PROTO   18
 

Definition at line 90 of file net_getname.c.


Function Documentation

char* rsbac_get_net_family_name char *  name,
u_int  value
 

Definition at line 167 of file net_getname.c.

References AF_MAX, net_family_list, and NULL.

Referenced by get_target_name().

int rsbac_get_net_family_nr const char *  name  ) 
 

Definition at line 180 of file net_getname.c.

References AF_MAX, and net_family_list.

char* rsbac_get_net_protocol_name char *  name,
u_int  value
 

Definition at line 202 of file net_getname.c.

References proto_desc_t::nr, NULL, and RSBAC_NET_PROTO_MAX.

Referenced by get_target_name().

int rsbac_get_net_protocol_nr const char *  name  ) 
 

Definition at line 227 of file net_getname.c.

References proto_desc_t::nr, and RSBAC_NET_PROTO_MAX.

char* rsbac_get_net_temp_syscall_name char *  name,
enum rsbac_net_temp_syscall_t  value
 

Definition at line 132 of file net_getname.c.

References net_temp_syscall_list, NTS_none, and NULL.

enum rsbac_net_temp_syscall_t rsbac_get_net_temp_syscall_nr const char *  name  ) 
 

Definition at line 145 of file net_getname.c.

References net_temp_syscall_list, and NTS_none.

char* rsbac_get_net_type_name char *  name,
u_int  value
 

Definition at line 249 of file net_getname.c.

References NULL, rsbac_net_type_list, and RSBAC_NET_TYPE_MAX.

Referenced by get_target_name().

int rsbac_get_net_type_nr const char *  name  ) 
 

Definition at line 262 of file net_getname.c.

References rsbac_net_type_list, and RSBAC_NET_TYPE_MAX.


Variable Documentation

char net_family_list[AF_MAX+1][19] [static]
 

Definition at line 50 of file net_getname.c.

Referenced by rsbac_get_net_family_name(), and rsbac_get_net_family_nr().

struct proto_desc_t net_protocol_list[NR_PROTO] [static]
 

Initial value:

 {
                      {"ANY", 0},       
                      {"ICMP", 1},      
                      {"IGMP", 2},      
                      {"IPIP", 4},      
                      {"TCP", 6},       
                      {"EGP", 8},       
                      {"PUP", 12},      
                      {"UDP", 17},      
                      {"IDP", 22},      
                      {"RSVP", 46},     
                      {"GRE", 47},      
                      {"IPV6", 41},     
                      {"PIM", 103},     
                      {"ESP", 50},      
                      {"AH", 51},       
                      {"COMP", 108},    
                      {"RAW", 255},     
                      {"MAX", RSBAC_NET_PROTO_MAX} }

Definition at line 92 of file net_getname.c.

char net_temp_syscall_list[NTS_none+1][19] [static]
 

Initial value:

 {
                          "new_template",
                          "copy_template",
                          "delete_template",
                          "check_id",
                          "get_address",
                          "get_address_family",
                          "get_valid_len",
                          "get_type",
                          "get_protocol",
                          "get_netdev",
                          "get_min_port",
                          "get_max_port",
                          "get_name",
                          "set_address",
                          "set_address_family",
                          "set_valid_len",
                          "set_type",
                          "set_protocol",
                          "set_netdev",
                          "set_min_port",
                          "set_max_port",
                          "set_name",
                          "none" }

Definition at line 25 of file net_getname.c.

Referenced by rsbac_get_net_temp_syscall_name(), and rsbac_get_net_temp_syscall_nr().

char rsbac_net_type_list[RSBAC_NET_TYPE_MAX+1][19] [static]
 

Initial value:

 {
                      "ANY",
                      "STREAM",         
                      "DGRAM",          
                      "RAW",            
                      "RDM",            
                      "SEQPACKET",      
                      "(undefined)",    
                      "(undefined)",    
                      "(undefined)",    
                      "(undefined)",    
                      "PACKET",         
                                        
                                        
                                        
                                        
                      "MAX" }

Definition at line 112 of file net_getname.c.

Referenced by rsbac_get_net_type_name(), and rsbac_get_net_type_nr().


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