The Netsukuku Project  0.0.9
An Alternative routing method
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
misc.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NMEMB(x)   (sizeof((x))/sizeof(typeof((x)[0])))
 
#define MILLISEC(x)   (((x).tv_sec*1000)+((x).tv_usec/1000))
 
#define MILLISEC_TO_TV(x, t)
 
#define SET_BIT(a, i)   ((a)[(i)/CHAR_BIT] |= 1<<((i)%CHAR_BIT))
 
#define CLR_BIT(a, i)   ((a)[(i)/CHAR_BIT] &= ~(1<<((i)%CHAR_BIT)))
 
#define TEST_BIT(a, i)   (((a)[(i)/CHAR_BIT] & (1<<((i)%CHAR_BIT))) ? 1 : 0)
 
#define FIND_PTR(p, a, n)
 
#define _return(x)   ({return (x); (x);})
 

Functions

char xor_int (int i)
 
void swap_array (int nmemb, size_t nmemb_sz, void *src, void *dst)
 
void swap_ints (int nmemb, unsigned int *x, unsigned int *y)
 
void swap_shorts (int nmemb, unsigned short *x, unsigned short *y)
 
int rand_range (int _min, int _max)
 
void xsrand (void)
 
char * last_token (char *string, char tok)
 
void strip_char (char *string, char char_to_strip)
 
char ** split_string (char *str, const char *div_str, int *substrings, int max_substrings, int max_substring_sz)
 
int find_int (int x, int *ia, int nmemb)
 
void xtimer (u_int secs, u_int steps, int *counter)
 
int check_and_create_dir (char *dir)
 
int file_exist (char *filename)
 
int exec_root_script (char *script, char *argv)
 
void do_nothing (void)
 

Macro Definition Documentation

#define _return (   x)    ({return (x); (x);})
#define CLR_BIT (   a,
 
)    ((a)[(i)/CHAR_BIT] &= ~(1<<((i)%CHAR_BIT)))
#define FIND_PTR (   p,
  a,
 
)
Value:
({ \
int _i, _ret; \
\
for(_i=0, _ret=-1; _i<(n); _i++) \
if((a)[_i] == (p)) { \
_ret=_i; \
break; \
} \
_ret; \
})
#define MILLISEC (   x)    (((x).tv_sec*1000)+((x).tv_usec/1000))
#define MILLISEC_TO_TV (   x,
 
)
Value:
do{ \
(t).tv_sec=(x)/1000; \
(t).tv_usec=((x) - ((x)/1000)*1000)*1000; \
}while(0)
#define NMEMB (   x)    (sizeof((x))/sizeof(typeof((x)[0])))
#define SET_BIT (   a,
 
)    ((a)[(i)/CHAR_BIT] |= 1<<((i)%CHAR_BIT))
#define TEST_BIT (   a,
 
)    (((a)[(i)/CHAR_BIT] & (1<<((i)%CHAR_BIT))) ? 1 : 0)

Function Documentation

int check_and_create_dir ( char *  dir)

Here is the call graph for this function:

Here is the caller graph for this function:

void do_nothing ( void  )

Here is the caller graph for this function:

int exec_root_script ( char *  script,
char *  argv 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int file_exist ( char *  filename)

Here is the caller graph for this function:

int find_int ( int  x,
int *  ia,
int  nmemb 
)

Here is the caller graph for this function:

char* last_token ( char *  string,
char  tok 
)

Here is the caller graph for this function:

int rand_range ( int  _min,
int  _max 
)
inline

Here is the caller graph for this function:

char** split_string ( char *  str,
const char *  div_str,
int *  substrings,
int  max_substrings,
int  max_substring_sz 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void strip_char ( char *  string,
char  char_to_strip 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void swap_array ( int  nmemb,
size_t  nmemb_sz,
void *  src,
void *  dst 
)

Here is the caller graph for this function:

void swap_ints ( int  nmemb,
unsigned int *  x,
unsigned int *  y 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void swap_shorts ( int  nmemb,
unsigned short *  x,
unsigned short *  y 
)

Here is the call graph for this function:

Here is the caller graph for this function:

char xor_int ( int  i)
void xsrand ( void  )

Here is the caller graph for this function:

void xtimer ( u_int  secs,
u_int  steps,
int *  counter 
)

Here is the caller graph for this function: