Cleanups.
This commit is contained in:
parent
8caa1b9d75
commit
ee96ccabbb
19 changed files with 44 additions and 49 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
conf.c -- configuration code
|
||||
Copyright (C) 1998 Emphyrio,
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -18,9 +18,6 @@
|
|||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
/* foute config read code, GPL, emphyrio 1998 */
|
||||
/* Mutilated by me -- Ivo */
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <ctype.h>
|
||||
|
|
@ -49,7 +46,7 @@ typedef struct internal_config_t {
|
|||
These are all the possible configurable values
|
||||
*/
|
||||
static internal_config_t hazahaza[] = {
|
||||
{ "AllowConnect", allowconnect, TYPE_BOOL },
|
||||
{ "AllowConnect", allowconnect, TYPE_BOOL }, /* Is not used anywhere. Remove? */
|
||||
{ "ConnectTo", upstreamip, TYPE_IP },
|
||||
{ "ConnectPort", upstreamport, TYPE_INT },
|
||||
{ "ListenPort", listenport, TYPE_INT },
|
||||
|
|
@ -200,4 +197,3 @@ get_config_val(which_t type)
|
|||
/* Not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
conf.h -- header for conf.c
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
encr.c -- everything that deals with encryption
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -345,7 +345,7 @@ void regenerate_keys(void)
|
|||
cp
|
||||
generate_private_key();
|
||||
calculate_public_key();
|
||||
send_key_changed2();
|
||||
send_key_changed_all();
|
||||
recalculate_encryption_keys();
|
||||
cp
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
encr.h -- header for encr.c
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
genauth.c -- generate a random passphrase
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
17
src/net.c
17
src/net.c
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
net.c -- most of the network code
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -304,21 +304,6 @@ cp
|
|||
return xsend(cl, packet);
|
||||
}
|
||||
|
||||
int send_broadcast(conn_list_t *cl, vpn_packet_t *packet)
|
||||
{
|
||||
conn_list_t *p;
|
||||
cp
|
||||
for(p = cl; p != NULL; p = p->next)
|
||||
if(send_packet(p->real_ip, packet) < 0)
|
||||
{
|
||||
syslog(LOG_ERR, "Could not send a broadcast packet to %08lx (%08lx): %m",
|
||||
p->vpn_ip, p->real_ip);
|
||||
break; /* FIXME: should retry later, and send a ping over the metaconnection. */
|
||||
}
|
||||
cp
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
open the local ethertap device
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
net.h -- header for net.c
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -130,7 +130,6 @@ extern conn_list_t *conn_list;
|
|||
extern conn_list_t *myself;
|
||||
|
||||
extern int send_packet(ip_t, vpn_packet_t *);
|
||||
extern int send_broadcast(conn_list_t *, vpn_packet_t *);
|
||||
extern int setup_network_connections(void);
|
||||
extern void close_network_connections(void);
|
||||
extern void main_loop(void);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
netutl.c -- some supporting network utility code
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
conn_list_t *lookup_conn(ip_t ip)
|
||||
{
|
||||
conn_list_t *p = conn_list;
|
||||
|
||||
cp
|
||||
/* Exact match suggested by James B. MacLean */
|
||||
for(p = conn_list; p != NULL; p = p->next)
|
||||
if(ip == p->vpn_ip)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
netutl.h -- header file for netutl.c
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
protocol.c -- handle the meta-protocol
|
||||
Copyright (C) 1999 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -40,6 +40,8 @@
|
|||
char buffer[MAXBUFSIZE+1];
|
||||
int buflen;
|
||||
|
||||
/* Outgoing request routines */
|
||||
|
||||
int send_ack(conn_list_t *cl)
|
||||
{
|
||||
cp
|
||||
|
|
@ -180,7 +182,7 @@ cp
|
|||
return 0;
|
||||
}
|
||||
|
||||
void send_key_changed2(void)
|
||||
void send_key_changed_all(void)
|
||||
{
|
||||
conn_list_t *p;
|
||||
cp
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
protocol.h -- header for protocol.c
|
||||
Copyright (C) 1999 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -68,7 +68,7 @@ extern int send_basic_info(conn_list_t *);
|
|||
extern int send_termreq(conn_list_t *);
|
||||
extern int send_timeout(conn_list_t *);
|
||||
extern int send_key_request(ip_t);
|
||||
extern void send_key_changed2(void);
|
||||
extern void send_key_changed_all(void);
|
||||
|
||||
#endif /* __TINC_PROTOCOL_H__ */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
tincd.c -- the main file for tincd
|
||||
Copyright (C) 1998,99 Ivo Timmermans <zarq@iname.com>
|
||||
Copyright (C) 1998,1999,2000 Ivo Timmermans <zarq@iname.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -19,6 +19,9 @@
|
|||
|
||||
/*
|
||||
* $Log: tincd.c,v $
|
||||
* Revision 1.8 2000/05/14 12:22:42 guus
|
||||
* Cleanups.
|
||||
*
|
||||
* Revision 1.7 2000/04/27 13:47:51 zarq
|
||||
* Default config file name is tinc.conf, and pidfile is tinc.pid.
|
||||
*
|
||||
|
|
@ -343,7 +346,7 @@ main(int argc, char **argv, char **envp)
|
|||
|
||||
if(show_version)
|
||||
{
|
||||
printf("%s version %s\nCopyright (C) 1998,99 Ivo Timmermans and others,\n"
|
||||
printf("%s version %s\nCopyright (C) 1998,1999,2000 Ivo Timmermans and others,\n"
|
||||
"see the AUTHORS file for a complete list.\n\n"
|
||||
"tinc comes with ABSOLUTELY NO WARRANTY. This is free software,\n"
|
||||
"and you are welcome to redistribute it under certain conditions;\n"
|
||||
|
|
@ -498,4 +501,3 @@ RETSIGTYPE parent_exit(int a)
|
|||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue