Fri Jan 22 23:15:42 2016 UTC ()
Needs stdint.h.


(dholland)
diff -r1.2 -r1.3 src/include/randomid.h

cvs diff -r1.2 -r1.3 src/include/randomid.h (expand / switch to unified diff)

--- src/include/randomid.h 2005/12/26 19:01:47 1.2
+++ src/include/randomid.h 2016/01/22 23:15:42 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: randomid.h,v 1.2 2005/12/26 19:01:47 perry Exp $ */ 1/* $NetBSD: randomid.h,v 1.3 2016/01/22 23:15:42 dholland Exp $ */
2/* $KAME: ip6_id.c,v 1.8 2003/09/06 13:41:06 itojun Exp $ */ 2/* $KAME: ip6_id.c,v 1.8 2003/09/06 13:41:06 itojun Exp $ */
3/* $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */ 3/* $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */
4 4
5/* 5/*
6 * Copyright (C) 2003 WIDE Project. 6 * Copyright (C) 2003 WIDE Project.
7 * All rights reserved. 7 * All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -59,25 +59,27 @@ @@ -59,25 +59,27 @@
59 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 59 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
60 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 60 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
61 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 61 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
62 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 62 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
63 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 63 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
64 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 64 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
65 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 65 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
66 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 66 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
67 */ 67 */
68 68
69#ifndef _RANDOMID_H_ 69#ifndef _RANDOMID_H_
70#define _RANDOMID_H_ 70#define _RANDOMID_H_
71 71
 72#include <stdint.h>
 73
72struct randomid_ctx; 74struct randomid_ctx;
73 75
74typedef struct randomid_ctx *randomid_t; 76typedef struct randomid_ctx *randomid_t;
75 77
76extern uint32_t randomid(randomid_t); 78extern uint32_t randomid(randomid_t);
77extern randomid_t randomid_new(int, long); 79extern randomid_t randomid_new(int, long);
78extern void randomid_delete(randomid_t); 80extern void randomid_delete(randomid_t);
79 81
80#define RANDOMID_TIMEO_MIN ((long)60) 82#define RANDOMID_TIMEO_MIN ((long)60)
81#define RANDOMID_TIMEO_DEFAULT ((long)180) 83#define RANDOMID_TIMEO_DEFAULT ((long)180)
82 84
83#endif /*_RANDOMID_H_*/ 85#endif /*_RANDOMID_H_*/