add http client and server codeimplement http workerimplement http rspamc clientremove rspamc protocol supportmigrate webui to http libraryremove controller and move the rest of functions to webuiintegrate webui code into rspamdmove maps code to http-client- move lua_http to http-client
replace jansson with ucl:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if defined(__i386__) | |
# define SYS_io_setup 245 | |
# define SYS_io_destroy 246 | |
# define SYS_io_getevents 247 | |
# define SYS_io_submit 248 | |
# define SYS_io_cancel 249 | |
#elif defined(__x86_64__) | |
# define SYS_io_setup 206 | |
# define SYS_io_destroy 207 | |
# define SYS_io_getevents 208 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct io_event { | |
guint64 data; /* the data field from the iocb */ | |
guint64 obj; /* what iocb this event came from */ | |
gint64 res; /* result code for this event */ | |
gint64 res2; /* secondary result */ | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef enum io_iocb_cmd { | |
IO_CMD_PREAD = 0, | |
IO_CMD_PWRITE = 1, | |
IO_CMD_FSYNC = 2, | |
IO_CMD_FDSYNC = 3, | |
IO_CMD_POLL = 5, | |
IO_CMD_NOOP = 6, | |
} io_iocb_cmd_t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct io_cbdata *cbdata; | |
struct iocb *iocb[1]; | |
iocb[0] = alloca (sizeof (struct iocb)); | |
memset (iocb[0], 0, sizeof (struct iocb)); | |
iocb[0]->aio_fildes = fd; | |
iocb[0]->aio_lio_opcode = IO_CMD_PREAD; | |
iocb[0]->aio_reqprio = 0; | |
iocb[0]->aio_buf = (uint64_t)((uintptr_t)buf); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ng_ipacct/ng_ipacct.c.orig 2006-12-05 23:46:04.000000000 +0300 | |
+++ ng_ipacct/ng_ipacct.c 2013-08-13 16:21:16.000000000 +0400 | |
@@ -140,9 +140,6 @@ | |
struct ipacct_hook { | |
hook_p hook; | |
node_p node; | |
-#if __FreeBSD_version >= 503000 | |
- struct mtx h_mtx; /* protects hook data */ | |
-#endif | |
struct ip_acct_hash *active; /* active database */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: sbin/ipfw/ipfw2.c | |
=================================================================== | |
--- sbin/ipfw/ipfw2.c (revision 254904) | |
+++ sbin/ipfw/ipfw2.c (working copy) | |
@@ -264,6 +264,7 @@ | |
{ "reass", TOK_REASS }, | |
{ "setfib", TOK_SETFIB }, | |
{ "setdscp", TOK_SETDSCP }, | |
+ { "setttl", TOK_SETTTL }, | |
{ "call", TOK_CALL }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local print_octets = function(ip) | |
print('Normal order octets:') | |
for _,o in ipairs(ip:str_octets()) do | |
print(o) | |
end | |
print('Reversed order octets:') | |
for _,o in ipairs(ip:inversed_str_octets()) do | |
print(o) | |
end | |
print('Numeric octets:') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
[ -z "$CLASP_OPTS" ] && CLASP_OPTS="--opt-heu=1 --sat-prepro --restarts=L,128 --heuristic=VSIDS --opt-hierarch=1 --local-restarts --del-max=200000,250 --save-progress=0" | |
[ -z "$CLASP" ] && CLASP="clasp" | |
[ -z "$GRINGO_OPTS" ] && GRINGO_OPTS="/usr/local/share/aspcud/misc2012.lp" | |
[ -z "$GRINGO" ] && GRINGO="gringo" | |
[ -z "$CUDF2LP_OPTS" ] && CUDF2LP_OPTS="" | |
[ -z "$CUDF2LP" ] && CUDF2LP="cudf2lp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <limits.h> | |
int f(int x) | |
{ | |
int y = x >> 31; | |
return (x ^ y) - y; | |
} | |
OlderNewer