From cb946b21422764185b733ec33220ede5cab261f5 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 3 Jan 2010 18:55:19 +0000 Subject: windows build a little bit more --- src/datatypes.h | 2 ++ src/log.c | 38 ++++++++++++++++++++------------------ src/log.h | 38 +++++++++++++++++++------------------- src/log_targets.h | 3 ++- src/options.h | 1 + src/win32/anylike.suo | Bin 13824 -> 17920 bytes src/win32/anylike.vcproj | 20 ++++++++++++++++++-- 7 files changed, 62 insertions(+), 40 deletions(-) diff --git a/src/datatypes.h b/src/datatypes.h index e9ee657..a38c8ef 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -44,6 +44,8 @@ typedef uint64_t u_int64_t; /* typedef int32_t int32_t; */ /* typedef int64_t int64_t; */ #else +#pragma once + typedef signed __int8 int8_t; typedef unsigned __int8 u_int8_t; typedef signed __int16 int16_t; diff --git a/src/log.c b/src/log.c index 43a0a5a..3302782 100644 --- a/src/log.c +++ b/src/log.c @@ -1,36 +1,32 @@ /* - * uAnytun + * anylike * - * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full - * featured implementation uAnytun has no support for multiple connections - * or synchronisation. It is a small single threaded implementation intended - * to act as a client on small platforms. - * The secure anycast tunneling protocol (satp) defines a protocol used - * for communication between any combination of unicast and anycast - * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel - * mode and allows tunneling of every ETHER TYPE protocol (e.g. - * ethernet, ip, arp ...). satp directly includes cryptography and - * message authentication based on the methodes used by SRTP. It is - * intended to deliver a generic, scaleable and secure solution for - * tunneling and relaying of packets of any protocol. + * anylike is an IKEv2 Implementation written in Lua and C. It's main + * design goal is to provide anytun and uanytun or any other SATP + * implementation with a key exchange mechanism but it should also be + * possible to use anylike as key exchange daemon for IPSec security + * associations. The use of Lua guarantees that anylike is easily + * portable to many platforms including very small ones like wireless + * routers. * * - * Copyright (C) 2007-2008 Christian Pointner + * Copyright (C) 2009-2010 Markus Grueneis + * Christian Pointner * - * This file is part of uAnytun. + * This file is part of anylike. * - * uAnytun is free software: you can redistribute it and/or modify + * anylike is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * - * uAnytun is distributed in the hope that it will be useful, + * anylike is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with uAnytun. If not, see . + * along with anylike. If not, see . */ #include "datatypes.h" @@ -40,8 +36,10 @@ #include #include +#ifndef _MSC_VER #define SYSLOG_NAMES #include +#endif #include "log.h" @@ -66,7 +64,9 @@ log_target_type_t log_target_parse_type(const char* conf) if(!conf) return TARGET_UNKNOWN; +#ifndef _MSC_VER if(!strncmp(conf, "syslog", 6)) return TARGET_SYSLOG; +#endif if(!strncmp(conf, "file", 4)) return TARGET_FILE; if(!strncmp(conf, "stdout", 6)) return TARGET_STDOUT; if(!strncmp(conf, "stderr", 6)) return TARGET_STDERR; @@ -96,7 +96,9 @@ int log_targets_add(log_targets_t* targets, const char* conf) log_target_t* new_target = NULL; int duplicates_allowed = 0; switch(log_target_parse_type(conf)) { +#ifndef _MSC_VER case TARGET_SYSLOG: new_target = log_target_syslog_new(); break; +#endif case TARGET_FILE: new_target = log_target_file_new(); duplicates_allowed = 1; break; case TARGET_STDOUT: new_target = log_target_stdout_new(); break; case TARGET_STDERR: new_target = log_target_stderr_new(); break; diff --git a/src/log.h b/src/log.h index 2717622..3c642f4 100644 --- a/src/log.h +++ b/src/log.h @@ -1,36 +1,32 @@ /* - * uAnytun + * anylike * - * uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full - * featured implementation uAnytun has no support for multiple connections - * or synchronisation. It is a small single threaded implementation intended - * to act as a client on small platforms. - * The secure anycast tunneling protocol (satp) defines a protocol used - * for communication between any combination of unicast and anycast - * tunnel endpoints. It has less protocol overhead than IPSec in Tunnel - * mode and allows tunneling of every ETHER TYPE protocol (e.g. - * ethernet, ip, arp ...). satp directly includes cryptography and - * message authentication based on the methodes used by SRTP. It is - * intended to deliver a generic, scaleable and secure solution for - * tunneling and relaying of packets of any protocol. - * + * anylike is an IKEv2 Implementation written in Lua and C. It's main + * design goal is to provide anytun and uanytun or any other SATP + * implementation with a key exchange mechanism but it should also be + * possible to use anylike as key exchange daemon for IPSec security + * associations. The use of Lua guarantees that anylike is easily + * portable to many platforms including very small ones like wireless + * routers. + * * - * Copyright (C) 2007-2008 Christian Pointner + * Copyright (C) 2009-2010 Markus Grueneis + * Christian Pointner * - * This file is part of uAnytun. + * This file is part of anylike. * - * uAnytun is free software: you can redistribute it and/or modify + * anylike is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * - * uAnytun is distributed in the hope that it will be useful, + * anylike is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with uAnytun. If not, see . + * along with anylike. If not, see . */ #ifndef UANYTUN_log_h_INCLUDED @@ -44,7 +40,11 @@ typedef enum log_prio_enum log_prio_t; const char* log_prio_to_string(log_prio_t prio); +#ifndef _MSC_VER enum log_target_type_enum { TARGET_SYSLOG , TARGET_STDOUT, TARGET_STDERR, TARGET_FILE , TARGET_UNKNOWN }; +#else +enum log_target_type_enum { TARGET_STDOUT, TARGET_STDERR, TARGET_FILE , TARGET_UNKNOWN }; +#endif typedef enum log_target_type_enum log_target_type_t; struct log_target_struct { diff --git a/src/log_targets.h b/src/log_targets.h index 8db3812..3dbe421 100644 --- a/src/log_targets.h +++ b/src/log_targets.h @@ -57,6 +57,7 @@ static char* get_time_formatted() return time_string; } +#ifndef _MSC_VER enum syslog_facility_enum { USER = LOG_USER, MAIL = LOG_MAIL, DAEMON = LOG_DAEMON, AUTH = LOG_AUTH, SYSLOG = LOG_SYSLOG, LPR = LOG_LPR, @@ -197,7 +198,7 @@ log_target_t* log_target_syslog_new() return tmp; } - +#endif struct log_target_file_param_struct { char* logfilename_; diff --git a/src/options.h b/src/options.h index 3b2def4..7d1e74d 100644 --- a/src/options.h +++ b/src/options.h @@ -60,6 +60,7 @@ void options_lua_push_string_list(lua_State* L, const int tidx, string_list_t* l void options_lua_push(options_t* opt, lua_State* L); void options_clear(options_t* opt); void options_print_usage(); +void options_print_version(); void options_print(options_t* opt); #endif diff --git a/src/win32/anylike.suo b/src/win32/anylike.suo index e215eb4..384b552 100644 Binary files a/src/win32/anylike.suo and b/src/win32/anylike.suo differ diff --git a/src/win32/anylike.vcproj b/src/win32/anylike.vcproj index 3240d64..6816831 100644 --- a/src/win32/anylike.vcproj +++ b/src/win32/anylike.vcproj @@ -51,7 +51,7 @@ TreatWChar_tAsBuiltInType="false" WarningLevel="3" DebugInformationFormat="4" - CompileAs="1" + CompileAs="2" /> + + + + + +