aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c6
-rw-r--r--src/transport/gnunet-service-transport_clients.c2
-rw-r--r--src/transport/gnunet-service-transport_hello.c2
-rw-r--r--src/transport/gnunet-service-transport_manipulation.c4
-rw-r--r--src/transport/gnunet-service-transport_validation.c2
-rw-r--r--src/transport/plugin_transport_bluetooth.c14
-rw-r--r--src/transport/plugin_transport_http_common.c4
-rw-r--r--src/transport/plugin_transport_http_server.c6
-rw-r--r--src/transport/plugin_transport_smtp.c4
-rw-r--r--src/transport/plugin_transport_tcp.c4
-rw-r--r--src/transport/plugin_transport_udp.c6
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c4
-rw-r--r--src/transport/plugin_transport_wlan.c14
-rw-r--r--src/transport/transport-testing.c6
-rw-r--r--src/transport/transport_api_address_lookup.c2
-rw-r--r--src/transport/transport_api_address_to_string.c2
-rw-r--r--src/transport/transport_api_blacklist.c2
17 files changed, 42 insertions, 42 deletions
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c
index 87d753929..db154d911 100644
--- a/src/transport/gnunet-service-transport_blacklist.c
+++ b/src/transport/gnunet-service-transport_blacklist.c
@@ -494,7 +494,7 @@ test_connection_ok (void *cls, const struct GNUNET_PeerIdentity *neighbour,
494 struct TestConnectionContext *tcc = cls; 494 struct TestConnectionContext *tcc = cls;
495 struct GST_BlacklistCheck *bc; 495 struct GST_BlacklistCheck *bc;
496 496
497 bc = GNUNET_malloc (sizeof (struct GST_BlacklistCheck)); 497 bc = GNUNET_new (struct GST_BlacklistCheck);
498 GNUNET_CONTAINER_DLL_insert (bc_head, bc_tail, bc); 498 GNUNET_CONTAINER_DLL_insert (bc_head, bc_tail, bc);
499 bc->peer = *neighbour; 499 bc->peer = *neighbour;
500 bc->cont = &confirm_or_drop_neighbour; 500 bc->cont = &confirm_or_drop_neighbour;
@@ -538,7 +538,7 @@ GST_blacklist_handle_init (void *cls, struct GNUNET_SERVER_Client *client,
538 bl = bl->next; 538 bl = bl->next;
539 } 539 }
540 GNUNET_SERVER_client_mark_monitor (client); 540 GNUNET_SERVER_client_mark_monitor (client);
541 bl = GNUNET_malloc (sizeof (struct Blacklisters)); 541 bl = GNUNET_new (struct Blacklisters);
542 bl->client = client; 542 bl->client = client;
543 GNUNET_SERVER_client_keep (client); 543 GNUNET_SERVER_client_keep (client);
544 GNUNET_CONTAINER_DLL_insert_after (bl_head, bl_tail, bl_tail, bl); 544 GNUNET_CONTAINER_DLL_insert_after (bl_head, bl_tail, bl_tail, bl);
@@ -739,7 +739,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
739 } 739 }
740 740
741 /* need to query blacklist clients */ 741 /* need to query blacklist clients */
742 bc = GNUNET_malloc (sizeof (struct GST_BlacklistCheck)); 742 bc = GNUNET_new (struct GST_BlacklistCheck);
743 GNUNET_CONTAINER_DLL_insert (bc_head, bc_tail, bc); 743 GNUNET_CONTAINER_DLL_insert (bc_head, bc_tail, bc);
744 bc->peer = *peer; 744 bc->peer = *peer;
745 bc->cont = cont; 745 bc->cont = cont;
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c
index 0aeb661d4..8679f40b4 100644
--- a/src/transport/gnunet-service-transport_clients.c
+++ b/src/transport/gnunet-service-transport_clients.c
@@ -677,7 +677,7 @@ clients_handle_send (void *cls,
677 return; 677 return;
678 } 678 }
679 GNUNET_SERVER_receive_done (client, GNUNET_OK); 679 GNUNET_SERVER_receive_done (client, GNUNET_OK);
680 stcc = GNUNET_malloc (sizeof (struct SendTransmitContinuationContext)); 680 stcc = GNUNET_new (struct SendTransmitContinuationContext);
681 stcc->target = obm->peer; 681 stcc->target = obm->peer;
682 stcc->client = client; 682 stcc->client = client;
683 GNUNET_SERVER_client_keep (client); 683 GNUNET_SERVER_client_keep (client);
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index 6bf707755..626be54c1 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -288,7 +288,7 @@ GST_hello_modify_addresses (int addremove,
288 GNUNET_break (0); 288 GNUNET_break (0);
289 return; 289 return;
290 } 290 }
291 al = GNUNET_malloc (sizeof (struct OwnAddressList)); 291 al = GNUNET_new (struct OwnAddressList);
292 GNUNET_CONTAINER_DLL_insert (oal_head, oal_tail, al); 292 GNUNET_CONTAINER_DLL_insert (oal_head, oal_tail, al);
293 al->address = GNUNET_HELLO_address_copy (address); 293 al->address = GNUNET_HELLO_address_copy (address);
294 refresh_hello (); 294 refresh_hello ();
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c
index 1b708cb70..da3fc2de9 100644
--- a/src/transport/gnunet-service-transport_manipulation.c
+++ b/src/transport/gnunet-service-transport_manipulation.c
@@ -210,7 +210,7 @@ set_metric (struct TM_Peer *dest, int direction, uint32_t type, uint32_t value)
210 } 210 }
211 if (NULL == cur) 211 if (NULL == cur)
212 { 212 {
213 cur = GNUNET_malloc (sizeof (struct PropManipulationEntry)); 213 cur = GNUNET_new (struct PropManipulationEntry);
214 GNUNET_CONTAINER_DLL_insert (dest->head, dest->tail, cur); 214 GNUNET_CONTAINER_DLL_insert (dest->head, dest->tail, cur);
215 cur->type = type; 215 cur->type = type;
216 cur->metrics[TM_SEND] = UINT32_MAX; 216 cur->metrics[TM_SEND] = UINT32_MAX;
@@ -327,7 +327,7 @@ GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client,
327 327
328 if (NULL == (tmp = GNUNET_CONTAINER_multipeermap_get (man_handle.peers, &tm->peer))) 328 if (NULL == (tmp = GNUNET_CONTAINER_multipeermap_get (man_handle.peers, &tm->peer)))
329 { 329 {
330 tmp = GNUNET_malloc (sizeof (struct TM_Peer)); 330 tmp = GNUNET_new (struct TM_Peer);
331 tmp->peer = (tm->peer); 331 tmp->peer = (tm->peer);
332 for (c = 0; c < TM_BOTH; c++) 332 for (c = 0; c < TM_BOTH; c++)
333 { 333 {
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index c0e605114..d56aac8ad 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -718,7 +718,7 @@ find_validation_entry (const struct GNUNET_CRYPTO_EddsaPublicKey *public_key,
718 return ve; 718 return ve;
719 if (public_key == NULL) 719 if (public_key == NULL)
720 return NULL; 720 return NULL;
721 ve = GNUNET_malloc (sizeof (struct ValidationEntry)); 721 ve = GNUNET_new (struct ValidationEntry);
722 ve->in_use = GNUNET_SYSERR; /* not defined */ 722 ve->in_use = GNUNET_SYSERR; /* not defined */
723 ve->last_line_set_to_no = 0; 723 ve->last_line_set_to_no = 0;
724 ve->last_line_set_to_yes = 0; 724 ve->last_line_set_to_yes = 0;
diff --git a/src/transport/plugin_transport_bluetooth.c b/src/transport/plugin_transport_bluetooth.c
index 51e8a89bd..a7d3cf3f5 100644
--- a/src/transport/plugin_transport_bluetooth.c
+++ b/src/transport/plugin_transport_bluetooth.c
@@ -730,7 +730,7 @@ create_session (struct MacEndpoint *endpoint,
730 } 730 }
731 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, _("# Bluetooth sessions allocated"), 1, 731 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, _("# Bluetooth sessions allocated"), 1,
732 GNUNET_NO); 732 GNUNET_NO);
733 session = GNUNET_malloc (sizeof (struct Session)); 733 session = GNUNET_new (struct Session);
734 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head, 734 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head,
735 endpoint->sessions_tail, 735 endpoint->sessions_tail,
736 session); 736 session);
@@ -897,7 +897,7 @@ send_with_fragmentation (struct MacEndpoint *endpoint,
897 struct Plugin *plugin; 897 struct Plugin *plugin;
898 898
899 plugin = endpoint->plugin; 899 plugin = endpoint->plugin;
900 fm = GNUNET_malloc (sizeof (struct FragmentMessage)); 900 fm = GNUNET_new (struct FragmentMessage);
901 fm->macendpoint = endpoint; 901 fm->macendpoint = endpoint;
902 fm->target = *target; 902 fm->target = *target;
903 fm->size_payload = payload_size; 903 fm->size_payload = payload_size;
@@ -1001,7 +1001,7 @@ create_macendpoint (struct Plugin *plugin,
1001 for (pos = plugin->mac_head; NULL != pos; pos = pos->next) 1001 for (pos = plugin->mac_head; NULL != pos; pos = pos->next)
1002 if (0 == memcmp (addr, &pos->addr, sizeof (struct WlanAddress))) 1002 if (0 == memcmp (addr, &pos->addr, sizeof (struct WlanAddress)))
1003 return pos; 1003 return pos;
1004 pos = GNUNET_malloc (sizeof (struct MacEndpoint)); 1004 pos = GNUNET_new (struct MacEndpoint);
1005 pos->addr = *addr; 1005 pos->addr = *addr;
1006 pos->plugin = plugin; 1006 pos->plugin = plugin;
1007 pos->defrag = 1007 pos->defrag =
@@ -1790,7 +1790,7 @@ bluetooth_string_to_address (void *cls, const char *addr, uint16_t addrlen,
1790 GNUNET_break (0); 1790 GNUNET_break (0);
1791 return GNUNET_SYSERR; 1791 return GNUNET_SYSERR;
1792 } 1792 }
1793 wa = GNUNET_malloc (sizeof (struct WlanAddress)); 1793 wa = GNUNET_new (struct WlanAddress);
1794 for (i=0;i<6;i++) 1794 for (i=0;i<6;i++)
1795 wa->mac.mac[i] = a[i]; 1795 wa->mac.mac[i] = a[i];
1796 wa->options = htonl (0); 1796 wa->options = htonl (0);
@@ -1833,7 +1833,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
1833 { 1833 {
1834 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully 1834 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully
1835 initialze the plugin or the API */ 1835 initialze the plugin or the API */
1836 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1836 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
1837 api->cls = NULL; 1837 api->cls = NULL;
1838 api->address_pretty_printer = &bluetooth_plugin_address_pretty_printer; 1838 api->address_pretty_printer = &bluetooth_plugin_address_pretty_printer;
1839 api->address_to_string = &bluetooth_plugin_address_to_string; 1839 api->address_to_string = &bluetooth_plugin_address_to_string;
@@ -1875,7 +1875,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
1875 return NULL; 1875 return NULL;
1876 } 1876 }
1877 1877
1878 plugin = GNUNET_malloc (sizeof (struct Plugin)); 1878 plugin = GNUNET_new (struct Plugin);
1879 plugin->interface = interface; 1879 plugin->interface = interface;
1880 plugin->env = env; 1880 plugin->env = env;
1881 GNUNET_STATISTICS_set (plugin->env->stats, _("# Bluetooth sessions allocated"), 1881 GNUNET_STATISTICS_set (plugin->env->stats, _("# Bluetooth sessions allocated"),
@@ -1933,7 +1933,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
1933 GNUNET_assert (0); 1933 GNUNET_assert (0);
1934 } 1934 }
1935 1935
1936 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1936 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
1937 api->cls = plugin; 1937 api->cls = plugin;
1938 api->send = &bluetooth_plugin_send; 1938 api->send = &bluetooth_plugin_send;
1939 api->get_session = &bluetooth_plugin_get_session; 1939 api->get_session = &bluetooth_plugin_get_session;
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c
index de4cb9a26..c020118ac 100644
--- a/src/transport/plugin_transport_http_common.c
+++ b/src/transport/plugin_transport_http_common.c
@@ -60,7 +60,7 @@ http_split_address (const char * addr)
60 char *port_start = NULL; 60 char *port_start = NULL;
61 char *path_start = NULL; 61 char *path_start = NULL;
62 protocol_start = src; 62 protocol_start = src;
63 sp = GNUNET_malloc (sizeof (struct SplittedHTTPAddress)); 63 sp = GNUNET_new (struct SplittedHTTPAddress);
64 64
65 /* Address string consists of protocol://host[:port]path*/ 65 /* Address string consists of protocol://host[:port]path*/
66 66
@@ -455,7 +455,7 @@ http_common_socket_from_address (const void *addr, size_t addrlen, int *res)
455 return NULL; 455 return NULL;
456 } 456 }
457 457
458 s = GNUNET_malloc (sizeof (struct sockaddr_storage)); 458 s = GNUNET_new (struct sockaddr_storage);
459 GNUNET_asprintf (&to_conv, "%s:%u", spa->host, spa->port); 459 GNUNET_asprintf (&to_conv, "%s:%u", spa->host, spa->port);
460 if (GNUNET_SYSERR == GNUNET_STRINGS_to_address_ip (to_conv, strlen(to_conv), s)) 460 if (GNUNET_SYSERR == GNUNET_STRINGS_to_address_ip (to_conv, strlen(to_conv), s))
461 { 461 {
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index f08c7072a..15c0323c6 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -2219,7 +2219,7 @@ server_add_address (void *cls, int add_remove, const struct sockaddr *addr,
2219 struct HTTP_Server_Plugin *plugin = cls; 2219 struct HTTP_Server_Plugin *plugin = cls;
2220 struct HttpAddressWrapper *w = NULL; 2220 struct HttpAddressWrapper *w = NULL;
2221 2221
2222 w = GNUNET_malloc (sizeof (struct HttpAddressWrapper)); 2222 w = GNUNET_new (struct HttpAddressWrapper);
2223 w->address = http_common_address_from_socket (plugin->protocol, addr, addrlen); 2223 w->address = http_common_address_from_socket (plugin->protocol, addr, addrlen);
2224 if (NULL == w->address) 2224 if (NULL == w->address)
2225 { 2225 {
@@ -2769,7 +2769,7 @@ server_configure_plugin (struct HTTP_Server_Plugin *plugin)
2769 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 2769 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
2770 "Binding %s plugin to specific IPv4 address: `%s'\n", 2770 "Binding %s plugin to specific IPv4 address: `%s'\n",
2771 plugin->protocol, bind4_address); 2771 plugin->protocol, bind4_address);
2772 plugin->server_addr_v4 = GNUNET_malloc (sizeof (struct sockaddr_in)); 2772 plugin->server_addr_v4 = GNUNET_new (struct sockaddr_in);
2773 if (1 != inet_pton (AF_INET, bind4_address, 2773 if (1 != inet_pton (AF_INET, bind4_address,
2774 &plugin->server_addr_v4->sin_addr)) 2774 &plugin->server_addr_v4->sin_addr))
2775 { 2775 {
@@ -2800,7 +2800,7 @@ server_configure_plugin (struct HTTP_Server_Plugin *plugin)
2800 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 2800 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
2801 "Binding %s plugin to specific IPv6 address: `%s'\n", 2801 "Binding %s plugin to specific IPv6 address: `%s'\n",
2802 plugin->protocol, bind6_address); 2802 plugin->protocol, bind6_address);
2803 plugin->server_addr_v6 = GNUNET_malloc (sizeof (struct sockaddr_in6)); 2803 plugin->server_addr_v6 = GNUNET_new (struct sockaddr_in6);
2804 if (1 != 2804 if (1 !=
2805 inet_pton (AF_INET6, bind6_address, &plugin->server_addr_v6->sin6_addr)) 2805 inet_pton (AF_INET6, bind6_address, &plugin->server_addr_v6->sin6_addr))
2806 { 2806 {
diff --git a/src/transport/plugin_transport_smtp.c b/src/transport/plugin_transport_smtp.c
index c886fd132..fd2089367 100644
--- a/src/transport/plugin_transport_smtp.c
+++ b/src/transport/plugin_transport_smtp.c
@@ -233,7 +233,7 @@ listenAndDistribute (void *unused)
233 } 233 }
234 if (stats != NULL) 234 if (stats != NULL)
235 stats->change (stat_bytesReceived, size); 235 stats->change (stat_bytesReceived, size);
236 coreMP = GNUNET_malloc (sizeof (GNUNET_TransportPacket)); 236 coreMP = GNUNET_new (GNUNET_TransportPacket);
237 coreMP->msg = out; 237 coreMP->msg = out;
238 coreMP->size = size - sizeof (SMTPMessage); 238 coreMP->size = size - sizeof (SMTPMessage);
239 coreMP->tsession = NULL; 239 coreMP->tsession = NULL;
@@ -541,7 +541,7 @@ api_connect (const GNUNET_MessageHello * hello, GNUNET_TSession ** tsessionPtr,
541{ 541{
542 GNUNET_TSession *tsession; 542 GNUNET_TSession *tsession;
543 543
544 tsession = GNUNET_malloc (sizeof (GNUNET_TSession)); 544 tsession = GNUNET_new (GNUNET_TSession);
545 tsession->internal = GNUNET_malloc (GNUNET_sizeof_hello (hello)); 545 tsession->internal = GNUNET_malloc (GNUNET_sizeof_hello (hello));
546 tsession->peer = hello->senderIdentity; 546 tsession->peer = hello->senderIdentity;
547 memcpy (tsession->internal, hello, GNUNET_sizeof_hello (hello)); 547 memcpy (tsession->internal, hello, GNUNET_sizeof_hello (hello));
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index d3f27dec4..04fac9cde 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1906,7 +1906,7 @@ tcp_plugin_address_pretty_printer (void *cls, const char *type,
1906 asc (asc_cls, NULL); 1906 asc (asc_cls, NULL);
1907 return; 1907 return;
1908 } 1908 }
1909 ppc = GNUNET_malloc (sizeof (struct PrettyPrinterContext)); 1909 ppc = GNUNET_new (struct PrettyPrinterContext);
1910 if (addrlen == sizeof (struct IPv6TcpAddress)) 1910 if (addrlen == sizeof (struct IPv6TcpAddress))
1911 ppc->ipv6 = GNUNET_YES; 1911 ppc->ipv6 = GNUNET_YES;
1912 else 1912 else
@@ -2524,7 +2524,7 @@ try_connection_reversal (void *cls, const struct sockaddr *addr,
2524 2524
2525 /* FIXME: do we need to track these probe context objects so that 2525 /* FIXME: do we need to track these probe context objects so that
2526 * we can clean them up on plugin unload? */ 2526 * we can clean them up on plugin unload? */
2527 tcp_probe_ctx = GNUNET_malloc (sizeof (struct TCPProbeContext)); 2527 tcp_probe_ctx = GNUNET_new (struct TCPProbeContext);
2528 tcp_probe_ctx->message.header.size = 2528 tcp_probe_ctx->message.header.size =
2529 htons (sizeof (struct TCP_NAT_ProbeMessage)); 2529 htons (sizeof (struct TCP_NAT_ProbeMessage));
2530 tcp_probe_ctx->message.header.type = 2530 tcp_probe_ctx->message.header.type =
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 5b46c93c7..a5ee6494a 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -684,7 +684,7 @@ udp_string_to_address (void *cls, const char *addr, uint16_t addrlen,
684 { 684 {
685 struct IPv4UdpAddress *u4; 685 struct IPv4UdpAddress *u4;
686 struct sockaddr_in *in4 = (struct sockaddr_in *) &socket_address; 686 struct sockaddr_in *in4 = (struct sockaddr_in *) &socket_address;
687 u4 = GNUNET_malloc (sizeof (struct IPv4UdpAddress)); 687 u4 = GNUNET_new (struct IPv4UdpAddress);
688 u4->options = htonl (options); 688 u4->options = htonl (options);
689 u4->ipv4_addr = in4->sin_addr.s_addr; 689 u4->ipv4_addr = in4->sin_addr.s_addr;
690 u4->u4_port = in4->sin_port; 690 u4->u4_port = in4->sin_port;
@@ -696,7 +696,7 @@ udp_string_to_address (void *cls, const char *addr, uint16_t addrlen,
696 { 696 {
697 struct IPv6UdpAddress *u6; 697 struct IPv6UdpAddress *u6;
698 struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) &socket_address; 698 struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) &socket_address;
699 u6 = GNUNET_malloc (sizeof (struct IPv6UdpAddress)); 699 u6 = GNUNET_new (struct IPv6UdpAddress);
700 u6->options = htonl (options); 700 u6->options = htonl (options);
701 u6->ipv6_addr = in6->sin6_addr; 701 u6->ipv6_addr = in6->sin6_addr;
702 u6->u6_port = in6->sin6_port; 702 u6->u6_port = in6->sin6_port;
@@ -1911,7 +1911,7 @@ udp_plugin_send (void *cls,
1911 if (s->frag_ctx != NULL) 1911 if (s->frag_ctx != NULL)
1912 return GNUNET_SYSERR; 1912 return GNUNET_SYSERR;
1913 memcpy (&udp[1], msgbuf, msgbuf_size); 1913 memcpy (&udp[1], msgbuf, msgbuf_size);
1914 frag_ctx = GNUNET_malloc (sizeof (struct UDP_FragmentationContext)); 1914 frag_ctx = GNUNET_new (struct UDP_FragmentationContext);
1915 frag_ctx->plugin = plugin; 1915 frag_ctx->plugin = plugin;
1916 frag_ctx->session = s; 1916 frag_ctx->session = s;
1917 frag_ctx->cont = cont; 1917 frag_ctx->cont = cont;
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index 61ac3d10e..5448b4eff 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -242,7 +242,7 @@ udp_broadcast_receive (struct Plugin *plugin,
242 size, GNUNET_a2s ((const struct sockaddr *) addr, addrlen)); 242 size, GNUNET_a2s ((const struct sockaddr *) addr, addrlen));
243 struct Mstv4Context *mc; 243 struct Mstv4Context *mc;
244 244
245 mc = GNUNET_malloc (sizeof (struct Mstv4Context)); 245 mc = GNUNET_new (struct Mstv4Context);
246 struct sockaddr_in *av4 = (struct sockaddr_in *) addr; 246 struct sockaddr_in *av4 = (struct sockaddr_in *) addr;
247 247
248 mc->addr.ipv4_addr = av4->sin_addr.s_addr; 248 mc->addr.ipv4_addr = av4->sin_addr.s_addr;
@@ -263,7 +263,7 @@ udp_broadcast_receive (struct Plugin *plugin,
263 size, GNUNET_a2s ((const struct sockaddr *) &addr, addrlen)); 263 size, GNUNET_a2s ((const struct sockaddr *) &addr, addrlen));
264 struct Mstv6Context *mc; 264 struct Mstv6Context *mc;
265 265
266 mc = GNUNET_malloc (sizeof (struct Mstv6Context)); 266 mc = GNUNET_new (struct Mstv6Context);
267 struct sockaddr_in6 *av6 = (struct sockaddr_in6 *) addr; 267 struct sockaddr_in6 *av6 = (struct sockaddr_in6 *) addr;
268 268
269 mc->addr.ipv6_addr = av6->sin6_addr; 269 mc->addr.ipv6_addr = av6->sin6_addr;
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 6f5c66ad3..1fafc4070 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -777,7 +777,7 @@ create_session (struct MacEndpoint *endpoint,
777 777
778 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, _("# WLAN sessions allocated"), 1, 778 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, _("# WLAN sessions allocated"), 1,
779 GNUNET_NO); 779 GNUNET_NO);
780 session = GNUNET_malloc (sizeof (struct Session)); 780 session = GNUNET_new (struct Session);
781 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head, 781 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head,
782 endpoint->sessions_tail, 782 endpoint->sessions_tail,
783 session); 783 session);
@@ -974,7 +974,7 @@ send_with_fragmentation (struct MacEndpoint *endpoint,
974 struct Plugin *plugin; 974 struct Plugin *plugin;
975 975
976 plugin = endpoint->plugin; 976 plugin = endpoint->plugin;
977 fm = GNUNET_malloc (sizeof (struct FragmentMessage)); 977 fm = GNUNET_new (struct FragmentMessage);
978 fm->macendpoint = endpoint; 978 fm->macendpoint = endpoint;
979 fm->target = *target; 979 fm->target = *target;
980 fm->size_payload = payload_size; 980 fm->size_payload = payload_size;
@@ -1079,7 +1079,7 @@ create_macendpoint (struct Plugin *plugin,
1079 for (pos = plugin->mac_head; NULL != pos; pos = pos->next) 1079 for (pos = plugin->mac_head; NULL != pos; pos = pos->next)
1080 if (0 == memcmp (addr, &pos->addr, sizeof (struct WlanAddress))) 1080 if (0 == memcmp (addr, &pos->addr, sizeof (struct WlanAddress)))
1081 return pos; 1081 return pos;
1082 pos = GNUNET_malloc (sizeof (struct MacEndpoint)); 1082 pos = GNUNET_new (struct MacEndpoint);
1083 pos->addr = *addr; 1083 pos->addr = *addr;
1084 pos->plugin = plugin; 1084 pos->plugin = plugin;
1085 pos->defrag = 1085 pos->defrag =
@@ -1846,7 +1846,7 @@ wlan_string_to_address (void *cls, const char *addr, uint16_t addrlen,
1846 GNUNET_break (0); 1846 GNUNET_break (0);
1847 return GNUNET_SYSERR; 1847 return GNUNET_SYSERR;
1848 } 1848 }
1849 wa = GNUNET_malloc (sizeof (struct WlanAddress)); 1849 wa = GNUNET_new (struct WlanAddress);
1850 for (i=0;i<6;i++) 1850 for (i=0;i<6;i++)
1851 wa->mac.mac[i] = a[i]; 1851 wa->mac.mac[i] = a[i];
1852 wa->options = htonl (0); 1852 wa->options = htonl (0);
@@ -1889,7 +1889,7 @@ libgnunet_plugin_transport_wlan_init (void *cls)
1889 { 1889 {
1890 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully 1890 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully
1891 initialze the plugin or the API */ 1891 initialze the plugin or the API */
1892 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1892 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
1893 api->cls = NULL; 1893 api->cls = NULL;
1894 api->address_pretty_printer = &wlan_plugin_address_pretty_printer; 1894 api->address_pretty_printer = &wlan_plugin_address_pretty_printer;
1895 api->address_to_string = &wlan_plugin_address_to_string; 1895 api->address_to_string = &wlan_plugin_address_to_string;
@@ -1931,7 +1931,7 @@ libgnunet_plugin_transport_wlan_init (void *cls)
1931 return NULL; 1931 return NULL;
1932 } 1932 }
1933 1933
1934 plugin = GNUNET_malloc (sizeof (struct Plugin)); 1934 plugin = GNUNET_new (struct Plugin);
1935 plugin->interface = interface; 1935 plugin->interface = interface;
1936 plugin->env = env; 1936 plugin->env = env;
1937 GNUNET_STATISTICS_set (plugin->env->stats, _("# WLAN sessions allocated"), 1937 GNUNET_STATISTICS_set (plugin->env->stats, _("# WLAN sessions allocated"),
@@ -1989,7 +1989,7 @@ libgnunet_plugin_transport_wlan_init (void *cls)
1989 GNUNET_assert (0); 1989 GNUNET_assert (0);
1990 } 1990 }
1991 1991
1992 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1992 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
1993 api->cls = plugin; 1993 api->cls = plugin;
1994 api->send = &wlan_plugin_send; 1994 api->send = &wlan_plugin_send;
1995 api->get_session = &wlan_plugin_get_session; 1995 api->get_session = &wlan_plugin_get_session;
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 51aa0a55f..f9182b57f 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -246,7 +246,7 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct GNUNET_TRANSPORT_TESTING_handle *tth
246 return NULL; 246 return NULL;
247 } 247 }
248 248
249 struct PeerContext *p = GNUNET_malloc (sizeof (struct PeerContext)); 249 struct PeerContext *p = GNUNET_new (struct PeerContext);
250 GNUNET_CONTAINER_DLL_insert (tth->p_head, tth->p_tail, p); 250 GNUNET_CONTAINER_DLL_insert (tth->p_head, tth->p_tail, p);
251 251
252 /* Create configuration and call testing lib to modify it */ 252 /* Create configuration and call testing lib to modify it */
@@ -471,7 +471,7 @@ GNUNET_TRANSPORT_TESTING_connect_peers (struct GNUNET_TRANSPORT_TESTING_handle *
471 GNUNET_assert (tth != NULL); 471 GNUNET_assert (tth != NULL);
472 472
473 struct ConnectingContext *cc = 473 struct ConnectingContext *cc =
474 GNUNET_malloc (sizeof (struct ConnectingContext)); 474 GNUNET_new (struct ConnectingContext);
475 475
476 GNUNET_assert (p1 != NULL); 476 GNUNET_assert (p1 != NULL);
477 GNUNET_assert (p2 != NULL); 477 GNUNET_assert (p2 != NULL);
@@ -574,7 +574,7 @@ GNUNET_TRANSPORT_TESTING_init ()
574 struct GNUNET_TRANSPORT_TESTING_handle *tth; 574 struct GNUNET_TRANSPORT_TESTING_handle *tth;
575 575
576 /* prepare hostkeys */ 576 /* prepare hostkeys */
577 tth = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_TESTING_handle)); 577 tth = GNUNET_new (struct GNUNET_TRANSPORT_TESTING_handle);
578 578
579 /* Init testing the testing lib */ 579 /* Init testing the testing lib */
580 tth->tl_system = GNUNET_TESTING_system_create ("transport-testing", NULL, 580 tth->tl_system = GNUNET_TESTING_system_create ("transport-testing", NULL,
diff --git a/src/transport/transport_api_address_lookup.c b/src/transport/transport_api_address_lookup.c
index 515be9bf8..d547b8ed8 100644
--- a/src/transport/transport_api_address_lookup.c
+++ b/src/transport/transport_api_address_lookup.c
@@ -322,7 +322,7 @@ GNUNET_TRANSPORT_peer_get_active_addresses (const struct
322 return NULL; 322 return NULL;
323 if (GNUNET_YES != one_shot) 323 if (GNUNET_YES != one_shot)
324 timeout = GNUNET_TIME_UNIT_FOREVER_REL; 324 timeout = GNUNET_TIME_UNIT_FOREVER_REL;
325 pal_ctx = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PeerIterateContext)); 325 pal_ctx = GNUNET_new (struct GNUNET_TRANSPORT_PeerIterateContext);
326 pal_ctx->cb = peer_address_callback; 326 pal_ctx->cb = peer_address_callback;
327 pal_ctx->cb_cls = peer_address_callback_cls; 327 pal_ctx->cb_cls = peer_address_callback_cls;
328 pal_ctx->cfg = cfg; 328 pal_ctx->cfg = cfg;
diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c
index 94c9ac45a..0fb0623dc 100644
--- a/src/transport/transport_api_address_to_string.c
+++ b/src/transport/transport_api_address_to_string.c
@@ -152,7 +152,7 @@ GNUNET_TRANSPORT_address_to_string (const struct GNUNET_CONFIGURATION_Handle
152 memcpy (addrbuf, address->address, alen); 152 memcpy (addrbuf, address->address, alen);
153 memcpy (&addrbuf[alen], address->transport_name, slen); 153 memcpy (&addrbuf[alen], address->transport_name, slen);
154 154
155 alc = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_AddressToStringContext)); 155 alc = GNUNET_new (struct GNUNET_TRANSPORT_AddressToStringContext);
156 alc->cb = aluc; 156 alc->cb = aluc;
157 alc->cb_cls = aluc_cls; 157 alc->cb_cls = aluc_cls;
158 alc->timeout = GNUNET_TIME_relative_to_absolute (timeout); 158 alc->timeout = GNUNET_TIME_relative_to_absolute (timeout);
diff --git a/src/transport/transport_api_blacklist.c b/src/transport/transport_api_blacklist.c
index dcd1ae781..1c17bd498 100644
--- a/src/transport/transport_api_blacklist.c
+++ b/src/transport/transport_api_blacklist.c
@@ -256,7 +256,7 @@ GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg,
256 client = GNUNET_CLIENT_connect ("transport", cfg); 256 client = GNUNET_CLIENT_connect ("transport", cfg);
257 if (NULL == client) 257 if (NULL == client)
258 return NULL; 258 return NULL;
259 ret = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_Blacklist)); 259 ret = GNUNET_new (struct GNUNET_TRANSPORT_Blacklist);
260 ret->client = client; 260 ret->client = client;
261 ret->cfg = cfg; 261 ret->cfg = cfg;
262 ret->cb = cb; 262 ret->cb = cb;