diff options
Diffstat (limited to 'src/log.c')
-rw-r--r-- | src/log.c | 35 |
1 files changed, 11 insertions, 24 deletions
@@ -1,40 +1,27 @@ /* - * uAnytun + * dropnroll * - * 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. - * + * Copyright (C) 2009-2015 Christian Pointner <equinox@spreadspace.org> * - * Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org> + * This file is part of dropnroll. * - * This file is part of uAnytun. - * - * uAnytun is free software: you can redistribute it and/or modify + * dropnroll 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, + * dropnroll 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 <http://www.gnu.org/licenses/>. + * along with dropnroll. If not, see <http://www.gnu.org/licenses/>. */ #include "datatypes.h" +#include <ctype.h> #include <string.h> #include <stdarg.h> #include <stdlib.h> @@ -84,7 +71,7 @@ int log_targets_target_exists(log_targets_t* targets, log_target_type_t type) if(tmp->type_ == type) return 1; tmp = tmp->next_; - } + } return 0; } @@ -147,7 +134,7 @@ int log_targets_add(log_targets_t* targets, const char* conf) log_target_t* tmp = targets->first_; while(tmp->next_) tmp = tmp->next_; - + tmp->next_ = new_target; } return 0; @@ -246,8 +233,8 @@ void log_print_hex_dump(log_prio_t prio, const u_int8_t* buf, u_int32_t len) int offset = snprintf(msg, MSG_LENGTH_MAX, "dump(%d): ", len); if(offset < 0) return; - u_int8_t* ptr = &msg[offset]; - + char* ptr = &msg[offset]; + for(i=0; i < len; i++) { if(((i+1)*3) >= (MSG_LENGTH_MAX - offset)) break; |