#!/bin/bash
-make install || exit
-ipsec start --nofork &
+CMD=`tempfile`
+LOG="debug.log"
+ipsec start --nofork 2>&1 > $LOG &
sleep 1
-gdb /usr/local/libexec/ipsec/charon `cat /var/run/charon.pid`
+echo >> $LOG
+echo >> $LOG
+echo >> $LOG
+echo "c" > $CMD
+gdb -batch /usr/local/libexec/ipsec/charon `cat /var/run/charon.pid ` -x $CMD 2>&1 >> $LOG
ipsec stop
+rm $CMD
/**
* Implements packet_t.clone.
*/
-static packet_t *clone(private_packet_t *this)
+static packet_t *clone_(private_packet_t *this)
{
private_packet_t *other = (private_packet_t*)packet_create();
this->public.get_source = (host_t*(*) (packet_t *)) get_source;
this->public.set_destination = (void(*) (packet_t *,host_t*)) set_destination;
this->public.get_destination = (host_t*(*) (packet_t *)) get_destination;
- this->public.clone = (packet_t*(*) (packet_t *))clone;
+ this->public.clone = (packet_t*(*) (packet_t *))clone_;
this->public.destroy = (void(*) (packet_t *)) destroy;
this->destination = NULL;
/**
* Implementation of ike_sa_id_t.clone.
*/
-static ike_sa_id_t* clone(private_ike_sa_id_t *this)
+static ike_sa_id_t* clone_(private_ike_sa_id_t *this)
{
return ike_sa_id_create(this->initiator_spi, this->responder_spi, this->is_initiator_flag);
}
this->public.replace_values = (void(*)(ike_sa_id_t*,ike_sa_id_t*)) replace_values;
this->public.is_initiator = (bool(*)(ike_sa_id_t*)) is_initiator;
this->public.switch_initiator = (bool(*)(ike_sa_id_t*)) switch_initiator;
- this->public.clone = (ike_sa_id_t*(*)(ike_sa_id_t*)) clone;
+ this->public.clone = (ike_sa_id_t*(*)(ike_sa_id_t*)) clone_;
this->public.destroy = (void(*)(ike_sa_id_t*))destroy;
/* private data */
/**
* Implements host_t.clone.
*/
-static private_host_t *clone(private_host_t *this)
+static private_host_t *clone_(private_host_t *this)
{
private_host_t *new = malloc_thing(private_host_t);
this->public.get_sockaddr = (sockaddr_t* (*) (host_t*))get_sockaddr;
this->public.get_sockaddr_len = (socklen_t*(*) (host_t*))get_sockaddr_len;
- this->public.clone = (host_t* (*) (host_t*))clone;
+ this->public.clone = (host_t* (*) (host_t*))clone_;
this->public.get_family = (int (*) (host_t*))get_family;
this->public.get_address = (chunk_t (*) (host_t *)) get_address;
this->public.get_port = (u_int16_t (*) (host_t *))get_port;
/**
* Implementation of identification_t.clone.
*/
-static identification_t *clone(private_identification_t *this)
+static identification_t *clone_(private_identification_t *this)
{
private_identification_t *clone = identification_create();
this->public.get_encoding = (chunk_t (*) (identification_t*))get_encoding;
this->public.get_type = (id_type_t (*) (identification_t*))get_type;
this->public.contains_wildcards = (bool (*) (identification_t *this))contains_wildcards;
- this->public.clone = (identification_t* (*) (identification_t*))clone;
+ this->public.clone = (identification_t* (*) (identification_t*))clone_;
this->public.destroy = (void (*) (identification_t*))destroy;
/* we use these as defaults, the may be overloaded for special ID types */
this->public.equals = (bool (*) (identification_t*,identification_t*))equals_binary;