subnet.h File Reference

Go to the source code of this file.

Data Structures

struct  s_subnet

Defines

#define SUBNET_PREFIX   0
#define SUBNET_NETMASK   1
#define SUBNET_HISTORICAL   2
#define SUBNET_CABLE(Subnet)
#define SUBNET_BCAST(Subnet)
#define SUBNET_ERR_TOO_BIG   1
#define SUBNET_ERR_SYNTAX_IN_ADDR   2
#define SUBNET_ERR_SYNTAX_IN_MASK   3
#define SUBNET_ERR_NOT_CIDR   4

Typedefs

typedef s_subnet t_subnet
typedef int(* t_subnet_walk_proc )(struct in_addr *addr, void *data)

Functions

char * subnet_err_msg (int errcode)
int subnet_in_class_default_nshift (struct in_addr *addr)
int subnet_prefix_from_netmask (struct in_addr *netmask)
int subnet_from_str (char *str, int check_cidr, t_subnet *subnet)
int subnet_is_member (t_subnet *subnet, struct in_addr *inaddr)
int subnet_walk (t_subnet *subnet, t_subnet_walk_proc proc, void *data)
void subnet_print (t_printf_fn printf_fn, t_subnet *subnet)
char * subnet_ntoa (t_subnet *subnet)


Define Documentation

#define SUBNET_BCAST Subnet   ) 
 

Value:

((Subnet)->addr.s_addr |\
                                (~(Subnet)->mask.s_addr))

#define SUBNET_CABLE Subnet   ) 
 

Value:

((Subnet)->addr.s_addr &\
                                (Subnet)->mask.s_addr)

#define SUBNET_ERR_NOT_CIDR   4
 

#define SUBNET_ERR_SYNTAX_IN_ADDR   2
 

#define SUBNET_ERR_SYNTAX_IN_MASK   3
 

#define SUBNET_ERR_TOO_BIG   1
 

#define SUBNET_HISTORICAL   2
 

#define SUBNET_NETMASK   1
 

#define SUBNET_PREFIX   0
 


Typedef Documentation

typedef struct s_subnet t_subnet
 

typedef int(* t_subnet_walk_proc)(struct in_addr *addr, void *data)
 


Function Documentation

char* subnet_err_msg int  errcode  ) 
 

int subnet_from_str char *  str,
int  check_cidr,
t_subnet subnet
 

int subnet_in_class_default_nshift struct in_addr addr  ) 
 

int subnet_is_member t_subnet subnet,
struct in_addr inaddr
 

char* subnet_ntoa t_subnet subnet  ) 
 

int subnet_prefix_from_netmask struct in_addr netmask  ) 
 

void subnet_print t_printf_fn  printf_fn,
t_subnet subnet
 

int subnet_walk t_subnet subnet,
t_subnet_walk_proc  proc,
void *  data
 


Generated on Wed May 24 23:06:03 2006 for LSE/OS by  doxygen 1.4.6