diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-06-09 22:47:43 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-06-09 22:47:43 +0000 |
commit | 4292580034d73b1c4cdfac0005dc9e4d2589bda1 (patch) | |
tree | 39707a15c935037c1af790655424866680302eaa /sys/netinet6/ip6_var.h | |
parent | 8585245d5a6e10c2e09d2a4a531f89455bf9193d (diff) |
Introduce a facility to generate unpredictable 32 bit numbers with
near maximal (2^32) cycle times. These are useful for network
IDs in cases where there are negative consequences to ID prediction
and/or reuse.
Use the idgen32() functions to generate IPv6 IDs and NFS client/server
XIDs.
Pseudorandom permutation code in crypto/idgen.c based on public
domain skip32.c from Greg Rose.
feedback & ok thib@ deraadt@
Diffstat (limited to 'sys/netinet6/ip6_var.h')
-rw-r--r-- | sys/netinet6/ip6_var.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index b560d21ee74..33f35df951d 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_var.h,v 1.32 2007/12/14 18:33:41 deraadt Exp $ */ +/* $OpenBSD: ip6_var.h,v 1.33 2008/06/09 22:47:42 djm Exp $ */ /* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */ /* @@ -297,6 +297,8 @@ int ip6_setpktopts(struct mbuf *, struct ip6_pktopts *, void ip6_clearpktopts(struct ip6_pktopts *, int); struct ip6_pktopts *ip6_copypktopts(struct ip6_pktopts *, int); int ip6_optlen(struct inpcb *); +void ip6_randomid_init(void); +u_int32_t ip6_randomid(void); int route6_input(struct mbuf **, int *, int); @@ -324,7 +326,6 @@ int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct rtentry **); -u_int32_t ip6_randomid(void); u_int32_t ip6_randomflowlabel(void); #endif /* _KERNEL */ |