mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
Add IP checksumming functions to qemu (Gerd Hoffmann)
This can be shared between the e1000, virtio-net, and xennet. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4971 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
dd5e6304aa
commit
48c643630c
3 changed files with 95 additions and 1 deletions
7
net.h
7
net.h
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue