along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: edge.c,v 1.1.2.9 2002/03/22 13:31:18 guus Exp $
+ $Id: edge.c,v 1.1.2.10 2002/03/27 15:26:43 guus Exp $
*/
#include "config.h"
{
avl_node_t *node;
edge_t *e;
- char *from_tcp, *from_udp;
- char *to_tcp, *to_udp;
+ char *from_udp, *to_udp;
cp
syslog(LOG_DEBUG, _("Edges:"));
for(node = edge_tree->head; node; node = node->next)
{
e = (edge_t *)node->data;
-// from_tcp = sockaddr2hostname(&e->from.tcpaddress);
from_udp = sockaddr2hostname(&e->from.udpaddress);
-// to_tcp = sockaddr2hostname(&e->to.tcpaddress);
to_udp = sockaddr2hostname(&e->to.udpaddress);
syslog(LOG_DEBUG, _(" %s at %s - %s at %s options %lx weight %d"),
e->from.node->name, from_udp,
e->to.node->name, to_udp,
e->options, e->weight);
-// free(from_tcp);
free(from_udp);
-// free(to_tcp);
free(to_udp);
}
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol.c,v 1.28.4.127 2002/03/23 20:12:29 guus Exp $
+ $Id: protocol.c,v 1.28.4.128 2002/03/27 15:26:43 guus Exp $
*/
#include "config.h"
id_h, metakey_h, challenge_h, chal_reply_h, ack_h,
status_h, error_h, termreq_h,
ping_h, pong_h,
-// add_node_h, del_node_h,
add_subnet_h, del_subnet_h,
add_edge_h, del_edge_h,
key_changed_h, req_key_h, ans_key_h,
"ID", "METAKEY", "CHALLENGE", "CHAL_REPLY", "ACK",
"STATUS", "ERROR", "TERMREQ",
"PING", "PONG",
-// "ADD_NODE", "DEL_NODE",
"ADD_SUBNET", "DEL_SUBNET",
"ADD_EDGE", "DEL_EDGE",
"KEY_CHANGED", "REQ_KEY", "ANS_KEY",
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol_auth.c,v 1.1.4.7 2002/03/23 20:21:10 guus Exp $
+ $Id: protocol_auth.c,v 1.1.4.8 2002/03/27 15:26:44 guus Exp $
*/
#include "config.h"
c->edge = new_edge();
cp
c->edge->from.node = myself;
-// c->edge->from.tcpaddress = str2sockaddr(address, port);
c->edge->from.udpaddress = str2sockaddr(myaddress, myport);
c->edge->to.node = n;
-// c->edge->to.tcpaddress = c->address;
sockaddr2str(&c->address, &hisaddress, &dummy);
c->edge->to.udpaddress = str2sockaddr(hisaddress, hisport);
free(hisaddress);
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol_edge.c,v 1.1.4.6 2002/03/22 13:31:18 guus Exp $
+ $Id: protocol_edge.c,v 1.1.4.7 2002/03/27 15:26:44 guus Exp $
*/
#include "config.h"
char *from_udpaddress, *from_udpport;
char *to_udpaddress, *to_udpport;
cp
-// sockaddr2str(&e->from.tcpaddress, &from_tcpaddress, &from_tcpport);
sockaddr2str(&e->from.udpaddress, &from_udpaddress, &from_udpport);
-// sockaddr2str(&e->to.tcpaddress, &to_tcpaddress, &to_tcpport);
sockaddr2str(&e->to.udpaddress, &to_udpaddress, &to_udpport);
x = send_request(c, "%d %lx %s %s %s %s %s %s %lx %d", ADD_EDGE, random(),
e->from.node->name, from_udpaddress, from_udpport,
e->to.node->name, to_udpaddress, to_udpport,
e->options, e->weight);
-// free(from_tcpaddress);
-// free(from_tcpport);
free(from_udpaddress);
free(from_udpport);
-// free(to_tcpaddress);
-// free(to_tcpport);
free(to_udpaddress);
free(to_udpport);
cp
char from_name[MAX_STRING_SIZE];
char to_name[MAX_STRING_SIZE];
char from_address[MAX_STRING_SIZE];
-// char from_tcpport[MAX_STRING_SIZE];
char from_udpport[MAX_STRING_SIZE];
char to_address[MAX_STRING_SIZE];
-// char to_tcpport[MAX_STRING_SIZE];
char to_udpport[MAX_STRING_SIZE];
sockaddr_t from_udpaddress;
sockaddr_t to_udpaddress;
/* Convert addresses */
-// from_tcpaddress = str2sockaddr(from_address, from_tcpport);
from_udpaddress = str2sockaddr(from_address, from_udpport);
-// to_tcpaddress = str2sockaddr(to_address, to_tcpport);
to_udpaddress = str2sockaddr(to_address, to_udpport);
/* Check if edge already exists */
e = new_edge();
e->from.node = from;
-// e->from.tcpaddress = from_tcpaddress;
e->from.udpaddress = from_udpaddress;
e->to.node = to;
-// e->to.tcpaddress = to_tcpaddress;
e->to.udpaddress = to_udpaddress;
e->options = options;
e->weight = weight;