Browse Source

Initial check-in / Erstlingseinfügung / inserire iniziale intenzionale / Первый чек-ин

refactor-result-recursion
Lars Rohwedder 6 years ago
commit
94c2a7132e
201 changed files with 124185 additions and 0 deletions
  1. +30
    -0
      README.md
  2. +55
    -0
      html/index.html
  3. +345
    -0
      html/interactive.js
  4. +4
    -0
      html/jquery-2.2.0.min.js
  5. BIN
      html/json-test.ico
  6. +1396
    -0
      libevent-2.0.22-stable/ChangeLog
  7. +257
    -0
      libevent-2.0.22-stable/Doxyfile
  8. +74
    -0
      libevent-2.0.22-stable/LICENSE
  9. +244
    -0
      libevent-2.0.22-stable/Makefile.am
  10. +1331
    -0
      libevent-2.0.22-stable/Makefile.in
  11. +47
    -0
      libevent-2.0.22-stable/Makefile.nmake
  12. +198
    -0
      libevent-2.0.22-stable/README
  13. +363
    -0
      libevent-2.0.22-stable/WIN32-Code/event2/event-config.h
  14. +1354
    -0
      libevent-2.0.22-stable/WIN32-Code/tree.h
  15. +1014
    -0
      libevent-2.0.22-stable/aclocal.m4
  16. +555
    -0
      libevent-2.0.22-stable/arc4random.c
  17. +15
    -0
      libevent-2.0.22-stable/autogen.sh
  18. +3122
    -0
      libevent-2.0.22-stable/buffer.c
  19. +325
    -0
      libevent-2.0.22-stable/buffer_iocp.c
  20. +410
    -0
      libevent-2.0.22-stable/bufferevent-internal.h
  21. +875
    -0
      libevent-2.0.22-stable/bufferevent.c
  22. +690
    -0
      libevent-2.0.22-stable/bufferevent_async.c
  23. +511
    -0
      libevent-2.0.22-stable/bufferevent_filter.c
  24. +1454
    -0
      libevent-2.0.22-stable/bufferevent_openssl.c
  25. +334
    -0
      libevent-2.0.22-stable/bufferevent_pair.c
  26. +1011
    -0
      libevent-2.0.22-stable/bufferevent_ratelim.c
  27. +699
    -0
      libevent-2.0.22-stable/bufferevent_sock.c
  28. +101
    -0
      libevent-2.0.22-stable/changelist-internal.h
  29. +488
    -0
      libevent-2.0.22-stable/compat/sys/queue.h
  30. +342
    -0
      libevent-2.0.22-stable/compile
  31. +1530
    -0
      libevent-2.0.22-stable/config.guess
  32. +442
    -0
      libevent-2.0.22-stable/config.h.in
  33. +1782
    -0
      libevent-2.0.22-stable/config.sub
  34. +17612
    -0
      libevent-2.0.22-stable/configure
  35. +821
    -0
      libevent-2.0.22-stable/configure.ac
  36. +100
    -0
      libevent-2.0.22-stable/defer-internal.h
  37. +707
    -0
      libevent-2.0.22-stable/depcomp
  38. +306
    -0
      libevent-2.0.22-stable/devpoll.c
  39. +473
    -0
      libevent-2.0.22-stable/epoll.c
  40. +65
    -0
      libevent-2.0.22-stable/epoll_sub.c
  41. +293
    -0
      libevent-2.0.22-stable/evbuffer-internal.h
  42. +4675
    -0
      libevent-2.0.22-stable/evdns.c
  43. +45
    -0
      libevent-2.0.22-stable/evdns.h
  44. +368
    -0
      libevent-2.0.22-stable/event-internal.h
  45. +2943
    -0
      libevent-2.0.22-stable/event.c
  46. +85
    -0
      libevent-2.0.22-stable/event.h
  47. +293
    -0
      libevent-2.0.22-stable/event_iocp.c
  48. +1717
    -0
      libevent-2.0.22-stable/event_rpcgen.py
  49. +596
    -0
      libevent-2.0.22-stable/event_tagging.c
  50. +45
    -0
      libevent-2.0.22-stable/evhttp.h
  51. +92
    -0
      libevent-2.0.22-stable/evmap-internal.h
  52. +799
    -0
      libevent-2.0.22-stable/evmap.c
  53. +473
    -0
      libevent-2.0.22-stable/evport.c
  54. +204
    -0
      libevent-2.0.22-stable/evrpc-internal.h
  55. +1174
    -0
      libevent-2.0.22-stable/evrpc.c
  56. +45
    -0
      libevent-2.0.22-stable/evrpc.h
  57. +64
    -0
      libevent-2.0.22-stable/evsignal-internal.h
  58. +382
    -0
      libevent-2.0.22-stable/evthread-internal.h
  59. +445
    -0
      libevent-2.0.22-stable/evthread.c
  60. +189
    -0
      libevent-2.0.22-stable/evthread_pthread.c
  61. +339
    -0
      libevent-2.0.22-stable/evthread_win32.c
  62. +2190
    -0
      libevent-2.0.22-stable/evutil.c
  63. +39
    -0
      libevent-2.0.22-stable/evutil.h
  64. +180
    -0
      libevent-2.0.22-stable/evutil_rand.c
  65. +484
    -0
      libevent-2.0.22-stable/ht-internal.h
  66. +195
    -0
      libevent-2.0.22-stable/http-internal.h
  67. +4529
    -0
      libevent-2.0.22-stable/http.c
  68. +47
    -0
      libevent-2.0.22-stable/include/Makefile.am
  69. +598
    -0
      libevent-2.0.22-stable/include/Makefile.in
  70. +842
    -0
      libevent-2.0.22-stable/include/event2/buffer.h
  71. +110
    -0
      libevent-2.0.22-stable/include/event2/buffer_compat.h
  72. +821
    -0
      libevent-2.0.22-stable/include/event2/bufferevent.h
  73. +100
    -0
      libevent-2.0.22-stable/include/event2/bufferevent_compat.h
  74. +107
    -0
      libevent-2.0.22-stable/include/event2/bufferevent_ssl.h
  75. +116
    -0
      libevent-2.0.22-stable/include/event2/bufferevent_struct.h
  76. +643
    -0
      libevent-2.0.22-stable/include/event2/dns.h
  77. +336
    -0
      libevent-2.0.22-stable/include/event2/dns_compat.h
  78. +80
    -0
      libevent-2.0.22-stable/include/event2/dns_struct.h
  79. +1204
    -0
      libevent-2.0.22-stable/include/event2/event.h
  80. +220
    -0
      libevent-2.0.22-stable/include/event2/event_compat.h
  81. +141
    -0
      libevent-2.0.22-stable/include/event2/event_struct.h
  82. +863
    -0
      libevent-2.0.22-stable/include/event2/http.h
  83. +90
    -0
      libevent-2.0.22-stable/include/event2/http_compat.h
  84. +130
    -0
      libevent-2.0.22-stable/include/event2/http_struct.h
  85. +80
    -0
      libevent-2.0.22-stable/include/event2/keyvalq_struct.h
  86. +143
    -0
      libevent-2.0.22-stable/include/event2/listener.h
  87. +596
    -0
      libevent-2.0.22-stable/include/event2/rpc.h
  88. +61
    -0
      libevent-2.0.22-stable/include/event2/rpc_compat.h
  89. +100
    -0
      libevent-2.0.22-stable/include/event2/rpc_struct.h
  90. +124
    -0
      libevent-2.0.22-stable/include/event2/tag.h
  91. +49
    -0
      libevent-2.0.22-stable/include/event2/tag_compat.h
  92. +236
    -0
      libevent-2.0.22-stable/include/event2/thread.h
  93. +713
    -0
      libevent-2.0.22-stable/include/event2/util.h
  94. +527
    -0
      libevent-2.0.22-stable/install-sh
  95. +201
    -0
      libevent-2.0.22-stable/iocp-internal.h
  96. +81
    -0
      libevent-2.0.22-stable/ipv6-internal.h
  97. +475
    -0
      libevent-2.0.22-stable/kqueue.c
  98. +16
    -0
      libevent-2.0.22-stable/libevent.pc.in
  99. +16
    -0
      libevent-2.0.22-stable/libevent_openssl.pc.in
  100. +16
    -0
      libevent-2.0.22-stable/libevent_pthreads.pc.in

