aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent
diff options
context:
space:
mode:
Diffstat (limited to 'bbot/agent')
-rw-r--r--bbot/agent9
1 files changed, 9 insertions, 0 deletions
diff --git a/bbot/agent b/bbot/agent
index 1271a87..b88c892 100644
--- a/bbot/agent
+++ b/bbot/agent
@@ -26,6 +26,15 @@ namespace bbot
extern uid_t uid; // Our effective user id.
extern string uname; // Our effective user name.
+ // Random number generator (currently not MT-safe and limited to RAND_MAX).
+ //
+ size_t
+ genrand ();
+
+ template <typename T>
+ inline T
+ genrand () {return static_cast<T> (genrand ());}
+
// Return the IPv4 address of an interface.
//
string