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