ISC DHCP 4.4.3-P1
A reference DHCPv4 and DHCPv6 implementation
 
Loading...
Searching...
No Matches
data.c File Reference
#include "data.h"
#include <sys/types.h>
#include <arpa/inet.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

struct stringallocString (void)
 
struct stringmakeString (int l, const char *s)
 
struct stringmakeStringExt (int l, const char *s, char fmt)
 
struct stringmakeStringArray (int l, const char *s, char fmt)
 
void appendString (struct string *s, const char *a)
 
void concatString (struct string *s, const struct string *a)
 
isc_boolean_t eqString (const struct string *s, const struct string *o)
 
struct stringquote (struct string *s)
 
struct commentcreateComment (const char *line)
 
int64_t intValue (const struct element *e)
 
double doubleValue (const struct element *e)
 
isc_boolean_t boolValue (const struct element *e)
 
struct stringstringValue (struct element *e)
 
struct list * listValue (struct element *e)
 
struct mapmapValue (struct element *e)
 
struct elementcreate (void)
 
struct elementcreateInt (int64_t i)
 
struct elementcreateDouble (double d)
 
struct elementcreateBool (isc_boolean_t b)
 
struct elementcreateNull (void)
 
struct elementcreateString (const struct string *s)
 
struct elementcreateList (void)
 
struct elementcreateMap (void)
 
void resetInt (struct element *e, int64_t i)
 
void resetDouble (struct element *e, double d)
 
void resetBool (struct element *e, isc_boolean_t b)
 
void resetNull (struct element *e)
 
void resetString (struct element *e, const struct string *s)
 
void resetList (struct element *e)
 
void resetMap (struct element *e)
 
void resetBy (struct element *e, struct element *o)
 
struct elementlistGet (struct element *l, int i)
 
void listSet (struct element *l, struct element *e, int i)
 
void listPush (struct element *l, struct element *e)
 
void listRemove (struct element *l, int i)
 
size_t listSize (const struct element *l)
 
void concat (struct element *l, struct element *o)
 
struct elementmapGet (struct element *m, const char *k)
 
void mapSet (struct element *m, struct element *e, const char *k)
 
void mapRemove (struct element *m, const char *k)
 
isc_boolean_t mapContains (const struct element *m, const char *k)
 
size_t mapSize (const struct element *m)
 
void merge (struct element *m, struct element *o)
 
const chartype2name (int t)
 
int name2type (const char *n)
 
void print (FILE *fp, const struct element *e, isc_boolean_t skip, unsigned indent)
 
void printList (FILE *fp, const struct list *l, isc_boolean_t skip, unsigned indent)
 
void printMap (FILE *fp, const struct map *m, isc_boolean_t skip, unsigned indent)
 
void printString (FILE *fp, const struct string *s)
 
isc_boolean_t skip_to_end (const struct element *e)
 
struct elementcopy (struct element *e)
 
struct elementcopyList (struct element *l)
 
struct elementcopyMap (struct element *m)
 
struct handlemapPop (struct element *m)
 
void derive (struct handle *src, struct handle *dst)
 
struct stringhexaValue (struct element *s)
 
struct elementcreateHexa (struct string *h)
 

Function Documentation

◆ allocString()

struct string * allocString ( void  )

Definition at line 32 of file data.c.

◆ appendString()

void appendString ( struct string s,
const char a 
)

Definition at line 311 of file data.c.

◆ boolValue()

isc_boolean_t boolValue ( const struct element e)

Definition at line 399 of file data.c.

◆ concat()

void concat ( struct element l,
struct element o 
)

Definition at line 748 of file data.c.

◆ concatString()

void concatString ( struct string s,
const struct string a 
)

Definition at line 330 of file data.c.

◆ copy()

struct element * copy ( struct element e)

Definition at line 1115 of file data.c.

◆ copyList()

struct element * copyList ( struct element l)

Definition at line 1162 of file data.c.

◆ copyMap()

struct element * copyMap ( struct element m)

Definition at line 1174 of file data.c.

◆ create()

struct element * create ( void  )

Definition at line 432 of file data.c.

◆ createBool()

struct element * createBool ( isc_boolean_t  b)

Definition at line 469 of file data.c.

◆ createComment()

struct comment * createComment ( const char line)

Definition at line 367 of file data.c.

◆ createDouble()

struct element * createDouble ( double  d)

Definition at line 457 of file data.c.

◆ createHexa()

struct element * createHexa ( struct string h)

Definition at line 1249 of file data.c.

◆ createInt()

struct element * createInt ( int64_t  i)

Definition at line 445 of file data.c.

◆ createList()

struct element * createList ( void  )

Definition at line 504 of file data.c.

◆ createMap()

