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
encode-decode.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 University of Washington
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*/
6
7
#ifndef ENCODE_DECODE_H
8
#define ENCODE_DECODE_H
9
10
#include <cstdint>
11
#include <string>
12
13
namespace
ns3
14
{
15
16
std::string
BufferToString
(uint8_t* buffer,
uint32_t
len);
17
bool
StringToBuffer
(std::string s, uint8_t* buffer,
uint32_t
* len);
18
19
}
// namespace ns3
20
21
#endif
/* ENCODE_DECODE_H */
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::StringToBuffer
bool StringToBuffer(std::string s, uint8_t *buffer, uint32_t *len)
Convert string encoded by the inverse function (TapBufferToString) back into a byte buffer.
Definition
encode-decode.cc:56
ns3::BufferToString
std::string BufferToString(uint8_t *buffer, uint32_t len)
Convert a byte buffer to a string containing a hex representation of the buffer.
Definition
encode-decode.cc:26
src
fd-net-device
helper
encode-decode.h
Generated on Fri Nov 8 2024 13:59:00 for ns-3 by
1.11.0