diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-29 19:40:04 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-29 19:40:04 +0000 |
commit | 48c643630c5e994e4885dceb45a5da1c403a678a (patch) | |
tree | 605f6658bd797fe764296ee499fd1610b6a50749 /net.h | |
parent | dd5e6304aa93ed9e0ca197a724a90e27379a37ea (diff) |
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
Diffstat (limited to 'net.h')
-rw-r--r-- | net.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |