Add IP checksuming functions to qemu.
PATCH 1/1 Add IP checksuming functions to qemu.
Hi folks,
This patch adds IP checksumming functions to qemu, so not every nic driver needs do to it on its own.
cheers,
Gerd
Quoted 1 line
From
1070650dcedeb966fd9baf499c1f85488a1aa48cMon Sep 17 00:00:00 2001
From: Gerd Hoffmann <[email protected]>
Date: Tue, 29 Jul 2008 13:25:12 +0200
Subject: [PATCH 04/22] Add IP checksumming functions to qemu.
--- Makefile.target | 2 +- net-checksum.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ net.h | 7 +++++ 3 files changed, 77 insertions(+), 1 deletions(-) create mode 100644 net-checksum.c
Makefile.target +1 -1
@@ -472,7 +472,7 @@ endif #CONFIG_DARWIN_USER # System emulator target ifndef CONFIG_USER_ONLY -OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o +OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o net-checksum.o ifdef CONFIG_WIN32 OBJS+=block-raw-win32.o else
net-checksum.c new file +69 -0
69 lines not on this page · raw message
net.h +7 -0
@@ -48,4 +48,11 @@ struct NICInfo {extern int nb_nics;extern NICInfo nd_table[MAX_NICS ]; +/* checksumming functions (net-checksum.c) */ +uint32_t net_checksum_add (int len,uint8_t *buf); +uint16_t net_checksum_finish (uint32_t sum); +uint16_t net_checksum_tcpudp (uint16_t length,uint16_t proto, +uint8_t *addrs,uint8_t *buf); +void net_checksum_calculate (uint8_t *data,int length); +#endif
Signature · 1 line
1.5.4.1
net-checksum.c
Quoted 42 lines · Gerd Hoffmann
Hi folks,
This patch adds IP checksumming functions to qemu, so not every nic driver needs do to it on its own.
cheers,
GerdFrom
1070650dcedeb966fd9baf499c1f85488a1aa48cMon Sep 17 00:00:00 2001
From: Gerd Hoffmann <[email protected]>
Date: Tue, 29 Jul 2008 13:25:12 +0200
Subject: [PATCH 04/22] Add IP checksumming functions to qemu.Signed-off-by Gerd Hoffmann <[email protected]>--- Makefile.target | 2 +- net-checksum.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ net.h | 7 +++++ 3 files changed, 77 insertions(+), 1 deletions(-) create mode 100644 net-checksum.cMakefile.target +1
-1@@ -472,7 +472,7 @@ endif #CONFIG_DARWIN_USER # System emulator target ifndef CONFIG_USER_ONLY -OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o +OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o net-checksum.o ifdef CONFIG_WIN32 OBJS+=block-raw-win32.o elsenet-checksum.c new file +0
-0@@ -0,0 +1,69 @@
Can you please add a license/copyright? Since QEMU is mixed licensed, it's important to have a license in every file.
Regards,
Anthony Liguori