libevent源码
该资源为libevent库源码,2.1.8stable,用于编译libevent相关库文件,编译过程及使用库创建http https server可参照本账号博客文章。
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 42436 2017-01-30 01:51 libevent-2.1.8-stableaclocal.m4
文件 13136 2016-10-05 03:55 libevent-2.1.8-stablearc4random.c
文件 431 2016-11-01 23:34 libevent-2.1.8-stableautogen.sh
文件 82236 2016-12-06 17:00 libevent-2.1.8-stableuffer.c
文件 18486 2016-10-05 03:55 libevent-2.1.8-stableufferevent-internal.h
文件 26105 2016-11-01 23:34 libevent-2.1.8-stableufferevent.c
文件 18179 2016-10-05 03:55 libevent-2.1.8-stableufferevent_async.c
文件 18007 2017-01-30 01:51 libevent-2.1.8-stableufferevent_filter.c
文件 39500 2017-01-22 23:26 libevent-2.1.8-stableufferevent_openssl.c
文件 9834 2016-10-05 03:55 libevent-2.1.8-stableufferevent_pair.c
文件 30215 2016-10-05 03:55 libevent-2.1.8-stableufferevent_ratelim.c
文件 18814 2017-01-22 23:26 libevent-2.1.8-stableufferevent_sock.c
文件 8639 2016-10-05 03:55 libevent-2.1.8-stableuffer_iocp.c
文件 4627 2016-10-05 03:55 libevent-2.1.8-stablechangelist-internal.h
文件 101174 2017-01-30 01:36 libevent-2.1.8-stableChangeLog
文件 17369 2016-10-05 03:55 libevent-2.1.8-stableChangeLog-1.4
文件 83347 2016-10-05 03:55 libevent-2.1.8-stableChangeLog-2.0
文件 16674 2016-10-05 03:55 libevent-2.1.8-stablecompatsysqueue.h
文件 7333 2017-01-15 17:34 libevent-2.1.8-stablecompile
文件 42938 2017-01-15 17:34 libevent-2.1.8-stableconfig.guess
文件 14360 2017-01-30 01:51 libevent-2.1.8-stableconfig.h.in
文件 35987 2017-01-15 17:34 libevent-2.1.8-stableconfig.sub
文件 537802 2017-01-30 01:51 libevent-2.1.8-stableconfigure
文件 24549 2017-01-30 01:51 libevent-2.1.8-stableconfigure.ac
文件 2766 2016-10-05 03:55 libevent-2.1.8-stabledefer-internal.h
文件 23566 2017-01-15 17:34 libevent-2.1.8-stabledepcomp
文件 7889 2016-10-05 03:55 libevent-2.1.8-stabledevpoll.c
文件 10206 2016-10-05 03:55 libevent-2.1.8-stableDoxyfile
文件 14714 2016-10-05 03:55 libevent-2.1.8-stableepoll.c
文件 41365 2016-10-05 03:55 libevent-2.1.8-stableepolltable-internal.h
............此处省略177个文件信息
/* 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
* Copyright (c) 2008 Damien Miller
*
* 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
#include “evconfig-private.h“
#ifdef _WIN32
#include
#include
#else
#include
#include
#include
#include
#ifdef EVENT__HAVE_SYS_SYSCTL_H
#include
#endif
#endif
#include
#include
#include
#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]
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 42436 2017-01-30 01:51 libevent-2.1.8-stableaclocal.m4
文件 13136 2016-10-05 03:55 libevent-2.1.8-stablearc4random.c
文件 431 2016-11-01 23:34 libevent-2.1.8-stableautogen.sh
文件 82236 2016-12-06 17:00 libevent-2.1.8-stableuffer.c
文件 18486 2016-10-05 03:55 libevent-2.1.8-stableufferevent-internal.h
文件 26105 2016-11-01 23:34 libevent-2.1.8-stableufferevent.c
文件 18179 2016-10-05 03:55 libevent-2.1.8-stableufferevent_async.c
文件 18007 2017-01-30 01:51 libevent-2.1.8-stableufferevent_filter.c
文件 39500 2017-01-22 23:26 libevent-2.1.8-stableufferevent_openssl.c
文件 9834 2016-10-05 03:55 libevent-2.1.8-stableufferevent_pair.c
文件 30215 2016-10-05 03:55 libevent-2.1.8-stableufferevent_ratelim.c
文件 18814 2017-01-22 23:26 libevent-2.1.8-stableufferevent_sock.c
文件 8639 2016-10-05 03:55 libevent-2.1.8-stableuffer_iocp.c
文件 4627 2016-10-05 03:55 libevent-2.1.8-stablechangelist-internal.h
文件 101174 2017-01-30 01:36 libevent-2.1.8-stableChangeLog
文件 17369 2016-10-05 03:55 libevent-2.1.8-stableChangeLog-1.4
文件 83347 2016-10-05 03:55 libevent-2.1.8-stableChangeLog-2.0
文件 16674 2016-10-05 03:55 libevent-2.1.8-stablecompatsysqueue.h
文件 7333 2017-01-15 17:34 libevent-2.1.8-stablecompile
文件 42938 2017-01-15 17:34 libevent-2.1.8-stableconfig.guess
文件 14360 2017-01-30 01:51 libevent-2.1.8-stableconfig.h.in
文件 35987 2017-01-15 17:34 libevent-2.1.8-stableconfig.sub
文件 537802 2017-01-30 01:51 libevent-2.1.8-stableconfigure
文件 24549 2017-01-30 01:51 libevent-2.1.8-stableconfigure.ac
文件 2766 2016-10-05 03:55 libevent-2.1.8-stabledefer-internal.h
文件 23566 2017-01-15 17:34 libevent-2.1.8-stabledepcomp
文件 7889 2016-10-05 03:55 libevent-2.1.8-stabledevpoll.c
文件 10206 2016-10-05 03:55 libevent-2.1.8-stableDoxyfile
文件 14714 2016-10-05 03:55 libevent-2.1.8-stableepoll.c
文件 41365 2016-10-05 03:55 libevent-2.1.8-stableepolltable-internal.h
............此处省略177个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)