fehQlibs 26
Qlibs
Loading...
Searching...
No Matches
Macros | Functions
dns_random.c File Reference

random use of DNS resolvers given their IP More...

#include <unistd.h>
#include "taia.h"
#include "uint_t.h"
#include "dnsresolv.h"
Include dependency graph for dns_random.c:

Go to the source code of this file.

Macros

#define ROTATE(x, b)   (((x) << (b)) | ((x) >> (32 - (b))))
 
#define MUSH(i, b)   x = t[i] += (((x ^ seed[i]) + sum) ^ ROTATE(x,b));
 

Functions

void dns_random_init (const char data[128])
 
unsigned int dns_random (unsigned int n)
 

Detailed Description

random use of DNS resolvers given their IP

Author
djb ucspi-tcp

Definition in file dns_random.c.

Macro Definition Documentation

◆ MUSH

#define MUSH (   i,
 
)    x = t[i] += (((x ^ seed[i]) + sum) ^ ROTATE(x,b));

Definition at line 19 of file dns_random.c.

◆ ROTATE

#define ROTATE (   x,
 
)    (((x) << (b)) | ((x) >> (32 - (b))))

Definition at line 18 of file dns_random.c.

Function Documentation

◆ dns_random()

unsigned int dns_random ( unsigned int  n)

Definition at line 59 of file dns_random.c.

Here is the caller graph for this function:

◆ dns_random_init()

void dns_random_init ( const char  data[128])

Definition at line 40 of file dns_random.c.

Here is the call graph for this function: