lib_subnet.c File Reference

#include <libinet.h>

Functions

static int count_occur (char *str, char c)
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)

Variables

char * subnet_err_list []
static char subnet_string [32]

Function Documentation

static int count_occur char *  str,
char  c
[static]
 

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
 


Variable Documentation

char* subnet_err_list[]
 

Initial value:

 
{
  "Error 0",
  "String is too big",
  "Need 3 dots in address",
  "Need 3 dots in netmask",
  "Netmask is not CIDR",
}

char subnet_string[32] [static]
 


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