pci: Fix function pci_default_write_config
[qemu/kevin.git] / net / checksum.h
blob1f052986e648b6fd5dc580ac1ca280c3da8f4df8
1 /*
2 * IP checksumming functions.
3 * (c) 2008 Gerd Hoffmann <kraxel@redhat.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; under version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #ifndef QEMU_NET_CHECKSUM_H
19 #define QEMU_NET_CHECKSUM_H
21 #include <stdint.h>
23 uint32_t net_checksum_add(int len, uint8_t *buf);
24 uint16_t net_checksum_finish(uint32_t sum);
25 uint16_t net_checksum_tcpudp(uint16_t length, uint16_t proto,
26 uint8_t *addrs, uint8_t *buf);
27 void net_checksum_calculate(uint8_t *data, int length);
29 #endif /* QEMU_NET_CHECKSUM_H */