For SNAT, don't store the pre-fragment L2 header before actions are applied.
[sliver-openvswitch.git] / datapath / crc32.h
1 #ifndef CRC32_H
2 #define CRC32_H 1
3
4 #include <linux/types.h>
5 #ifndef __KERNEL__
6 #include <stdint.h>
7 #endif
8 #include <stddef.h>
9
10 #define CRC32_TABLE_BITS 8
11 #define CRC32_TABLE_SIZE (1u << CRC32_TABLE_BITS)
12
13 struct crc32 {
14                 unsigned int table[CRC32_TABLE_SIZE];
15 };
16
17 void crc32_init(struct crc32 *, unsigned int polynomial);
18 unsigned int crc32_calculate(const struct crc32 *,
19                                                          const void *data_, size_t n_bytes);
20
21
22 #endif /* crc32.h */