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::Create
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition
ptr.h:436
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 Mon Dec 15 2025 15:21:52 for ns-3 by
1.9.8