+ 30
- 0
README.md View File

@ -0,0 +1,30 @@
1. Dependencies
=================
Debian
------
* g++ 4.8 or 4.9
* GNU make
* libboost-filesystem-dev
* p≡p Engine (which needs gpgme-thread, a patched libetpan, libboost-system-dev)
It comes with libevent 2.20, that needs GNU autohell to build. :-/
Maybe Debian Jessie's version 2.0 also works well, I never tried.
2. Build
==========
* build p≡p Engine
* first build libevent, see libevent-2.0.22-stable/README
(a user-install in $HOME/local/ is fine)
* edit the library and include paths server/Makefile so p≡p & libevent will be found
* run "make" in the server/ path
3. Running
============
* run ./mt-server
* visit http://127.0.0.1:4223/ in your javascript-enabled web browser to see the test JavaScript client
* call some functions ("version()" or "get_gpg_path()" should work just fine)

+ 55
- 0
html/index.html View File

@ -0,0 +1,55 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="icon" href="/favicon.ico" type="image/vnd.microsoft.icon">
<title>Send example calls via jQuery</title>
<style type="text/css">
body { font-family:Helvetica,Arial,Sans-serif;background-color:#cde; }
.bigtable { border-collapse:collapse; border:2px black solid; box-shadow:4px 4px 8px #666; background-color:#ffd; margin:1em;}
td, th { border:1px black solid; vertical-align:top; padding:0.5em;}
td.right { border:0px black solid; float:right; }
td.left { border:0px black solid; align:left; }
input { white-space:pre }
.smalltable { border-collapse:collapse; border:2px black inset; margin-left:1em; padding:5px;}
.smalltable td { border:none; vertical-align:top; padding:5px;}
pre.green {white-space:pre; background-color:#9d9; }
pre.red {white-space:pre; background-color:#d99; }
</style>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="pep_functions.js"></script>
<script type="text/javascript" src="interactive.js"></script>
</head>
<body>
<h1>Send example calls via jQuery – v132</h1>
<form id="frm" name="frm">
<table class="bigtable" id="bigtable">
<tr><td>Server's Address</td><td> <input type="text" id="server" size="50" maxlength="200" value="http://10.0.0.88:4223/ja/0.1/" </td></tr>
<tr><td></td><td><input type="button" id="crSess" value="Create Session!" onClick="createSession()"></tr></td>
<tr><td>Open sessions:</td>
<td>
<div id="sessions"><i>(none, yet)</i></div>
</td></tr>
<tr><td>Function name:</td><td>
<select name="fn_name" id="fn_name" size="1" onChange="on_select_change()">
<option>–––––</option>
</select>
</td></tr>
<tr><td>Parameters:</td><td id="td_param"></td></tr>
<tr><th colspan="2"> <input type="button" value="Call function!" onClick="button_click()"> </td></tr>
<tr><td>Debug...</td><td id="deb"><pre id="debug">...</pre></td></tr>
<tr><td>Result:</td><td id="result"><pre id="resultpre">Banana!</pre></td></tr>
</table>
</form>
<script type="text/javascript">
init_pep_functions();
on_select_change();
</script>
</body>
</html>

+ 345
- 0
html/interactive.js View File

@ -0,0 +1,345 @@
var call_ID = 1000;
var openSessions = [];
var func;
var func_params = [];
var OutputParam = ["OP"];
function genInput(id, size, direction, value, onchange)
{
return '<input type="text" size="' + size + '" id="' + id + '"'
+ (direction == "Out" ? ' readonly' : '')
+ ' value="' + value + '"'
+ (onchange != undefined ? ' onChange="' + onchange + '"' : '')
+ ' >';
}
function addString(nr)
{
var pp = {direction:"In", type:"StringList"};
func_params[nr].push("");
genStringList(nr, pp);
document.getElementById('li_' + nr ).innerHTML = Param2Form.StringList(nr, pp, func_params[nr]);
}
function removeString(nr, idx)
{
var pp = {direction:"In", type:"StringList"};
func_params[nr].splice(idx,1);
genStringList(nr, pp);
document.getElementById('li_' + nr ).innerHTML = Param2Form.StringList(nr, pp, func_params[nr]);
}
function genStringList(nr, pp)
{
if(func_params[nr] == undefined)
{
func_params[nr] = [];
}
var value = func_params[nr];
var ret = 'StringList:<br>';
for(var i=0; i<value.length; ++i)
{
ret +='#' + i + ': ' + genInput('inp_param_' + nr + '_' + i, 25, pp, value[i],
'func_params[' + nr + '][' + i + '] = this.value;' )
+ '<input type="button" value="Remove!" onClick="removeString(' + nr + ',' + i + ');" >'
+ '<br>';
}
document.getElementById('debug').innerHTML += "func_params = " + JSON.stringify(func_params) + '\n';
return ret + '<input type="button" value="Add String!" onClick="addString(' + nr + ')">';
}
// generates the HTML form for the appropriate function parameter
var Param2Form =
{
Session : function(nr, pp, value)
{
return getSessions();
},
String : function(nr, pp, value)
{
return genInput('inp_param_' + nr , 25, pp.direction, value);
},
StringList : function(nr, pp, value)
{
if(pp.direction=="Out")
{
return 'StringList (output)';
}else{
return genStringList(nr,pp);
}
},
Message : function(nr, pp, value)
{
return 'Message:<table class="smalltable">'
+ '<tr><td>id: </td><td>' + genInput('inp_param_' + nr + '_id', 16, pp.direction, "id") + '</td></tr>'
+ '<tr><td>shortmsg: </td><td>' + genInput('inp_param_' + nr + '_smsg', 25, pp.direction, "shortmsg") + '</td></tr>'
+ '<tr><td>from: </td><td>' + Param2Form.Identity( nr + '_from', pp.direction, "(from)") + '</td></tr>'
+ '</table>';
},
Identity : function(nr, pp, value)
{
return 'Identity:<table class="smalltable">'
+ '<tr><td>user_id: </td><td>' + genInput('inp_param_' + nr + '_id', 16, pp.direction, "id") + '</td></tr>'
+ '<tr><td>username: </td><td>' + genInput('inp_param_' + nr + '_name', 16, pp.direction, "name") + '</td></tr>'
+ '<tr><td>address: </td><td>' + genInput('inp_param_' + nr + '_addr', 25, pp.direction, "address") + '</td></tr>'
+ '<tr><td>fingerprint: </td><td>' + genInput('inp_param_' + nr + '_fpr', 25, pp.direction, "fingerprint") + '</td></tr>'
+ '</table>';
},
PEP_enc_format : function(nr, pp, value)
{
var disabled = pp.direction == 'Out' ? " disabled" : "";
return 'Encoding format: '
+ '<input type="radio" name="inp_rad_' + nr + '" value="0"' + disabled + '>None,&nbsp;&nbsp;'
+ '<input type="radio" name="inp_rad_' + nr + '" value="1"' + disabled + '>Pieces,&nbsp;&nbsp;'
+ '<input type="radio" name="inp_rad_' + nr + '" value="2"' + disabled + '>S/MIME,&nbsp;&nbsp;'
+ '<input type="radio" name="inp_rad_' + nr + '" value="3"' + disabled + '>PGP/MIME,&nbsp;&nbsp;'
+ '<input type="radio" name="inp_rad_' + nr + '" value="4"' + disabled + ' checked>p≡p'
}
};
// fetches the form data and return appropriate JSON object
var Form2Param =
{
Session : function(nr, pp, value)
{
return $('input[name=sessionRadio]:checked', '#frm').val();
},
String : function(nr, pp, value)
{
return document.getElementById( 'inp_param_' + nr ).value;
},
StringList : function(nr, pp, value)
{
var ret = [];
for(var i=0; i<value.length; ++i)
{
ret.push( document.getElementById('inp_param_' + nr + '_' + i).value );
}
return ret;
},
Message : function(nr, pp, value)
{
var ret = {};
ret.id = document.getElementById('inp_param_' + nr + '_id').value;
ret.shortmsg = document.getElementById('inp_param_' + nr + '_smsg').value;
ret.from = Form2Param.Identity( nr + '_from');
return ret;
},
Identity : function(nr, pp, value)
{
var ret = {};
ret.user_id = document.getElementById('inp_param_' + nr + '_id').value;
ret.username = document.getElementById('inp_param_' + nr + '_name').value;
ret.address = document.getElementById('inp_param_' + nr + '_addr').value;
ret.fpr = document.getElementById('inp_param_' + nr + '_fpr').value;
return ret;
},
PEP_enc_format : function(nr, pp, value)
{
return $('input[name=inp_rad_' + nr + ']:checked', '#frm').val();
}
};
// uses {0}, {1} etc. instead of %d etc.
function sprintf(format)
{
var args = Array.prototype.slice.call(arguments, 1);
return format.replace(/{(\d+)}/g, function(match, number)
{
return typeof args[number] != 'undefined' ? args[number] : match;
});
};
function getSessions()
{
var content = "";
for(var i=0; i<openSessions.length; ++i)
{
var os = openSessions[i];
content += '<input type="radio" name="sessionRadio" value="' + os.session + '">&nbsp;<tt>' + os.session + '</tt><br>';
}
return content;
}
function showSessions()
{
document.getElementById("sessions").innerHTML = getSessions();
}
function createSession()
{
var url = document.getElementById("server").value + 'createSession';
var request = {};
request.method = 'createSession';
request.params = ['ö𝄞ö'];
request.id = ++call_ID;
request.jsonrpc = "2.0";
var x = $.post(url, JSON.stringify(request), null, "json")
.done(function(data, status, xhr) {
openSessions.push(data);
showSessions();
})
.fail(function( hdr, txt, err) {
alert( "error [" + hdr + "|" + txt + "|" + err + "]" );
})
;
}
function getAllSessions()
{
var url = document.getElementById("server").value + 'getAllSessions';
var request = {};
request.method = 'getAllSessions';
request.params = {};
request.id = ++call_ID;
request.jsonrpc = "2.0";
var x = $.post(url, JSON.stringify(request), null, "json")
.done(function(data, status, xhr) {
openSessions = data;
showSessions();
})
.fail(function( hdr, txt, err) {
alert( "error [" + hdr + "|" + txt + "|" + err + "]" );
})
;
}
function displayResult(response)
{
var pre = document.getElementById("resultpre");
pre.innerHTML = "cklickiii [" + JSON.stringify(response, null, '\t') + ']'
if (response.result)
{
pre.innerHTML = JSON.stringify(response.result);
pre.className = "green";
}else if (response.error)
{
pre.innerHTML = JSON.stringify(response.error);
pre.className = "red";
}
}
function button_click()
{
var deb = document.getElementById("debug");
var pre = document.getElementById("resultpre");
pre.innerHTML = "momentele…";
pre.className = "red";
var url = document.getElementById("server").value + 'callFunction';
var request = {};
request.method = document.getElementById("fn_name").value;
request.params = new Array(func.params.length);
for(var i=0, len=func.params.length; i<len; ++i)
{
var pp = func.params[i];
if(pp.direction == "Out")
{
request.params[i] = OutputParam;
}else{
var form2param_func = Form2Param[pp.type];
if(form2param_func == undefined)
form2param_func = function(nr, pp, value) { return "Unknown(" + pp.type + ") nr=" + nr + ", value=" + value; };
request.params[i] = form2param_func(i, pp, func_params[i]);
}
}
request.id = ++call_ID;
request.jsonrpc = "2.0";
var x = $.post(url, JSON.stringify(request), null, "json")
.done(function(moo) {
displayResult(moo);
})
.fail(function( hdr, txt, err) {
alert( "Ajax POST request returns an: \n"
+ "Header: " + JSON.stringify(hdr) + "\n"
+ "Text: " + JSON.stringify(txt) + "\n"
+ "Error:" + JSON.stringify(err) + "\n" );
})
;
pre.innerHTML = "post request sent. request=[" + JSON.stringify(request) + "]";
deb.innerHTML = "url=[" + url + "], fn=[" + document.getElementById("fn_name").value + "]";
}
function prepare_call(f)
{
func = f;
func_params = new Array(func.params.length);
var len = f.params.length;
if(len==0)
{
document.getElementById("td_param").innerHTML = '<i>(no parameters at all)</i>';
return;
}
var parameters='<ol>';
for(var i=0, len=f.params.length; i<len; ++i)
{
var pp = f.params[i];
var param2form_func = Param2Form[pp.type];
if(param2form_func == undefined)
param2form_func = function(nr, pp, value)
{
if(pp.direction == 'Out')
{
return '<i>Output parameter of type "' + pp.type + '"</i>';
}else{
return "Unknown(" + pp.type + ", direction=" + pp.direction + ") nr=" + nr + ", value=" + value;
}
};
parameters += '<li id="li_' + i + '">' + param2form_func(i, pp, func_params[i])+ '</li>';
}
parameters += '</ol>\n';
document.getElementById("td_param").innerHTML = parameters;
}
function on_select_change()
{
var fn = $( "#fn_name" ).val();
for(var i=0, len=pep_functions.length; i<len; ++i)
{
var f = pep_functions[i];
if(f.name == fn)
{
prepare_call(f);
}
}
}
function init_pep_functions()
{
var optionList = "";
for(var i=0, len=pep_functions.length; i<len; ++i)
{
var f = pep_functions[i];
optionList += "<option>" + f.name + "</option>\n";
}
document.getElementById("fn_name").innerHTML = optionList;
getAllSessions();
}

+ 4
- 0
html/jquery-2.2.0.min.js
File diff suppressed because it is too large
View File


BIN
html/json-test.ico View File

Before After

+ 1396
- 0
libevent-2.0.22-stable/ChangeLog
File diff suppressed because it is too large
View File


+ 257
- 0
libevent-2.0.22-stable/Doxyfile View File

@ -0,0 +1,257 @@
# Doxyfile 1.5.1
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
#
# All text after a hash (#) is considered a comment and will be ignored
# The format is:
# TAG = value [value, ...]
# For lists items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (" ")
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = libevent
# Place all output under 'doxygen/'
OUTPUT_DIRECTORY = doxygen/
# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
# will interpret the first line (until the first dot) of a JavaDoc-style
# comment as the brief description. If set to NO, the JavaDoc
# comments will behave just like the Qt-style comments (thus requiring an
# explicit @brief command for a brief description.
JAVADOC_AUTOBRIEF = YES
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
# sources only. Doxygen will then generate output that is more tailored for C.
# For instance, some of the names that are used will be different. The list
# of all members will be omitted, etc.
OPTIMIZE_OUTPUT_FOR_C = YES
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
# brief documentation of file, namespace and class members alphabetically
# by member name. If set to NO (the default) the members will appear in
# declaration order.
SORT_BRIEF_DOCS = YES
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
# can be used to strip a user-defined part of the path. Stripping is
# only done if one of the specified strings matches the left-hand part of
# the path. The tag can be used to show relative paths in the file list.
# If left blank the directory from which doxygen is run is used as the
# path to strip.
STRIP_FROM_PATH = include/
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
# The INPUT tag can be used to specify the files and/or directories that contain
# documented source files. You may enter file names like "myfile.cpp" or
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = \
include/event2/buffer.h \
include/event2/buffer_compat.h \
include/event2/bufferevent.h \
include/event2/bufferevent_compat.h \
include/event2/bufferevent_ssl.h \
include/event2/dns.h \
include/event2/dns_compat.h \
include/event2/event.h \
include/event2/event_compat.h \
include/event2/http.h \
include/event2/http_compat.h \
include/event2/listener.h \
include/event2/rpc.h \
include/event2/rpc_compat.h \
include/event2/tag.h \
include/event2/tag_compat.h \
include/event2/thread.h \
include/event2/util.h
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
# generate HTML output.
GENERATE_HTML = YES
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
GENERATE_LATEX = YES
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `latex' will be used as the default path.
LATEX_OUTPUT = latex
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked. If left blank `latex' will be used as the default command name.
LATEX_CMD_NAME = latex
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
# generate index for LaTeX. If left blank `makeindex' will be used as the
# default command name.
MAKEINDEX_CMD_NAME = makeindex
# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
# LaTeX documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_LATEX = NO
# The PAPER_TYPE tag can be used to set the paper type that is used
# by the printer. Possible values are: a4, a4wide, letter, legal and
# executive. If left blank a4wide will be used.
PAPER_TYPE = a4wide
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output.
EXTRA_PACKAGES =
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
# the generated latex document. The header should contain everything until
# the first chapter. If it is left blank doxygen will generate a
# standard header. Notice: only use this tag if you know what you are doing!
LATEX_HEADER =
# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
# is prepared for conversion to pdf (using ps2pdf). The pdf file will
# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.
PDF_HYPERLINKS = NO
# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.
USE_PDFLATEX = YES
# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
# command to the generated LaTeX files. This will instruct LaTeX to keep
# running if errors occur, instead of asking the user for help.
# This option is also used when generating formulas in HTML.
LATEX_BATCHMODE = NO
# If LATEX_HIDE_INDICES is set to YES then doxygen will not
# include the index chapters (such as File Index, Compound Index, etc.)
# in the output.
LATEX_HIDE_INDICES = NO
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
GENERATE_MAN = NO
# The MAN_EXTENSION tag determines the extension that is added to
# the generated man pages (default is the subroutine's section .3)
MAN_EXTENSION = .3
# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
# then it will generate one additional man file for each entity
# documented in the real man page(s). These additional files
# only source the real man page, but without them the man command
# would be unable to find the correct page. The default is NO.
MAN_LINKS = YES
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
# evaluate all C-preprocessor directives found in the sources and include
# files.
ENABLE_PREPROCESSING = YES
# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
# names in the source code. If set to NO (the default) only conditional
# compilation will be performed. Macro expansion can be done in a controlled
# way by setting EXPAND_ONLY_PREDEF to YES.
MACRO_EXPANSION = NO
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
# then the macro expansion is limited to the macros specified with the
# PREDEFINED and EXPAND_AS_DEFINED tags.
EXPAND_ONLY_PREDEF = NO
# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
# in the INCLUDE_PATH (see below) will be search if a #include is found.
SEARCH_INCLUDES = YES
# The INCLUDE_PATH tag can be used to specify one or more directories that
# contain include files that are not input files but should be processed by
# the preprocessor.
INCLUDE_PATH =
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the
# directories. If left blank, the patterns specified with FILE_PATTERNS will
# be used.
INCLUDE_FILE_PATTERNS =
# The PREDEFINED tag can be used to specify one or more macro names that
# are defined before the preprocessor is started (similar to the -D option of
# gcc). The argument of the tag is a list of macros of the form: name
# or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed. To prevent a macro definition from being
# undefined via #undef or recursively expanded use the := operator
# instead of the = operator.
PREDEFINED = TAILQ_ENTRY RB_ENTRY _EVENT_DEFINED_TQENTRY _EVENT_IN_DOXYGEN
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
EXPAND_AS_DEFINED =
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
# on a line, have an all uppercase name, and do not end with a semicolon. Such
# function macros are typically used for boiler-plate code, and will confuse
# the parser if not removed.
SKIP_FUNCTION_MACROS = YES

+ 74
- 0
libevent-2.0.22-stable/LICENSE View File

@ -0,0 +1,74 @@
Libevent is available for use under the following license, commonly known
as the 3-clause (or "modified") BSD license:
==============================
Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
==============================
Portions of Libevent are based on works by others, also made available by
them under the three-clause BSD license above. The copyright notices are
available in the corresponding source files; the license is as above. Here's
a list:
log.c:
Copyright (c) 2000 Dug Song <dugsong@monkey.org>
Copyright (c) 1993 The Regents of the University of California.
strlcpy.c:
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
win32select.c:
Copyright (c) 2003 Michael A. Davis <mike@datanerds.net>
evport.c:
Copyright (c) 2007 Sun Microsystems
ht-internal.h:
Copyright (c) 2002 Christopher Clark
minheap-internal.h:
Copyright (c) 2006 Maxim Yegorushkin <maxim.yegorushkin@gmail.com>
==============================
The arc4module is available under the following, sometimes called the
"OpenBSD" license:
Copyright (c) 1996, David Mazieres <dm@uun.org>
Copyright (c) 2008, Damien Miller <djm@openbsd.org>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

+ 244
- 0
libevent-2.0.22-stable/Makefile.am View File

@ -0,0 +1,244 @@
# Makefile.am for libevent
# Copyright 2000-2007 Niels Provos
# Copyright 2007-2012 Niels Provos and Nick Mathewson
#
# See LICENSE for copying information.
# 'foreign' means that we're not enforcing GNU package rules strictly.
# '1.7' means that we need automake 1.7 or later (and we do).
AUTOMAKE_OPTIONS = foreign 1.7
ACLOCAL_AMFLAGS = -I m4
# This is the "Release" of the Libevent ABI. It takes precedence over
# the VERSION_INFO, so that two versions of Libevent with the same
# "Release" are never binary-compatible.
#
# This number incremented once for the 2.0 release candidate, and
# will increment for each series until we revise our interfaces enough
# that we can seriously expect ABI compatibility between series.
#
RELEASE = -release 2.0
# This is the version info for the libevent binary API. It has three
# numbers:
# Current -- the number of the binary API that we're implementing
# Revision -- which iteration of the implementation of the binary
# API are we supplying?
# Age -- How many previous binary API versions do we also
# support?
#
# To increment a VERSION_INFO (current:revision:age):
# If the ABI didn't change:
# Return (current:revision+1:age)
# If the ABI changed, but it's backward-compatible:
# Return (current+1:0:age+1)
# If the ABI changed and it isn't backward-compatible:
# Return (current+1:0:0)
#
# Once an RC is out, DO NOT MAKE ANY ABI-BREAKING CHANGES IN THAT SERIES
# UNLESS YOU REALLY REALLY HAVE TO.
VERSION_INFO = 6:10:1
# History: RELEASE VERSION_INFO
# 2.0.1-alpha -- 2.0 1:0:0
# 2.0.2-alpha -- 2:0:0
# 2.0.3-alpha -- 2:0:0 (should have incremented; didn't.)
# 2.0.4-alpha -- 3:0:0
# 2.0.5-beta -- 4:0:0
# 2.0.6-rc -- 2.0 2:0:0
# 2.0.7-rc -- 2.0 3:0:1
# 2.0.8-rc -- 2.0 4:0:2
# 2.0.9-rc -- 2.0 5:0:0 (ABI changed slightly)
# 2.0.10-stable-- 2.0 5:1:0 (No ABI change)
# 2.0.11-stable-- 2.0 6:0:1 (ABI changed, backward-compatible)
# 2.0.12-stable-- 2.0 6:1:1 (No ABI change)
# 2.0.13-stable-- 2.0 6:2:1 (No ABI change)
# 2.0.14-stable-- 2.0 6:3:1 (No ABI change)
# 2.0.15-stable-- 2.0 6:3:1 (Forgot to update :( )
# 2.0.16-stable-- 2.0 6:4:1 (No ABI change)
# 2.0.17-stable-- 2.0 6:5:1 (No ABI change)
# 2.0.18-stable-- 2.0 6:6:1 (No ABI change)
# 2.0.19-stable-- 2.0 6:7:1 (No ABI change)
# 2.0.20-stable-- 2.0 6:8:1 (No ABI change)
# 2.0.21-stable-- 2.0 6:9:1 (No ABI change)
# 2.0.22-stable-- 2.0 6:10:1 (No ABI change)
#
# For Libevent 2.1:
# 2.1.1-alpha -- 2.1 1:0:0
# ABI version history for this package effectively restarts every time
# we change RELEASE. Version 1.4.x had RELEASE of 1.4.
#
# Ideally, we would not be using RELEASE at all; instead we could just
# use the VERSION_INFO field to label our backward-incompatible ABI
# changes, and those would be few and far between. Unfortunately,
# Libevent still exposes far too many volatile structures in its
# headers, so we pretty much have to assume that most development
# series will break ABI compatibility. For now, it's simplest just to
# keep incrementing the RELEASE between series and resetting VERSION_INFO.
#
# Eventually, when we get to the point where the structures in the
# headers are all non-changing (or not there at all!), we can shift to
# a more normal worldview where backward-incompatible ABI changes are
# nice and rare. For the next couple of years, though, 'struct event'
# is user-visible, and so we can pretty much guarantee that release
# series won't be binary-compatible.
if INSTALL_LIBEVENT
dist_bin_SCRIPTS = event_rpcgen.py
endif
pkgconfigdir=$(libdir)/pkgconfig
LIBEVENT_PKGCONFIG=libevent.pc
# These sources are conditionally added by configure.in or conditionally
# included from other files.
PLATFORM_DEPENDENT_SRC = \
epoll_sub.c \
arc4random.c
EXTRA_DIST = \
LICENSE \
autogen.sh \
event_rpcgen.py \
libevent.pc.in \
make-event-config.sed \
Doxyfile \
whatsnew-2.0.txt \
Makefile.nmake test/Makefile.nmake \
$(PLATFORM_DEPENDENT_SRC)
LIBEVENT_LIBS_LA = libevent.la libevent_core.la libevent_extra.la
if PTHREADS
LIBEVENT_LIBS_LA += libevent_pthreads.la
LIBEVENT_PKGCONFIG += libevent_pthreads.pc
endif
if OPENSSL
LIBEVENT_LIBS_LA += libevent_openssl.la
LIBEVENT_PKGCONFIG += libevent_openssl.pc
endif
if INSTALL_LIBEVENT
lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
else
noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
endif
SUBDIRS = . include sample test
if BUILD_WIN32
SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
SYS_SRC = win32select.c evthread_win32.c buffer_iocp.c event_iocp.c \
bufferevent_async.c
SYS_INCLUDES = -IWIN32-Code
else
SYS_LIBS =
SYS_SRC =
SYS_INCLUDES =
endif
if SELECT_BACKEND
SYS_SRC += select.c
endif
if POLL_BACKEND
SYS_SRC += poll.c
endif
if DEVPOLL_BACKEND
SYS_SRC += devpoll.c
endif
if KQUEUE_BACKEND
SYS_SRC += kqueue.c
endif
if EPOLL_BACKEND
SYS_SRC += epoll.c
endif
if EVPORT_BACKEND
SYS_SRC += evport.c
endif
if SIGNAL_SUPPORT
SYS_SRC += signal.c
endif
BUILT_SOURCES = include/event2/event-config.h
include/event2/event-config.h: config.h make-event-config.sed
test -d include/event2 || $(MKDIR_P) include/event2
$(SED) -f $(srcdir)/make-event-config.sed < config.h > $@T
mv -f $@T $@
CORE_SRC = event.c evthread.c buffer.c \
bufferevent.c bufferevent_sock.c bufferevent_filter.c \
bufferevent_pair.c listener.c bufferevent_ratelim.c \
evmap.c log.c evutil.c evutil_rand.c strlcpy.c $(SYS_SRC)
EXTRA_SRC = event_tagging.c http.c evdns.c evrpc.c
if BUILD_WITH_NO_UNDEFINED
NO_UNDEFINED = -no-undefined
MAYBE_CORE = libevent_core.la
else
NO_UNDEFINED =
MAYBE_CORE =
endif
GENERIC_LDFLAGS = -version-info $(VERSION_INFO) $(RELEASE) $(NO_UNDEFINED)
libevent_la_SOURCES = $(CORE_SRC) $(EXTRA_SRC)
libevent_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
libevent_la_LDFLAGS = $(GENERIC_LDFLAGS)
libevent_core_la_SOURCES = $(CORE_SRC)
libevent_core_la_LIBADD = @LTLIBOBJS@ $(SYS_LIBS)
libevent_core_la_LDFLAGS = $(GENERIC_LDFLAGS)
if PTHREADS
libevent_pthreads_la_SOURCES = evthread_pthread.c
libevent_pthreads_la_LIBADD = $(MAYBE_CORE)
libevent_pthreads_la_LDFLAGS = $(GENERIC_LDFLAGS)
endif
libevent_extra_la_SOURCES = $(EXTRA_SRC)
libevent_extra_la_LIBADD = $(MAYBE_CORE) $(SYS_LIBS)
libevent_extra_la_LDFLAGS = $(GENERIC_LDFLAGS)
if OPENSSL
libevent_openssl_la_SOURCES = bufferevent_openssl.c
libevent_openssl_la_LIBADD = $(MAYBE_CORE) $(OPENSSL_LIBS)
libevent_openssl_la_LDFLAGS = $(GENERIC_LDFLAGS)
endif
noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \
evrpc-internal.h strlcpy-internal.h evbuffer-internal.h \
bufferevent-internal.h http-internal.h event-internal.h \
evthread-internal.h ht-internal.h defer-internal.h \
minheap-internal.h log-internal.h evsignal-internal.h evmap-internal.h \
changelist-internal.h iocp-internal.h \
ratelim-internal.h \
WIN32-Code/event2/event-config.h \
WIN32-Code/tree.h \
compat/sys/queue.h
EVENT1_HDRS = event.h evhttp.h evdns.h evrpc.h evutil.h
if INSTALL_LIBEVENT
include_HEADERS = $(EVENT1_HDRS)
else
noinst_HEADERS += $(EVENT1_HDRS)
endif
AM_CPPFLAGS = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES)
verify: check
doxygen: FORCE
doxygen $(srcdir)/Doxyfile
FORCE:
DISTCLEANFILES = *~ libevent.pc ./include/event2/event-config.h

+ 1331
- 0
libevent-2.0.22-stable/Makefile.in
File diff suppressed because it is too large
View File


+ 47
- 0
libevent-2.0.22-stable/Makefile.nmake View File

@ -0,0 +1,47 @@
# WATCH OUT! This makefile is a work in progress. It is probably missing
# tons of important things. DO NOT RELY ON IT TO BUILD A GOOD LIBEVENT.
# Needed for correctness
CFLAGS=/IWIN32-Code /Iinclude /Icompat /DWIN32 /DHAVE_CONFIG_H /I.
# For optimization and warnings
CFLAGS=$(CFLAGS) /Ox /W3 /wd4996 /nologo
# XXXX have a debug mode
LIBFLAGS=/nologo
CORE_OBJS=event.obj buffer.obj bufferevent.obj bufferevent_sock.obj \
bufferevent_pair.obj listener.obj evmap.obj log.obj evutil.obj \
strlcpy.obj signal.obj bufferevent_filter.obj evthread.obj \
bufferevent_ratelim.obj evutil_rand.obj
WIN_OBJS=win32select.obj evthread_win32.obj buffer_iocp.obj \
event_iocp.obj bufferevent_async.obj
EXTRA_OBJS=event_tagging.obj http.obj evdns.obj evrpc.obj
ALL_OBJS=$(CORE_OBJS) $(WIN_OBJS) $(EXTRA_OBJS)
STATIC_LIBS=libevent_core.lib libevent_extras.lib libevent.lib
all: static_libs tests
static_libs: $(STATIC_LIBS)
libevent_core.lib: $(CORE_OBJS) $(WIN_OBJS)
lib $(LIBFLAGS) $(CORE_OBJS) $(WIN_OBJS) /out:libevent_core.lib
libevent_extras.lib: $(EXTRA_OBJS)
lib $(LIBFLAGS) $(EXTRA_OBJS) /out:libevent_extras.lib
libevent.lib: $(CORE_OBJS) $(WIN_OBJS) $(EXTRA_OBJS)
lib $(LIBFLAGS) $(CORE_OBJS) $(EXTRA_OBJS) $(WIN_OBJS) /out:libevent.lib
clean:
del $(ALL_OBJS)
del $(STATIC_LIBS)
cd test
$(MAKE) /F Makefile.nmake clean
tests:
cd test
$(MAKE) /F Makefile.nmake

+ 198
- 0
libevent-2.0.22-stable/README View File

@ -0,0 +1,198 @@
0. BUILDING AND INSTALLATION (Briefly)
$ ./configure
$ make
$ make verify # (optional)
$ sudo make install
1. BUILDING AND INSTALLATION (In Depth)
To build libevent, type
$ ./configure && make
(If you got libevent from the git repository, you will
first need to run the included "autogen.sh" script in order to
generate the configure script.)
You can run the regression tests by running
$ make verify
Install as root via
# make install
Before, reporting any problems, please run the regression tests.
To enable the low-level tracing build the library as:
CFLAGS=-DUSE_DEBUG ./configure [...]
Standard configure flags should work. In particular, see:
--disable-shared Only build static libraries
--prefix Install all files relative to this directory.
The configure script also supports the following flags:
--enable-gcc-warnings Enable extra compiler checking with GCC.
--disable-malloc-replacement
Don't let applications replace our memory
management functions
--disable-openssl Disable support for OpenSSL encryption.
--disable-thread-support Don't support multithreaded environments.
2. USEFUL LINKS:
For the latest released version of Libevent, see the official website at
http://libevent.org/ .
There's a pretty good work-in-progress manual up at
http://www.wangafu.net/~nickm/libevent-book/ .
For the latest development versions of Libevent, access our Git repository
via
"git clone git://levent.git.sourceforge.net/gitroot/levent/libevent"
You can browse the git repository online at
http://levent.git.sourceforge.net/git/gitweb-index.cgi .
To report bugs, request features, or submit patches to Libevent,
use the Sourceforge trackers at
https://sourceforge.net/tracker/?group_id=50884 .
There's also a libevent-users mailing list for talking about Libevent
use and development: http://archives.seul.org/libevent/users/
3. ACKNOWLEDGMENTS
The following people have helped with suggestions, ideas, code or
fixing bugs:
Arno Bakker
Alejo
Weston Andros Adamson
William Ahern
Ivan Andropov
Sergey Avseyev
Avi Bab
Gilad Benjamini
Stas Bekman
Joachim Bauch
Denis Bilenko
Julien Blache
Kevin Bowling
Tomash Brechko
Kelly Brock
Ralph Castain
Adrian Chadd
Lawnstein Chan
Shuo Chen
Ka-Hing Cheung
Andrew Cox
George Danchev
Andrew Danforth
Antony Dovgal
Ed Day
Christopher Davis
Mike Davis
Mihai Draghicioiu
Mark Ellzey
Shie Erlich
Leonid Evdokimov
Juan Pablo Fernandez
Christophe Fillot
Mike Frysinger
Remi Gacogne
Alexander von Gernler
Artur Grabowski
Sebastian Hahn
Dave Hart
Greg Hazel
Michael Herf
Savg He
Mark Heily
Greg Hewgill
Andrew Hochhaus
Aaron Hopkins
Tani Hosokawa
Jamie Iles
Claudio Jeker
Evan Jones
George Kadianakis
Phua Keat
Kevin Ko
Brian Koehmstedt
Marko Kreen
Valery Kyholodov
Ross Lagerwall
Scott Lamb
Christopher Layne
Adam Langley
Philip Lewis
Zhou Li
David Libenzi
Yan Lin
Moshe Litvin
Simon Liu
Mitchell Livingston
Hagne Mahre
Lubomir Marinov
Abilio Marques
Nick Mathewson
James Mansion
Nicholas Marriott
Andrey Matveev
Caitlin Mercer
Dagobert Michelsen
Mansour Moufid
Felix Nawothnig
Trond Norbye
Linus Nordberg
Richard Nyberg
Jon Oberheide
Phil Oleson
Dave Pacheco
Tassilo von Parseval
Catalin Patulea
Patrick Pelletier
Simon Perreault
Pierre Phaneuf
Ryan Phillips
Dimitre Piskyulev
Pavel Plesov
Jon Poland
Nate R
Robert Ransom
Bert JW Regeer
Peter Rosin
Maseeb Abdul Qadir
Wang Qin
Alex S
Hanna Schroeter
Ralf Schmitt
Mike Smellie
Kevin Springborn
Harlan Stenn
Steve Snyder
Dug Song
Dongsheng Song
Hannes Sowa
Ferenc Szalai
Brodie Thiesfield
Jason Toffaletti
Gisle Vanem
Bas Verhoeven
Constantine Verutin
Colin Watt
Zack Weinberg
Jardel Weyrich
Alex
Taral
propanbutan
mmadia
If we have forgotten your name, please contact us.

+ 363
- 0
libevent-2.0.22-stable/WIN32-Code/event2/event-config.h View File

@ -0,0 +1,363 @@
/* event2/event-config.h
*
* This file was generated by autoconf when libevent was built, and post-
* processed by Libevent so that its macros would have a uniform prefix.
*
* DO NOT EDIT THIS FILE.
*
* Do not rely on macros in this file existing in later versions.
*/
#ifndef _EVENT_CONFIG_H_
#define _EVENT_CONFIG_H_
/* config.h. Generated by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
/* Define if libevent should not allow replacing the mm functions */
/* #undef _EVENT_DISABLE_MM_REPLACEMENT */
/* Define if libevent should not be compiled with thread support */
/* #undef _EVENT_DISABLE_THREAD_SUPPORT */
/* Define if clock_gettime is available in libc */
/* #undef _EVENT_DNS_USE_CPU_CLOCK_FOR_ID */
/* Define is no secure id variant is available */
/* #define _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID 1 */
#define _EVENT_DNS_USE_FTIME_FOR_ID 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
/* #undef _EVENT_HAVE_ARPA_INET_H */
/* Define to 1 if you have the `clock_gettime' function. */
/* #undef _EVENT_HAVE_CLOCK_GETTIME */
/* Define if /dev/poll is available */
/* #undef _EVENT_HAVE_DEVPOLL */
/* Define to 1 if you have the <dlfcn.h> header file. */
/* #undef _EVENT_HAVE_DLFCN_H */
/* Define if your system supports the epoll system calls */
/* #undef _EVENT_HAVE_EPOLL */
/* Define to 1 if you have the `epoll_ctl' function. */
/* #undef _EVENT_HAVE_EPOLL_CTL */
/* Define to 1 if you have the `eventfd' function. */
/* #undef _EVENT_HAVE_EVENTFD */
/* Define if your system supports event ports */
/* #undef _EVENT_HAVE_EVENT_PORTS */
/* Define to 1 if you have the `fcntl' function. */
/* #undef _EVENT_HAVE_FCNTL */
/* Define to 1 if you have the <fcntl.h> header file. */
#define _EVENT_HAVE_FCNTL_H 1
/* Define to 1 if you have the `getaddrinfo' function. */
#define _EVENT_HAVE_GETADDRINFO 1
/* Define to 1 if you have the `getnameinfo' function. */
#define _EVENT_HAVE_GETNAMEINFO 1
/* Define to 1 if you have the `getprotobynumber' function. */
#define _EVENT_HAVE_GETPROTOBYNUMBER 1
/* Define to 1 if you have the `getservbyname' function. */
#define _EVENT_HAVE_GETSERVBYNAME 1
/* Define to 1 if you have the `gettimeofday' function. */
/* #define _EVENT_HAVE_GETTIMEOFDAY 1 */
/* Define to 1 if you have the `inet_aton' function. */
/* #undef _EVENT_HAVE_INET_ATON */
/* Define to 1 if you have the `inet_ntop' function. */
/* #undef _EVENT_HAVE_INET_NTOP */
/* Define to 1 if you have the `inet_pton' function. */
/* #undef _EVENT_HAVE_INET_PTON */
/* Define to 1 if you have the <inttypes.h> header file. */
/* #define _EVENT_HAVE_INTTYPES_H 1 */
/* Define to 1 if you have the `kqueue' function. */
/* #undef _EVENT_HAVE_KQUEUE */
/* Define if the system has zlib */
/* #undef _EVENT_HAVE_LIBZ */
/* Define to 1 if you have the <memory.h> header file. */
#define _EVENT_HAVE_MEMORY_H 1
/* Define to 1 if you have the `mmap' function. */
/* #undef _EVENT_HAVE_MMAP */
/* Define to 1 if you have the <netinet/in6.h> header file. */
/* #undef _EVENT_HAVE_NETINET_IN6_H */
/* Define to 1 if you have the <netinet/in.h> header file. */
/* #undef _EVENT_HAVE_NETINET_IN_H */
/* Define to 1 if you have the `pipe' function. */
/* #undef _EVENT_HAVE_PIPE */
/* Define to 1 if you have the `poll' function. */
/* #undef _EVENT_HAVE_POLL */
/* Define to 1 if you have the <poll.h> header file. */
/* #undef _EVENT_HAVE_POLL_H */
/* Define to 1 if you have the `port_create' function. */
/* #undef _EVENT_HAVE_PORT_CREATE */
/* Define to 1 if you have the <port.h> header file. */
/* #undef _EVENT_HAVE_PORT_H */
/* Define if you have POSIX threads libraries and header files. */
/* #undef _EVENT_HAVE_PTHREAD */
/* Define if we have pthreads on this system */
/* #undef _EVENT_HAVE_PTHREADS */
/* Define to 1 if the system has the type `sa_family_t'. */
/* #undef _EVENT_HAVE_SA_FAMILY_T */
/* Define to 1 if you have the `select' function. */
/* #undef _EVENT_HAVE_SELECT */
/* Define to 1 if you have the `sendfile' function. */
/* #undef _EVENT_HAVE_SENDFILE */
/* Define if F_SETFD is defined in <fcntl.h> */
/* #undef _EVENT_HAVE_SETFD */
/* Define to 1 if you have the `sigaction' function. */
/* #undef _EVENT_HAVE_SIGACTION */
/* Define to 1 if you have the `signal' function. */
#define _EVENT_HAVE_SIGNAL 1
/* Define to 1 if you have the `splice' function. */
/* #undef _EVENT_HAVE_SPLICE */
/* Define to 1 if you have the <stdarg.h> header file. */
#define _EVENT_HAVE_STDARG_H 1
/* Define to 1 if you have the <stddef.h> header file. */
#define _EVENT_HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
/* #define _EVENT_HAVE_STDINT_H 1 */
/* Define to 1 if you have the <stdlib.h> header file. */
#define _EVENT_HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define _EVENT_HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define _EVENT_HAVE_STRING_H 1
/* Define to 1 if you have the `strlcpy' function. */
/* #undef _EVENT_HAVE_STRLCPY */
/* Define to 1 if you have the `strsep' function. */
/* #undef _EVENT_HAVE_STRSEP */
/* Define to 1 if you have the `strtok_r' function. */
/* #undef _EVENT_HAVE_STRTOK_R */
/* Define to 1 if you have the `strtoll' function. */
/* #define _EVENT_HAVE_STRTOLL 1 */
#define _EVENT_HAVE_STRUCT_ADDRINFO 1
/* Define to 1 if the system has the type `struct in6_addr'. */
#define _EVENT_HAVE_STRUCT_IN6_ADDR 1
/* Define to 1 if `s6_addr16' is member of `struct in6_addr'. */
#define _EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
/* Define to 1 if `s6_addr32' is member of `struct in6_addr'. */
#define _EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
#define _EVENT_HAVE_STRUCT_SOCKADDR_IN6 1
/* Define to 1 if `sin6_len' is member of `struct sockaddr_in6'. */
/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */
/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */
/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
#define _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE 1
/* Define to 1 if you have the <sys/devpoll.h> header file. */
/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */
/* Define to 1 if you have the <sys/epoll.h> header file. */
/* #undef _EVENT_HAVE_SYS_EPOLL_H */
/* Define to 1 if you have the <sys/eventfd.h> header file. */
/* #undef _EVENT_HAVE_SYS_EVENTFD_H */
/* Define to 1 if you have the <sys/event.h> header file. */
/* #undef _EVENT_HAVE_SYS_EVENT_H */
/* Define to 1 if you have the <sys/ioctl.h> header file. */
/* #undef _EVENT_HAVE_SYS_IOCTL_H */
/* Define to 1 if you have the <sys/mman.h> header file. */
/* #undef _EVENT_HAVE_SYS_MMAN_H */
/* Define to 1 if you have the <sys/param.h> header file. */
/* #define _EVENT_HAVE_SYS_PARAM_H 1 */
/* Define to 1 if you have the <sys/queue.h> header file. */
/* #undef _EVENT_HAVE_SYS_QUEUE_H */
/* Define to 1 if you have the <sys/select.h> header file. */
/* #undef _EVENT_HAVE_SYS_SELECT_H */
/* Define to 1 if you have the <sys/sendfile.h> header file. */
/* #undef _EVENT_HAVE_SYS_SENDFILE_H */
/* Define to 1 if you have the <sys/socket.h> header file. */
/* #undef _EVENT_HAVE_SYS_SOCKET_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
#define _EVENT_HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
/* #define _EVENT_HAVE_SYS_TIME_H 1 */
/* Define to 1 if you have the <sys/types.h> header file. */
#define _EVENT_HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/uio.h> header file. */
/* #undef _EVENT_HAVE_SYS_UIO_H */
/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
/* #undef _EVENT_HAVE_TAILQFOREACH */
/* Define if timeradd is defined in <sys/time.h> */
/* #undef _EVENT_HAVE_TIMERADD */
/* Define if timerclear is defined in <sys/time.h> */
#define _EVENT_HAVE_TIMERCLEAR 1
/* Define if timercmp is defined in <sys/time.h> */
#define _EVENT_HAVE_TIMERCMP 1
/* Define if timerisset is defined in <sys/time.h> */
#define _EVENT_HAVE_TIMERISSET 1
/* Define to 1 if the system has the type `uint16_t'. */
/* #define _EVENT_HAVE_UINT16_T 1 */
/* Define to 1 if the system has the type `uint32_t'. */
/* #define _EVENT_HAVE_UINT32_T 1 */
/* Define to 1 if the system has the type `uint64_t'. */
/* #define _EVENT_HAVE_UINT64_T 1 */
/* Define to 1 if the system has the type `uint8_t'. */
/* #define _EVENT_HAVE_UINT8_T 1 */
/* Define to 1 if you have the <unistd.h> header file. */
/* #define _EVENT_HAVE_UNISTD_H 1 */
/* Define to 1 if you have the `vasprintf' function. */
/* #undef _EVENT_HAVE_VASPRINTF */
/* Define if kqueue works correctly with pipes */
/* #undef _EVENT_HAVE_WORKING_KQUEUE */
/* Numeric representation of the version */
#define _EVENT_NUMERIC_VERSION 0x02001600
/* Name of package */
#define _EVENT_PACKAGE "libevent"
/* Define to the address where bug reports for this package should be sent. */
#define _EVENT_PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define _EVENT_PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define _EVENT_PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define _EVENT_PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define _EVENT_PACKAGE_VERSION ""
/* Define to necessary symbol if this constant uses a non-standard name on
your system. */
/* #undef _EVENT_PTHREAD_CREATE_JOINABLE */
/* The size of a `int', as computed by sizeof. */
#define _EVENT_SIZEOF_INT 4
/* The size of a `long', as computed by sizeof. */
#define _EVENT_SIZEOF_LONG 4
/* The size of a `long long', as computed by sizeof. */
#define _EVENT_SIZEOF_LONG_LONG 8
/* The size of a `short', as computed by sizeof. */
#define _EVENT_SIZEOF_SHORT 2
/* The size of `size_t', as computed by sizeof. */
#ifdef _WIN64
#define _EVENT_SIZEOF_SIZE_T 8
#else
#define _EVENT_SIZEOF_SIZE_T 4
#endif
/* The size of `void *', as computed by sizeof. */
#ifdef _WIN64
#define _EVENT_SIZEOF_VOID_P 8
#else
#define _EVENT_SIZEOF_VOID_P 4
#endif
/* Define to 1 if you have the ANSI C header files. */
#define _EVENT_STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define _EVENT_TIME_WITH_SYS_TIME 1
/* Version number of package */
#define _EVENT_VERSION "2.0.22-stable"
/* Define to appropriate substitue if compiler doesnt have __func__ */
#define _EVENT___func__ __FUNCTION__
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef _EVENT_const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef _EVENT___cplusplus
#define _EVENT_inline __inline
#endif
/* Define to `int' if <sys/types.h> does not define. */
/* #undef _EVENT_pid_t */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef _EVENT_size_t */
/* Define to unsigned int if you dont have it */
#define _EVENT_socklen_t unsigned int
/* Define to `int' if <sys/types.h> does not define. */
#define _EVENT_ssize_t SSIZE_T
#endif

+ 1354
- 0
libevent-2.0.22-stable/WIN32-Code/tree.h
File diff suppressed because it is too large
View File


+ 1014
- 0
libevent-2.0.22-stable/aclocal.m4
File diff suppressed because it is too large
View File


+ 555
- 0
libevent-2.0.22-stable/arc4random.c View File

@ -0,0 +1,555 @@
/* Portable arc4random.c based on arc4random.c from OpenBSD.
* Portable version by Chris Davis, adapted for Libevent by Nick Mathewson
* Copyright (c) 2010 Chris Davis, Niels Provos, and Nick Mathewson
* Copyright (c) 2010-2012 Niels Provos and Nick Mathewson
*
* Note that in Libevent, this file isn't compiled directly. Instead,
* it's included from evutil_rand.c
*/
/*
* Copyright (c) 1996, David Mazieres <dm@uun.org>
* Copyright (c) 2008, Damien Miller <djm@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
* Arc4 random number generator for OpenBSD.
*
* This code is derived from section 17.1 of Applied Cryptography,
* second edition, which describes a stream cipher allegedly
* compatible with RSA Labs "RC4" cipher (the actual description of
* which is a trade secret). The same algorithm is used as a stream
* cipher called "arcfour" in Tatu Ylonen's ssh package.
*
* Here the stream cipher has been modified always to include the time
* when initializing the state. That makes it impossible to
* regenerate the same random sequence twice, so this can't be used
* for encryption, but will generate good random numbers.
*
* RC4 is a registered trademark of RSA Laboratories.
*/
#ifndef ARC4RANDOM_EXPORT
#define ARC4RANDOM_EXPORT
#endif
#ifndef ARC4RANDOM_UINT32
#define ARC4RANDOM_UINT32 uint32_t
#endif
#ifndef ARC4RANDOM_NO_INCLUDES
#ifdef WIN32
#include <wincrypt.h>
#include <process.h>
#else
#include <fcntl.h>
#include <unistd.h>
#include <sys/param.h>
#include <sys/time.h>
#ifdef _EVENT_HAVE_SYS_SYSCTL_H
#include <sys/sysctl.h>
#endif
#endif
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#endif
/* Add platform entropy 32 bytes (256 bits) at a time. */
#define ADD_ENTROPY 32
/* Re-seed from the platform RNG after generating this many bytes. */
#define BYTES_BEFORE_RESEED 1600000
struct arc4_stream {
unsigned char i;
unsigned char j;
unsigned char s[256];
};
#ifdef WIN32
#define getpid _getpid
#define pid_t int
#endif
static int rs_initialized;
static struct arc4_stream rs;
static pid_t arc4_stir_pid;
static int arc4_count;
static int arc4_seeded_ok;
static inline unsigned char arc4_getbyte(void);
static inline void
arc4_init(void)
{
int n;
for (n = 0; n < 256; n++)
rs.s[n] = n;
rs.i = 0;
rs.j = 0;
}
static inline void
arc4_addrandom(const unsigned char *dat, int datlen)
{
int n;
unsigned char si;
rs.i--;
for (n = 0; n < 256; n++) {