A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
crc32.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2013 PIOTR JURKIEWICZ
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Piotr Jurkiewicz <piotr.jerzy.jurkiewicz@gmail.com>
7 */
8#ifndef CRC32_H
9#define CRC32_H
10#include <stdint.h>
11
12namespace ns3
13{
14
15/**
16 * Calculates the CRC-32 for a given input
17 *
18 * \param data buffer to calculate the checksum for
19 * \param length the length of the buffer (bytes)
20 * \returns the computed crc-32.
21 *
22 */
23uint32_t CRC32Calculate(const uint8_t* data, int length);
24
25} // namespace ns3
26
27#endif
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t CRC32Calculate(const uint8_t *data, int length)
Calculates the CRC-32 for a given input.
Definition crc32.cc:60
uint8_t data[writeSize]