nfs-ganesha 1.4
Defines | Functions

cidr_from_str.c File Reference

#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "../include/cidr.h"

Go to the source code of this file.

Defines

#define UMIN(x, y)   ((x)<(y)?(x):(y))
#define MASKNUM(x)   (24-((15-x)*8))
#define WRMASKSET(x)
#define UMIN(x, y)   ((x)<(y)?(x):(y))
#define MASKNUM(x)   (120-((15-x)*8))
#define WRMASKSET(x)

Functions

CIDRcidr_from_str (const char *addr)

Define Documentation

#define MASKNUM (   x)    (24-((15-x)*8))
#define MASKNUM (   x)    (120-((15-x)*8))
#define UMIN (   x,
 
)    ((x)<(y)?(x):(y))
#define UMIN (   x,
 
)    ((x)<(y)?(x):(y))
#define WRMASKSET (   x)
Value:
if(pflen>MASKNUM(x)) \
                        for(j=MASKNUM(x) ; j<UMIN(pflen,MASKNUM(x)+8) ; j++) \
                                toret->mask[x] |= 1<<(MASKNUM(x)+7-j);
#define WRMASKSET (   x)
Value:
if(pflen>MASKNUM(x)) \
                        for(j=MASKNUM(x) ; j<UMIN(pflen,MASKNUM(x)+8) ; j++) \
                                toret->mask[x] |= 1<<(MASKNUM(x)+7-j);

Function Documentation

CIDR* cidr_from_str ( const char *  addr)

Definition at line 19 of file cidr_from_str.c.