src/arm/gnunet-arm.c
src/arm/gnunet-service-arm.c
src/arm/mockup-service.c
-src/ats-tests/ats-testing-experiment.c
-src/ats-tests/ats-testing-log.c
-src/ats-tests/ats-testing-preferences.c
-src/ats-tests/ats-testing-traffic.c
-src/ats-tests/ats-testing.c
-src/ats-tests/gnunet-ats-sim.c
-src/ats-tests/gnunet-solver-eval.c
-src/ats-tool/gnunet-ats.c
src/ats/ats_api2_application.c
src/ats/ats_api2_transport.c
src/ats/ats_api_connectivity.c
src/ats/ats_api_scanner.c
src/ats/ats_api_scheduling.c
src/ats/gnunet-ats-solver-eval.c
-src/ats/gnunet-service-ats-new.c
-src/ats/gnunet-service-ats.c
src/ats/gnunet-service-ats_addresses.c
+src/ats/gnunet-service-ats.c
src/ats/gnunet-service-ats_connectivity.c
+src/ats/gnunet-service-ats-new.c
src/ats/gnunet-service-ats_normalization.c
src/ats/gnunet-service-ats_performance.c
src/ats/gnunet-service-ats_plugins.c
src/ats/plugin_ats_mlp.c
src/ats/plugin_ats_proportional.c
src/ats/plugin_ats_ril.c
+src/ats-tests/ats-testing.c
+src/ats-tests/ats-testing-experiment.c
+src/ats-tests/ats-testing-log.c
+src/ats-tests/ats-testing-preferences.c
+src/ats-tests/ats-testing-traffic.c
+src/ats-tests/gnunet-ats-sim.c
+src/ats-tests/gnunet-solver-eval.c
+src/ats-tool/gnunet-ats.c
src/auction/gnunet-auction-create.c
src/auction/gnunet-auction-info.c
src/auction/gnunet-auction-join.c
src/cadet/cadet_api_list_tunnels.c
src/cadet/cadet_test_lib.c
src/cadet/desirability_table.c
-src/cadet/gnunet-cadet-profiler.c
src/cadet/gnunet-cadet.c
+src/cadet/gnunet-cadet-profiler.c
src/cadet/gnunet-service-cadet.c
src/cadet/gnunet-service-cadet_channel.c
src/cadet/gnunet-service-cadet_connection.c
src/consensus/plugin_block_consensus.c
src/conversation/conversation_api.c
src/conversation/conversation_api_call.c
-src/conversation/gnunet-conversation-test.c
src/conversation/gnunet-conversation.c
-src/conversation/gnunet-helper-audio-playback-gst.c
+src/conversation/gnunet-conversation-test.c
+src/conversation/gnunet_gst.c
+src/conversation/gnunet_gst_test.c
src/conversation/gnunet-helper-audio-playback.c
-src/conversation/gnunet-helper-audio-record-gst.c
+src/conversation/gnunet-helper-audio-playback-gst.c
src/conversation/gnunet-helper-audio-record.c
+src/conversation/gnunet-helper-audio-record-gst.c
src/conversation/gnunet-service-conversation.c
-src/conversation/gnunet_gst.c
-src/conversation/gnunet_gst_test.c
src/conversation/microphone.c
src/conversation/plugin_gnsrecord_conversation.c
src/conversation/speaker.c
src/dht/dht_test_lib.c
src/dht/gnunet-dht-get.c
src/dht/gnunet-dht-monitor.c
+src/dht/gnunet_dht_profiler.c
src/dht/gnunet-dht-put.c
src/dht/gnunet-service-dht.c
src/dht/gnunet-service-dht_clients.c
src/dht/gnunet-service-dht_neighbours.c
src/dht/gnunet-service-dht_nse.c
src/dht/gnunet-service-dht_routing.c
-src/dht/gnunet_dht_profiler.c
src/dht/plugin_block_dht.c
src/dns/dns_api.c
src/dns/gnunet-dns-monitor.c
src/dns/gnunet-zonewalk.c
src/dns/plugin_block_dns.c
src/exit/gnunet-daemon-exit.c
-src/exit/gnunet-helper-exit-windows.c
src/exit/gnunet-helper-exit.c
+src/exit/gnunet-helper-exit-windows.c
src/fragmentation/defragmentation.c
src/fragmentation/fragmentation.c
src/fs/fs_api.c
src/fs/gnunet-daemon-fsprofiler.c
src/fs/gnunet-directory.c
src/fs/gnunet-download.c
-src/fs/gnunet-fs-profiler.c
src/fs/gnunet-fs.c
+src/fs/gnunet-fs-profiler.c
src/fs/gnunet-helper-fs-publish.c
src/fs/gnunet-publish.c
src/fs/gnunet-search.c
src/gns/gnunet-bcd.c
src/gns/gnunet-dns2gns.c
src/gns/gnunet-gns-benchmark.c
+src/gns/gnunet-gns.c
src/gns/gnunet-gns-helper-service-w32.c
src/gns/gnunet-gns-import.c
src/gns/gnunet-gns-proxy.c
-src/gns/gnunet-gns.c
src/gns/gnunet-service-gns.c
src/gns/gnunet-service-gns_interceptor.c
src/gns/gnunet-service-gns_resolver.c
src/gns/plugin_block_gns.c
src/gns/plugin_gnsrecord_gns.c
src/gns/plugin_rest_gns.c
-src/gns/w32nsp-install.c
-src/gns/w32nsp-resolve.c
-src/gns/w32nsp-uninstall.c
-src/gns/w32nsp.c
src/gnsrecord/gnsrecord.c
src/gnsrecord/gnsrecord_crypto.c
src/gnsrecord/gnsrecord_misc.c
src/gnsrecord/gnsrecord_serialization.c
src/gnsrecord/plugin_gnsrecord_dns.c
+src/gns/w32nsp.c
+src/gns/w32nsp-install.c
+src/gns/w32nsp-resolve.c
+src/gns/w32nsp-uninstall.c
src/hello/address.c
src/hello/gnunet-hello.c
-src/hello/hello-ng.c
src/hello/hello.c
+src/hello/hello-ng.c
src/hostlist/gnunet-daemon-hostlist.c
src/hostlist/gnunet-daemon-hostlist_client.c
src/hostlist/gnunet-daemon-hostlist_server.c
src/namecache/plugin_namecache_flat.c
src/namecache/plugin_namecache_postgres.c
src/namecache/plugin_namecache_sqlite.c
-src/namestore/gnunet-namestore-fcfsd.c
src/namestore/gnunet-namestore.c
+src/namestore/gnunet-namestore-fcfsd.c
src/namestore/gnunet-service-namestore.c
src/namestore/gnunet-zoneimport.c
src/namestore/namestore_api.c
src/nat-auto/gnunet-service-nat-auto_legacy.c
src/nat-auto/nat_auto_api.c
src/nat-auto/nat_auto_api_test.c
-src/nat/gnunet-helper-nat-client-windows.c
src/nat/gnunet-helper-nat-client.c
-src/nat/gnunet-helper-nat-server-windows.c
+src/nat/gnunet-helper-nat-client-windows.c
src/nat/gnunet-helper-nat-server.c
+src/nat/gnunet-helper-nat-server-windows.c
src/nat/gnunet-nat.c
src/nat/gnunet-service-nat.c
src/nat/gnunet-service-nat_externalip.c
src/nat/gnunet-service-nat_stun.c
src/nat/nat_api.c
src/nat/nat_api_stun.c
-src/nse/gnunet-nse-profiler.c
src/nse/gnunet-nse.c
+src/nse/gnunet-nse-profiler.c
src/nse/gnunet-service-nse.c
src/nse/nse_api.c
src/nt/nt.c
-src/peerinfo-tool/gnunet-peerinfo.c
-src/peerinfo-tool/gnunet-peerinfo_plugins.c
-src/peerinfo-tool/plugin_rest_peerinfo.c
src/peerinfo/gnunet-service-peerinfo.c
src/peerinfo/peerinfo_api.c
src/peerinfo/peerinfo_api_notify.c
+src/peerinfo-tool/gnunet-peerinfo.c
+src/peerinfo-tool/gnunet-peerinfo_plugins.c
+src/peerinfo-tool/plugin_rest_peerinfo.c
src/peerstore/gnunet-peerstore.c
src/peerstore/gnunet-service-peerstore.c
src/peerstore/peerstore_api.c
src/revocation/gnunet-service-revocation.c
src/revocation/plugin_block_revocation.c
src/revocation/revocation_api.c
-src/rps/gnunet-rps-profiler.c
src/rps/gnunet-rps.c
+src/rps/gnunet-rps-profiler.c
src/rps/gnunet-service-rps.c
src/rps/gnunet-service-rps_custommap.c
src/rps/gnunet-service-rps_sampler.c
src/rps/gnunet-service-rps_sampler_elem.c
src/rps/gnunet-service-rps_view.c
+src/rps/rps_api.c
src/rps/rps-sampler_client.c
src/rps/rps-sampler_common.c
src/rps/rps-test_util.c
-src/rps/rps_api.c
src/scalarproduct/gnunet-scalarproduct.c
-src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
-src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
src/scalarproduct/gnunet-service-scalarproduct_alice.c
src/scalarproduct/gnunet-service-scalarproduct_bob.c
+src/scalarproduct/gnunet-service-scalarproduct-ecc_alice.c
+src/scalarproduct/gnunet-service-scalarproduct-ecc_bob.c
src/scalarproduct/scalarproduct_api.c
src/secretsharing/gnunet-secretsharing-profiler.c
src/secretsharing/gnunet-service-secretsharing.c
src/statistics/statistics_api.c
src/template/gnunet-service-template.c
src/template/gnunet-template.c
-src/testbed-logger/gnunet-service-testbed-logger.c
-src/testbed-logger/testbed_logger_api.c
src/testbed/generate-underlay-topology.c
src/testbed/gnunet-daemon-latency-logger.c
src/testbed/gnunet-daemon-testbed-blacklist.c
src/testbed/gnunet-daemon-testbed-underlay.c
src/testbed/gnunet-helper-testbed.c
+src/testbed/gnunet_mpi_test.c
src/testbed/gnunet-service-test-barriers.c
-src/testbed/gnunet-service-testbed.c
src/testbed/gnunet-service-testbed_barriers.c
+src/testbed/gnunet-service-testbed.c
src/testbed/gnunet-service-testbed_cache.c
src/testbed/gnunet-service-testbed_connectionpool.c
src/testbed/gnunet-service-testbed_cpustatus.c
src/testbed/gnunet-service-testbed_meminfo.c
src/testbed/gnunet-service-testbed_oc.c
src/testbed/gnunet-service-testbed_peers.c
-src/testbed/gnunet-testbed-profiler.c
-src/testbed/gnunet_mpi_test.c
src/testbed/gnunet_testbed_mpi_spawn.c
-src/testbed/testbed_api.c
+src/testbed/gnunet-testbed-profiler.c
+src/testbed-logger/gnunet-service-testbed-logger.c
+src/testbed-logger/testbed_logger_api.c
src/testbed/testbed_api_barriers.c
+src/testbed/testbed_api.c
src/testbed/testbed_api_hosts.c
src/testbed/testbed_api_operations.c
src/testbed/testbed_api_peers.c
src/testbed/testbed_api_sd.c
src/testbed/testbed_api_services.c
src/testbed/testbed_api_statistics.c
-src/testbed/testbed_api_test.c
src/testbed/testbed_api_testbed.c
+src/testbed/testbed_api_test.c
src/testbed/testbed_api_topology.c
src/testbed/testbed_api_underlay.c
src/testing/gnunet-testing.c
src/transport/gnunet-communicator-udp.c
src/transport/gnunet-communicator-unix.c
src/transport/gnunet-helper-transport-bluetooth.c
-src/transport/gnunet-helper-transport-wlan-dummy.c
src/transport/gnunet-helper-transport-wlan.c
+src/transport/gnunet-helper-transport-wlan-dummy.c
src/transport/gnunet-service-tng.c
-src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_ats.c
+src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_hello.c
src/transport/gnunet-service-transport_manipulation.c
src/transport/gnunet-service-transport_neighbours.c
src/transport/gnunet-service-transport_plugins.c
src/transport/gnunet-service-transport_validation.c
+src/transport/gnunet-transport.c
src/transport/gnunet-transport-certificate-creation.c
src/transport/gnunet-transport-profiler.c
src/transport/gnunet-transport-wlan-receiver.c
src/transport/gnunet-transport-wlan-sender.c
-src/transport/gnunet-transport.c
src/transport/plugin_transport_http_client.c
src/transport/plugin_transport_http_common.c
src/transport/plugin_transport_http_server.c
src/transport/plugin_transport_smtp.c
src/transport/plugin_transport_tcp.c
src/transport/plugin_transport_template.c
-src/transport/plugin_transport_udp.c
src/transport/plugin_transport_udp_broadcasting.c
+src/transport/plugin_transport_udp.c
src/transport/plugin_transport_unix.c
src/transport/plugin_transport_wlan.c
src/transport/tcp_connection_legacy.c
src/transport/tcp_server_legacy.c
src/transport/tcp_server_mst_legacy.c
src/transport/tcp_service_legacy.c
-src/transport/transport-testing-filenames.c
-src/transport/transport-testing-loggers.c
-src/transport/transport-testing-main.c
-src/transport/transport-testing-send.c
-src/transport/transport-testing.c
-src/transport/transport-testing2.c
src/transport/transport_api2_application.c
src/transport/transport_api2_communication.c
src/transport/transport_api2_core.c
src/transport/transport_api_monitor_peers.c
src/transport/transport_api_monitor_plugins.c
src/transport/transport_api_offer_hello.c
+src/transport/transport-testing2.c
+src/transport/transport-testing.c
+src/transport/transport-testing-filenames.c
+src/transport/transport-testing-loggers.c
+src/transport/transport-testing-main.c
+src/transport/transport-testing-send.c
src/util/bandwidth.c
src/util/benchmark.c
src/util/bio.c
src/util/container_bloomfilter.c
src/util/container_heap.c
src/util/container_meta_data.c
-src/util/container_multihashmap.c
src/util/container_multihashmap32.c
+src/util/container_multihashmap.c
src/util/container_multipeermap.c
src/util/container_multishortmap.c
src/util/crypto_abe.c
src/util/dnsstub.c
src/util/getopt.c
src/util/getopt_helpers.c
-src/util/gnunet-config-diff.c
src/util/gnunet-config.c
+src/util/gnunet-config-diff.c
src/util/gnunet-ecc.c
src/util/gnunet-helper-w32-console.c
src/util/gnunet-qr.c
src/util/gnunet-resolver.c
src/util/gnunet-scrypt.c
src/util/gnunet-service-resolver.c
-src/util/gnunet-timeout-w32.c
src/util/gnunet-timeout.c
+src/util/gnunet-timeout-w32.c
src/util/gnunet-uri.c
src/util/helper.c
src/util/load.c
src/util/w32cat.c
src/util/win.c
src/util/winproc.c
-src/vpn/gnunet-helper-vpn-windows.c
src/vpn/gnunet-helper-vpn.c
+src/vpn/gnunet-helper-vpn-windows.c
src/vpn/gnunet-service-vpn.c
src/vpn/gnunet-vpn.c
src/vpn/vpn_api.c
-src/zonemaster/gnunet-service-zonemaster-monitor.c
src/zonemaster/gnunet-service-zonemaster.c
+src/zonemaster/gnunet-service-zonemaster-monitor.c
src/fs/fs_api.h
src/include/compat.h
src/include/gnunet_common.h
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
GNUNET_assert (NULL != phone_rdc);
GNUNET_snprintf (buf, sizeof (buf), "phone-%u", i++);
phone_rdc (phone_rdc_cls, strlen (buf) + 1, buf);
- phone_task = GNUNET_SCHEDULER_add_delayed (FREQ,
- &phone_send, NULL);
+ phone_task = GNUNET_SCHEDULER_add_delayed (FREQ, &phone_send, NULL);
}
GNUNET_assert (NULL != call_rdc);
GNUNET_snprintf (buf, sizeof (buf), "call-%u", i++);
call_rdc (call_rdc_cls, strlen (buf) + 1, buf);
- call_task = GNUNET_SCHEDULER_add_delayed (FREQ,
- &call_send, NULL);
+ call_task = GNUNET_SCHEDULER_add_delayed (FREQ, &call_send, NULL);
}
{
const char *origin = cls;
- fprintf (stderr,
- "Speaker %s enabled\n",
- origin);
+ fprintf (stderr, "Speaker %s enabled\n", origin);
return GNUNET_OK;
}
{
const char *origin = cls;
- fprintf (stderr,
- "Speaker %s disabled\n",
- origin);
+ fprintf (stderr, "Speaker %s disabled\n", origin);
}
static void
-play (void *cls,
- size_t data_size,
- const void *data)
+play (void *cls, size_t data_size, const void *data)
{
const char *origin = cls;
static unsigned int phone_i = 1;
char buf[32];
if (0 == strcmp (origin, "phone"))
- GNUNET_snprintf (buf,
- sizeof (buf),
- "call-%u",
- call_i++);
+ GNUNET_snprintf (buf, sizeof (buf), "call-%u", call_i++);
else
- GNUNET_snprintf (buf,
- sizeof (buf),
- "phone-%u",
- phone_i++);
- if ( (data_size != strlen (buf) + 1) ||
- (0 != strncmp (buf, data, data_size)) )
+ GNUNET_snprintf (buf, sizeof (buf), "phone-%u", phone_i++);
+ if ((data_size != strlen (buf) + 1) || (0 != strncmp (buf, data, data_size)))
{
fprintf (stderr,
"Expected %s, received %.*s\n",
{
fprintf (stderr, ".");
}
- if ( (20 < call_i) &&
- (20 < phone_i) &&
- (NULL != call) )
+ if ((20 < call_i) && (20 < phone_i) && (NULL != call))
{
/* time to hang up ... */
GNUNET_CONVERSATION_call_stop (call);
}
-static struct GNUNET_SPEAKER_Handle call_speaker = {
- &enable_speaker,
- &play,
- &disable_speaker,
- &destroy_speaker,
- "caller"
-};
+static struct GNUNET_SPEAKER_Handle call_speaker = {&enable_speaker,
+ &play,
+ &disable_speaker,
+ &destroy_speaker,
+ "caller"};
-static struct GNUNET_SPEAKER_Handle phone_speaker = {
- &enable_speaker,
- &play,
- &disable_speaker,
- &destroy_speaker,
- "phone"
-};
+static struct GNUNET_SPEAKER_Handle phone_speaker = {&enable_speaker,
+ &play,
+ &disable_speaker,
+ &destroy_speaker,
+ "phone"};
static int
{
const char *origin = cls;
- fprintf (stderr,
- "Mic %s enabled\n",
- origin);
+ fprintf (stderr, "Mic %s enabled\n", origin);
if (0 == strcmp (origin, "phone"))
{
phone_rdc = rdc;
{
const char *origin = cls;
- fprintf (stderr,
- "Mic %s disabled\n",
- origin);
+ fprintf (stderr, "Mic %s disabled\n", origin);
if (0 == strcmp (origin, "phone"))
{
phone_rdc = NULL;
{
const char *origin = cls;
- fprintf (stderr,
- "Mic %s destroyed\n",
- origin);
+ fprintf (stderr, "Mic %s destroyed\n", origin);
}
-static struct GNUNET_MICROPHONE_Handle call_mic = {
- &enable_mic,
- &disable_mic,
- &destroy_mic,
- "caller"
-};
+static struct GNUNET_MICROPHONE_Handle call_mic = {&enable_mic,
+ &disable_mic,
+ &destroy_mic,
+ "caller"};
-static struct GNUNET_MICROPHONE_Handle phone_mic = {
- &enable_mic,
- &disable_mic,
- &destroy_mic,
- "phone"
-};
+static struct GNUNET_MICROPHONE_Handle phone_mic = {&enable_mic,
+ &disable_mic,
+ &destroy_mic,
+ "phone"};
/**
static void
-caller_event_handler (void *cls,
- enum GNUNET_CONVERSATION_CallerEventCode code)
+caller_event_handler (void *cls, enum GNUNET_CONVERSATION_CallerEventCode code)
{
(void) cls;
switch (code)
{
case GNUNET_CONVERSATION_EC_CALLER_SUSPEND:
case GNUNET_CONVERSATION_EC_CALLER_RESUME:
- fprintf (stderr,
- "Unexpected caller code: %d\n",
- code);
+ fprintf (stderr, "Unexpected caller code: %d\n", code);
break;
}
}
struct GNUNET_CONVERSATION_Caller *caller,
const struct GNUNET_CRYPTO_EcdsaPublicKey *caller_id)
{
- static enum GNUNET_CONVERSATION_PhoneEventCode expect
- = GNUNET_CONVERSATION_EC_PHONE_RING;
+ static enum GNUNET_CONVERSATION_PhoneEventCode expect =
+ GNUNET_CONVERSATION_EC_PHONE_RING;
(void) cls;
(void) caller_id;
GNUNET_SCHEDULER_shutdown ();
break;
default:
- fprintf (stderr,
- "Unexpected phone code: %d\n",
- code);
+ fprintf (stderr, "Unexpected phone code: %d\n", code);
break;
}
}
static void
-call_event_handler (void *cls,
- enum GNUNET_CONVERSATION_CallEventCode code)
+call_event_handler (void *cls, enum GNUNET_CONVERSATION_CallEventCode code)
{
- static enum GNUNET_CONVERSATION_CallEventCode expect
- = GNUNET_CONVERSATION_EC_CALL_RINGING;
+ static enum GNUNET_CONVERSATION_CallEventCode expect =
+ GNUNET_CONVERSATION_EC_CALL_RINGING;
(void) cls;
GNUNET_break (code == expect);
static void
caller_ego_create_cont (void *cls,
+ const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk,
const char *emsg)
{
(void) cls;
static void
-namestore_put_cont (void *cls,
- int32_t success,
- const char *emsg)
+namestore_put_cont (void *cls, int32_t success, const char *emsg)
{
(void) cls;
qe = NULL;
GNUNET_assert (GNUNET_YES == success);
GNUNET_assert (NULL == emsg);
GNUNET_assert (NULL == op);
- op = GNUNET_IDENTITY_create (id,
- "caller-ego",
- &caller_ego_create_cont,
- NULL);
+ op = GNUNET_IDENTITY_create (id, "caller-ego", &caller_ego_create_cont, NULL);
}
GNUNET_asprintf (&gns_name,
"phone.%s",
GNUNET_GNSRECORD_pkey_to_zkey (&pub));
- phone = GNUNET_CONVERSATION_phone_create (cfg,
- ego,
- &phone_event_handler,
- NULL);
+ phone =
+ GNUNET_CONVERSATION_phone_create (cfg, ego, &phone_event_handler, NULL);
GNUNET_assert (NULL != phone);
memset (&rd, 0, sizeof (rd));
- GNUNET_CONVERSATION_phone_get_record (phone,
- &rd);
+ GNUNET_CONVERSATION_phone_get_record (phone, &rd);
GNUNET_assert (rd.record_type == GNUNET_GNSRECORD_TYPE_PHONE);
rd.expiration_time = UINT64_MAX;
- qe = GNUNET_NAMESTORE_records_store (ns,
- GNUNET_IDENTITY_ego_get_private_key (ego),
- "phone" /* GNS label */,
- 1,
- &rd,
- &namestore_put_cont,
- NULL);
+ qe =
+ GNUNET_NAMESTORE_records_store (ns,
+ GNUNET_IDENTITY_ego_get_private_key (ego),
+ "phone" /* GNS label */,
+ 1,
+ &rd,
+ &namestore_put_cont,
+ NULL);
return;
}
if (0 == strcmp (name, "caller-ego"))
static void
-phone_ego_create_cont (void *cls,
- const char *emsg)
+phone_ego_create_cont (void *cls, const char *emsg)
{
(void) cls;
op = NULL;
(void) cls;
(void) peer;
cfg = c;
- GNUNET_SCHEDULER_add_delayed (TIMEOUT,
- &end_test,
- NULL);
- id = GNUNET_IDENTITY_connect (cfg,
- &identity_cb,
- NULL);
- op = GNUNET_IDENTITY_create (id,
- "phone-ego",
- &phone_ego_create_cont,
- NULL);
+ GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL);
+ id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL);
+ op = GNUNET_IDENTITY_create (id, "phone-ego", &phone_ego_create_cont, NULL);
ns = GNUNET_NAMESTORE_connect (cfg);
}
int
-main (int argc,
- char *argv[])
+main (int argc, char *argv[])
{
(void) argc;
(void) argv;
if (0 != GNUNET_TESTING_peer_run ("test_conversation_api",
- "test_conversation.conf",
- &run,
- NULL))
+ "test_conversation.conf",
+ &run,
+ NULL))
return 1;
return ok;
}
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
static void
-play (void *cls,
- size_t data_size,
- const void *data)
+play (void *cls, size_t data_size, const void *data)
{
(void) cls;
(void) data_size;
}
-static struct GNUNET_SPEAKER_Handle call_speaker = {
- &enable_speaker,
- &play,
- &disable_speaker,
- &destroy_speaker,
- "caller"
-};
+static struct GNUNET_SPEAKER_Handle call_speaker = {&enable_speaker,
+ &play,
+ &disable_speaker,
+ &destroy_speaker,
+ "caller"};
static int
}
-static struct GNUNET_MICROPHONE_Handle call_mic = {
- &enable_mic,
- &disable_mic,
- &destroy_mic,
- "caller"
-};
+static struct GNUNET_MICROPHONE_Handle call_mic = {&enable_mic,
+ &disable_mic,
+ &destroy_mic,
+ "caller"};
/**
}
if (NULL != phone)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Disconnecting from PHONE service.\n");
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from PHONE service.\n");
GNUNET_CONVERSATION_phone_destroy (phone);
phone = NULL;
}
struct GNUNET_CONVERSATION_Caller *caller,
const struct GNUNET_CRYPTO_EcdsaPublicKey *caller_id)
{
- static enum GNUNET_CONVERSATION_PhoneEventCode expect
- = GNUNET_CONVERSATION_EC_PHONE_RING;
+ static enum GNUNET_CONVERSATION_PhoneEventCode expect =
+ GNUNET_CONVERSATION_EC_PHONE_RING;
(void) cls;
(void) caller_id;
static void
-call_event_handler (void *cls,
- enum GNUNET_CONVERSATION_CallEventCode code)
+call_event_handler (void *cls, enum GNUNET_CONVERSATION_CallEventCode code)
{
- static enum GNUNET_CONVERSATION_CallEventCode expect
- = GNUNET_CONVERSATION_EC_CALL_RINGING;
+ static enum GNUNET_CONVERSATION_CallEventCode expect =
+ GNUNET_CONVERSATION_EC_CALL_RINGING;
(void) cls;
GNUNET_break (code == expect);
static void
caller_ego_create_cont (void *cls,
+ const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk,
const char *emsg)
{
(void) cls;
static void
-namestore_put_cont (void *cls,
- int32_t success,
- const char *emsg)
+namestore_put_cont (void *cls, int32_t success, const char *emsg)
{
(void) cls;
qe = NULL;
GNUNET_assert (GNUNET_YES == success);
GNUNET_assert (NULL == emsg);
GNUNET_assert (NULL == op);
- op = GNUNET_IDENTITY_create (id,
- "caller-ego",
- &caller_ego_create_cont,
- NULL);
+ op = GNUNET_IDENTITY_create (id, "caller-ego", &caller_ego_create_cont, NULL);
}
GNUNET_asprintf (&gns_name,
"phone.%s",
GNUNET_GNSRECORD_pkey_to_zkey (&pub));
- phone = GNUNET_CONVERSATION_phone_create (cfg,
- ego,
- &phone_event_handler,
- NULL);
+ phone =
+ GNUNET_CONVERSATION_phone_create (cfg, ego, &phone_event_handler, NULL);
GNUNET_assert (NULL != phone);
memset (&rd, 0, sizeof (rd));
- GNUNET_CONVERSATION_phone_get_record (phone,
- &rd);
+ GNUNET_CONVERSATION_phone_get_record (phone, &rd);
GNUNET_assert (rd.record_type == GNUNET_GNSRECORD_TYPE_PHONE);
rd.expiration_time = UINT64_MAX;
- qe = GNUNET_NAMESTORE_records_store (ns,
- GNUNET_IDENTITY_ego_get_private_key (ego),
- "phone" /* GNS label */,
- 1,
- &rd,
- &namestore_put_cont,
- NULL);
+ qe =
+ GNUNET_NAMESTORE_records_store (ns,
+ GNUNET_IDENTITY_ego_get_private_key (ego),
+ "phone" /* GNS label */,
+ 1,
+ &rd,
+ &namestore_put_cont,
+ NULL);
return;
}
if (0 == strcmp (name, "caller-ego"))
static void
-phone_ego_create_cont (void *cls,
- const char *emsg)
+phone_ego_create_cont (void *cls, const char *emsg)
{
(void) cls;
op = NULL;
(void) cls;
(void) peer;
cfg = c;
- GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test,
- NULL);
- id = GNUNET_IDENTITY_connect (cfg,
- &identity_cb,
- NULL);
- op = GNUNET_IDENTITY_create (id,
- "phone-ego",
- &phone_ego_create_cont,
- NULL);
+ GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL);
+ id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL);
+ op = GNUNET_IDENTITY_create (id, "phone-ego", &phone_ego_create_cont, NULL);
ns = GNUNET_NAMESTORE_connect (cfg);
}
(void) argc;
(void) argv;
if (0 != GNUNET_TESTING_peer_run ("test_conversation_api",
- "test_conversation.conf",
- &run, NULL))
+ "test_conversation.conf",
+ &run,
+ NULL))
return 1;
return ok;
}
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-
+
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 25)
-#define LOG(kind,...) \
- GNUNET_log (kind, __VA_ARGS__)
+#define LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__)
-#define LOG_DEBUG(...) \
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__)
+#define LOG_DEBUG(...) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, __VA_ARGS__)
static const struct GNUNET_CONFIGURATION_Handle *cfg;
#define CALLER2 &caller2
#define PHONE0 &phone0
-#define CLS_STR(caller) (*((char **)caller))
+#define CLS_STR(caller) (*((char **) caller))
/**
void *rdc_cls;
- struct GNUNET_SCHEDULER_Task * call_task;
-
+ struct GNUNET_SCHEDULER_Task *call_task;
};
static struct MicContext call1_mic_ctx;
(void) cls;
GNUNET_assert (NULL != phone_rdc);
GNUNET_snprintf (buf, sizeof (buf), "phone");
- phone_rdc (phone_rdc_cls,
- strlen (buf) + 1,
- buf);
- phone_task = GNUNET_SCHEDULER_add_delayed (FREQ,
- &phone_send,
- NULL);
+ phone_rdc (phone_rdc_cls, strlen (buf) + 1, buf);
+ phone_task = GNUNET_SCHEDULER_add_delayed (FREQ, &phone_send, NULL);
}
(void) cls;
GNUNET_assert (NULL != mc->rdc);
- GNUNET_snprintf (buf,
- sizeof (buf),
- "call");
- mc->rdc (mc->rdc_cls,
- strlen (buf) + 1,
- buf);
- mc->call_task = GNUNET_SCHEDULER_add_delayed (FREQ,
- &call_send,
- mc);
+ GNUNET_snprintf (buf, sizeof (buf), "call");
+ mc->rdc (mc->rdc_cls, strlen (buf) + 1, buf);
+ mc->call_task = GNUNET_SCHEDULER_add_delayed (FREQ, &call_send, mc);
}
const char *origin = CLS_STR (cls);
(void) cls;
- LOG_DEBUG ("Speaker %s enabled\n",
- origin);
+ LOG_DEBUG ("Speaker %s enabled\n", origin);
return GNUNET_OK;
}
const char *origin = CLS_STR (cls);
(void) cls;
- LOG_DEBUG ("Speaker %s disabled\n",
- origin);
+ LOG_DEBUG ("Speaker %s disabled\n", origin);
}
static void
-play (void *cls,
- size_t data_size,
- const void *data)
+play (void *cls, size_t data_size, const void *data)
{
static unsigned int phone_i;
static unsigned int call_i;
(const char *) data);
}
- if ( (20 < call_i) &&
- (20 < phone_i) &&
- (CALLER2 == cls) )
+ if ((20 < call_i) && (20 < phone_i) && (CALLER2 == cls))
{
/* time to hang up ... */
GNUNET_CONVERSATION_call_stop (call2);
phone_i = 0;
call2_finished = GNUNET_YES;
}
- if ( (20 < call_i) &&
- (20 < phone_i) &&
- (CALLER1 == cls) )
+ if ((20 < call_i) && (20 < phone_i) && (CALLER1 == cls))
{
/* time to hang up ... */
GNUNET_CONVERSATION_call_stop (call1);
}
-static struct GNUNET_SPEAKER_Handle call1_speaker = {
- &enable_speaker,
- &play,
- &disable_speaker,
- &destroy_speaker,
- CALLER1
-};
+static struct GNUNET_SPEAKER_Handle call1_speaker = {&enable_speaker,
+ &play,
+ &disable_speaker,
+ &destroy_speaker,
+ CALLER1};
-static struct GNUNET_SPEAKER_Handle call2_speaker = {
- &enable_speaker,
- &play,
- &disable_speaker,
- &destroy_speaker,
- CALLER2
-};
+static struct GNUNET_SPEAKER_Handle call2_speaker = {&enable_speaker,
+ &play,
+ &disable_speaker,
+ &destroy_speaker,
+ CALLER2};
-static struct GNUNET_SPEAKER_Handle phone_speaker = {
- &enable_speaker,
- &play,
- &disable_speaker,
- &destroy_speaker,
- PHONE0
-};
+static struct GNUNET_SPEAKER_Handle phone_speaker = {&enable_speaker,
+ &play,
+ &disable_speaker,
+ &destroy_speaker,
+ PHONE0};
static int
const char *origin = CLS_STR (cls);
struct MicContext *mc;
- LOG_DEBUG ("Mic %s enabled\n",
- origin);
+ LOG_DEBUG ("Mic %s enabled\n", origin);
if (PHONE0 == cls)
{
phone_rdc = rdc;
const char *origin = CLS_STR (cls);
struct MicContext *mc;
- LOG_DEBUG ("Mic %s disabled\n",
- origin);
+ LOG_DEBUG ("Mic %s disabled\n", origin);
if (PHONE0 == cls)
{
phone_rdc = NULL;
{
const char *origin = CLS_STR (cls);
- LOG_DEBUG ("Mic %s destroyed\n",
- origin);
+ LOG_DEBUG ("Mic %s destroyed\n", origin);
}
-static struct GNUNET_MICROPHONE_Handle call1_mic = {
- &enable_mic,
- &disable_mic,
- &destroy_mic,
- CALLER1
-};
+static struct GNUNET_MICROPHONE_Handle call1_mic = {&enable_mic,
+ &disable_mic,
+ &destroy_mic,
+ CALLER1};
-static struct GNUNET_MICROPHONE_Handle call2_mic = {
- &enable_mic,
- &disable_mic,
- &destroy_mic,
- CALLER2
-};
+static struct GNUNET_MICROPHONE_Handle call2_mic = {&enable_mic,
+ &disable_mic,
+ &destroy_mic,
+ CALLER2};
-static struct GNUNET_MICROPHONE_Handle phone_mic = {
- &enable_mic,
- &disable_mic,
- &destroy_mic,
- PHONE0
-};
+static struct GNUNET_MICROPHONE_Handle phone_mic = {&enable_mic,
+ &disable_mic,
+ &destroy_mic,
+ PHONE0};
/**
{
(void) cls;
timeout_task = NULL;
- fprintf (stderr,
- "Timeout!\n");
+ fprintf (stderr, "Timeout!\n");
GNUNET_SCHEDULER_shutdown ();
}
static void
-caller_event_handler (void *cls,
- enum GNUNET_CONVERSATION_CallerEventCode code)
+caller_event_handler (void *cls, enum GNUNET_CONVERSATION_CallerEventCode code)
{
(void) cls;
switch (code)
{
case GNUNET_CONVERSATION_EC_CALLER_SUSPEND:
case GNUNET_CONVERSATION_EC_CALLER_RESUME:
- LOG (GNUNET_ERROR_TYPE_WARNING,
- "Unexpected caller code: %d\n",
- code);
+ LOG (GNUNET_ERROR_TYPE_WARNING, "Unexpected caller code: %d\n", code);
break;
}
}
}
break;
default:
- LOG (GNUNET_ERROR_TYPE_WARNING,
- "Unexpected phone code: %d\n",
- code);
+ LOG (GNUNET_ERROR_TYPE_WARNING, "Unexpected phone code: %d\n", code);
break;
}
}
static void
-call_event_handler (void *cls,
- enum GNUNET_CONVERSATION_CallEventCode code)
+call_event_handler (void *cls, enum GNUNET_CONVERSATION_CallEventCode code)
{
const char *cid = cls;
static void
caller_ego_create_cont (void *cls,
+ const struct GNUNET_CRYPTO_EcdsaPrivateKey *pk,
const char *emsg)
{
(void) cls;
static void
-namestore_put_cont (void *cls,
- int32_t success,
- const char *emsg)
+namestore_put_cont (void *cls, int32_t success, const char *emsg)
{
(void) cls;
qe = NULL;
GNUNET_assert (GNUNET_YES == success);
GNUNET_assert (NULL == emsg);
GNUNET_assert (NULL == op);
- op = GNUNET_IDENTITY_create (id,
- "caller-ego",
- &caller_ego_create_cont,
- NULL);
+ op = GNUNET_IDENTITY_create (id, "caller-ego", &caller_ego_create_cont, NULL);
}
GNUNET_asprintf (&gns_name,
"phone.%s",
GNUNET_GNSRECORD_pkey_to_zkey (&pub));
- phone = GNUNET_CONVERSATION_phone_create (cfg,
- ego,
- &phone_event_handler,
- NULL);
+ phone =
+ GNUNET_CONVERSATION_phone_create (cfg, ego, &phone_event_handler, NULL);
GNUNET_assert (NULL != phone);
memset (&rd, 0, sizeof (rd));
- GNUNET_CONVERSATION_phone_get_record (phone,
- &rd);
+ GNUNET_CONVERSATION_phone_get_record (phone, &rd);
GNUNET_assert (rd.record_type == GNUNET_GNSRECORD_TYPE_PHONE);
rd.expiration_time = UINT64_MAX;
- qe = GNUNET_NAMESTORE_records_store (ns,
- GNUNET_IDENTITY_ego_get_private_key (ego),
- "phone" /* GNS label */,
- 1,
- &rd,
- &namestore_put_cont,
- NULL);
+ qe =
+ GNUNET_NAMESTORE_records_store (ns,
+ GNUNET_IDENTITY_ego_get_private_key (ego),
+ "phone" /* GNS label */,
+ 1,
+ &rd,
+ &namestore_put_cont,
+ NULL);
return;
}
if (0 == strcmp (name, "caller-ego"))
static void
-phone_ego_create_cont (void *cls,
- const char *emsg)
+phone_ego_create_cont (void *cls, const char *emsg)
{
(void) cls;
op = NULL;
(void) cls;
(void) peer;
cfg = c;
- timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
- &end_test,
- NULL);
- GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
- NULL);
- id = GNUNET_IDENTITY_connect (cfg,
- &identity_cb,
- NULL);
- op = GNUNET_IDENTITY_create (id,
- "phone-ego",
- &phone_ego_create_cont,
- NULL);
+ timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, NULL);
+ GNUNET_SCHEDULER_add_shutdown (&do_shutdown, NULL);
+ id = GNUNET_IDENTITY_connect (cfg, &identity_cb, NULL);
+ op = GNUNET_IDENTITY_create (id, "phone-ego", &phone_ego_create_cont, NULL);
ns = GNUNET_NAMESTORE_connect (cfg);
}
int
-main (int argc,
- char *argv[])
+main (int argc, char *argv[])
{
(void) argc;
(void) argv;
if (0 != GNUNET_TESTING_peer_run ("test_conversation_api_twocalls",
- "test_conversation.conf",
- &run,
- NULL))
+ "test_conversation.conf",
+ &run,
+ NULL))
return 1;
if (call1_finished && call2_finished)
return 0;