aboutsummaryrefslogtreecommitdiffstats
path: root/net-android.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2011-02-23 13:32:37 +0100
committerDavid 'Digit' Turner <digit@android.com>2011-02-23 17:05:34 +0100
commit462564f31bbdc9939bf1d2376e2782defa7ef655 (patch)
tree261958f81739fbfcf4228c05fdbcc6f854008286 /net-android.c
parentfa59e01ddace99351b212b8d82700156776e27e6 (diff)
downloadexternal_qemu-462564f31bbdc9939bf1d2376e2782defa7ef655.zip
external_qemu-462564f31bbdc9939bf1d2376e2782defa7ef655.tar.gz
external_qemu-462564f31bbdc9939bf1d2376e2782defa7ef655.tar.bz2
Minor cleanups for core/ui Makefile separation.
This patch contains minor cleanups that will be needed by a few future patches that will improve the way core and ui sources are separated and built. - remove a few compiler warnings - formatting - remove the memcheck CONFIG_MEMCHECK checks (they later get in the way) - refine hw/hw.h inclusion's of cpu.h (this comes from upstream) - add missing definitions for PRUd64 and PRUx64 (used later) - remove CONFIG_SHAPER test, replace with CONFIG_ANDROID instead. - add missing strdup() calls. Change-Id: Ic7d6681a51af718c298f0ee4bd884b1d8750f28e
Diffstat (limited to 'net-android.c')
-rw-r--r--net-android.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net-android.c b/net-android.c
index 234235b..6459eff 100644
--- a/net-android.c
+++ b/net-android.c
@@ -126,7 +126,7 @@
#include "libslirp.h"
#endif
-#if defined(CONFIG_SHAPER)
+#if defined(CONFIG_ANDROID)
#include "shaper.h"
#endif
@@ -730,7 +730,7 @@ ip_packet_is_internal( const uint8_t* data, size_t size )
return ( data[12] == 10 && data[16] == 10);
}
-#ifdef CONFIG_SHAPER
+#ifdef CONFIG_ANDROID
NetShaper slirp_shaper_in;
NetShaper slirp_shaper_out;
@@ -773,12 +773,12 @@ slirp_init_shapers( void )
netshaper_set_rate( slirp_shaper_in, qemu_net_upload_speed );
}
-#endif /* CONFIG_SHAPER */
+#endif /* CONFIG_ANDROID */
int slirp_can_output(void)
{
-#ifdef CONFIG_SHAPER
+#ifdef CONFIG_ANDROID
return !slirp_vc ||
( netshaper_can_send(slirp_shaper_out) &&
qemu_can_send_packet(slirp_vc) );
@@ -799,7 +799,7 @@ void slirp_output(const uint8_t *pkt, int pkt_len)
if (!slirp_vc)
return;
-#ifdef CONFIG_SHAPER
+#ifdef CONFIG_ANDROID
netshaper_send(slirp_shaper_out, (void*)pkt, pkt_len);
#else
qemu_send_packet(slirp_vc, pkt, pkt_len);
@@ -820,7 +820,7 @@ static ssize_t slirp_receive(VLANClientState *vc, const uint8_t *buf, size_t siz
if (qemu_tcpdump_active)
qemu_tcpdump_packet(buf, size);
-#ifdef CONFIG_SHAPER
+#ifdef CONFIG_ANDROID
netshaper_send(slirp_shaper_in, (char*)buf, size);
#else
slirp_input(buf, size);