struct element * createMap ( void  )

Definition at line 516 of file data.c.

◆ createNull()

struct element * createNull ( void  )

Definition at line 481 of file data.c.

◆ createString()

struct element * createString ( const struct string s)

Definition at line 492 of file data.c.

◆ derive()

void derive ( struct handle src,
struct handle dst 
)

Definition at line 1212 of file data.c.

◆ doubleValue()

double doubleValue ( const struct element e)

Definition at line 391 of file data.c.

◆ eqString()

isc_boolean_t eqString ( const struct string s,
const struct string o 
)

Definition at line 343 of file data.c.

◆ hexaValue()

struct string * hexaValue ( struct element s)

Definition at line 1234 of file data.c.

◆ intValue()

int64_t intValue ( const struct element e)

Definition at line 383 of file data.c.

◆ listGet()

struct element * listGet ( struct element l,
int  i 
)

Definition at line 646 of file data.c.

◆ listPush()

void listPush ( struct element l,
struct element e 
)

Definition at line 697 of file data.c.

◆ listRemove()

void listRemove ( struct element l,
int  i 
)

Definition at line 707 of file data.c.

◆ listSet()

void listSet ( struct element l,
struct element e,
int  i 
)

Definition at line 669 of file data.c.

◆ listSize()

size_t listSize ( const struct element l)

Definition at line 730 of file data.c.

◆ listValue()

struct list * listValue ( struct element e)

Definition at line 416 of file data.c.

◆ makeString()

struct string * makeString ( int  l,
const char s 
)

Definition at line 44 of file data.c.

◆ makeStringArray()

struct string * makeStringArray ( int  l,
const char s,
char  fmt 
)

Definition at line 268 of file data.c.

◆ makeStringExt()

struct string * makeStringExt ( int  l,
const char s,
char  fmt 
)

Definition at line 64 of file data.c.

◆ mapContains()

isc_boolean_t mapContains ( const struct element m,
const char k 
)

Definition at line 811 of file data.c.

◆ mapGet()

struct element * mapGet ( struct element m,
const char k 
)

Definition at line 759 of file data.c.

◆ mapPop()

struct handle * mapPop ( struct element m)

Definition at line 1186 of file data.c.

◆ mapRemove()

void mapRemove ( struct element m,
const char k 
)

Definition at line 792 of file data.c.

◆ mapSet()

void mapSet ( struct element m,
struct element e,
const char k 
)

Definition at line 777 of file data.c.

◆ mapSize()

size_t mapSize ( const struct element m)

Definition at line 829 of file data.c.

◆ mapValue()

struct map * mapValue ( struct element e)

Definition at line 424 of file data.c.

◆ merge()

void merge ( struct element m,
struct element o 
)

Definition at line 847 of file data.c.

◆ name2type()

int name2type ( const char n)

Definition at line 895 of file data.c.

◆ print()

void print ( FILE fp,
const struct element e,
isc_boolean_t  skip,
unsigned  indent 
)

Definition at line 919 of file data.c.

◆ printList()

void printList ( FILE fp,
const struct list *  l,
isc_boolean_t  skip,
unsigned  indent 
)

Definition at line 970 of file data.c.

◆ printMap()

void printMap ( FILE fp,
const struct map m,
isc_boolean_t  skip,
unsigned  indent 
)

Definition at line 1014 of file data.c.

◆ printString()

void printString ( FILE fp,
const struct string s 
)

Definition at line 1059 of file data.c.

◆ quote()

struct string * quote ( struct string s)

Definition at line 356 of file data.c.

◆ resetBool()

void resetBool ( struct element e,
isc_boolean_t  b 
)

Definition at line 557 of file data.c.

◆ resetBy()

void resetBy ( struct element e,
struct element o 
)

Definition at line 605 of file data.c.

◆ resetDouble()

void resetDouble ( struct element e,
double  d 
)

Definition at line 547 of file data.c.

◆ resetInt()

void resetInt ( struct element e,
int64_t  i 
)

Definition at line 537 of file data.c.

◆ resetList()

void resetList ( struct element e)

Definition at line 585 of file data.c.

◆ resetMap()

void resetMap ( struct element e)

Definition at line 595 of file data.c.

◆ resetNull()

void resetNull ( struct element e)

Definition at line 566 of file data.c.

◆ resetString()

void resetString ( struct element e,
const struct string s 
)

Definition at line 575 of file data.c.

◆ skip_to_end()

isc_boolean_t skip_to_end ( const struct element e)

Definition at line 1104 of file data.c.

◆ stringValue()

struct string * stringValue ( struct element e)

Definition at line 408 of file data.c.

◆ type2name()

const char * type2name ( int  t)

Definition at line 867 of file data.c.