Sponge
CS144's user-space TCP library
Static Public Member Functions | List of all members
NetUnparser Struct Reference

#include <parser.hh>

Static Public Member Functions

template<typename T >
static void _unparse_int (std::string &s, T val)
 
static void u16 (std::string &s, const uint16_t val)
 Write a 16-bit integer into the data stream in network byte order. More...
 
static void u32 (std::string &s, const uint32_t val)
 Write a 32-bit integer into the data stream in network byte order. More...
 
static void u8 (std::string &s, const uint8_t val)
 Write an 8-bit integer into the data stream in network byte order. More...
 

Detailed Description

Definition at line 65 of file parser.hh.

Member Function Documentation

◆ _unparse_int()

template<typename T >
void NetUnparser::_unparse_int ( std::string s,
val 
)
static

Definition at line 54 of file parser.cc.

◆ u16()

void NetUnparser::u16 ( std::string s,
const uint16_t  val 
)
static

Write a 16-bit integer into the data stream in network byte order.

Definition at line 70 of file parser.cc.

◆ u32()

void NetUnparser::u32 ( std::string s,
const uint32_t  val 
)
static

Write a 32-bit integer into the data stream in network byte order.

Definition at line 68 of file parser.cc.

◆ u8()

void NetUnparser::u8 ( std::string s,
const uint8_t  val 
)
static

Write an 8-bit integer into the data stream in network byte order.

Definition at line 72 of file parser.cc.


The documentation for this struct was generated from the following files: