A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
12
namespace
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
*/
23
uint32_t
CRC32Calculate
(
const
uint8_t*
data
,
int
length);
24
25
}
// namespace ns3
26
27
#endif
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::CRC32Calculate
uint32_t CRC32Calculate(const uint8_t *data, int length)
Calculates the CRC-32 for a given input.
Definition
crc32.cc:60
data
uint8_t data[writeSize]
Definition
socket-bound-tcp-static-routing.cc:41
src
network
utils
crc32.h
Generated on Fri Nov 8 2024 13:59:05 for ns-3 by
1.11.0