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/nfs/nfs_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/nfs/nfs_var.h')
-rw-r--r-- | sys/nfs/nfs_var.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfs/nfs_var.h b/sys/nfs/nfs_var.h index 7abe9411ce7..19e29c0afa2 100644 --- a/sys/nfs/nfs_var.h +++ b/sys/nfs/nfs_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_var.h,v 1.35 2008/04/22 18:53:34 thib Exp $ */ +/* $OpenBSD: nfs_var.h,v 1.36 2008/06/09 22:47:42 djm Exp $ */ /* $NetBSD: nfs_var.h,v 1.3 1996/02/18 11:53:54 fvdl Exp $ */ /* @@ -238,6 +238,7 @@ void nfsrv_cleancache(void); /* nfs_subs.c */ struct mbuf *nfsm_reqh(struct vnode *, u_long, int, caddr_t *); +u_int32_t nfsm_get_xid(void); void nfsm_rpchead(struct nfsreq *, struct ucred *, int, struct mbuf *, int); void *nfsm_build(struct mbuf **, u_int, caddr_t *); int nfsm_mbuftouio(struct mbuf **, struct uio *, int, caddr_t *); |