summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/res_random.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spelling fixes; from paul tagliamontejmc2022-12-271-2/+2
| | | | | any changes not taken noted on tech, but chiefly here i did not take the cancelation - cancellation changes;
* Add support for timeconting in userland.pirofti2020-07-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* Prefer _MUTEX_*LOCK over _THREAD_PRIVATE_MUTEX_*LOCK() when thread-specificguenther2016-04-051-4/+4
| | | | | | data isn't necessary. ok mpi@, ok&tweak natano@
* Wrap <resolv.h> so that internal calls go directguenther2015-10-051-2/+3
| | | | ok millert@
* force reseeding if pid has changed.eric2015-06-041-2/+7
| | | | ok deraadt@
* From ISO/IEC 9899:1999 and 9899:201x,guenther2014-07-201-2/+2
| | | | | | | | | 6.11.5 - Storage-class specifiers: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Diff from Jean-Philippe Ouellet (jean-philippe (at) ouellet.biz)
* permute15() should be static. Not cranking libc now, because it isderaadt2013-11-121-2/+2
| | | | not urgent.
* use CLOCK_MONOTONIC, and repair future time_t overflowderaadt2013-04-171-8/+8
| | | | ok millert guenther
* protect the PRG state with a mutex in res_randomid().eric2013-03-261-2/+13
| | | | ok deraadt@ guenther@ djm@
* Improve the libc DNS resolver ID generation algorithm to be moredjm2008-04-131-43/+79
| | | | | | | resistant to prediction atacks by wrapping the existing LCG in a random permutation generator based on a Luby-Rackoff block cipher. lots of discussion and final ok deraadt@
* ansify. ok deraadt@ moritz@otto2005-03-251-3/+3
|
* niels kindly dropped clause 3/4 from the license. tnx!itojun2003-12-121-6/+1
|
* we can skip arc4random() call here. markusitojun2003-12-121-2/+2
|
* correct non-repetitive ID code, based on comments from niels provos.itojun2003-12-101-12/+16
| | | | | | - seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x". - skipping number is not needed, so disable it for 16bit generator (makes the repetition period to 30000)
* %d -> %u. mostly in #ifdef DEBUG.itojun2002-06-271-6/+6
|
* We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.millert2002-02-191-7/+1
|
* Part one of userland __P removal. Done with a simple regexp with some minor ↵millert2002-02-161-3/+3
| | | | hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
* grammer/spellingtodd2001-01-041-2/+2
|
* add an inner xor to make prediction attacks against the ids harder, dueprovos1999-08-261-3/+5
| | | | to an attack pointed out by David Wagner.
* #if __STDC__ --> #ifdef __STDC__mickey1997-07-251-2/+2
|
* Be more careful about possible type promotiontholo1997-04-301-1/+6
|
* skipped too many idsprovos1997-04-251-2/+2
|
* pmod to u_int16_t, Angelos kindly reminded meprovos1997-04-231-5/+5
|
* change time() to gettimeofday()provos1997-04-191-5/+8
|
* make things more complicated.provos1997-04-191-13/+46
|
* the before mentioned random number generator.provos1997-04-131-0/+192