Sponge
CS144's user-space TCP library
Functions | Variables
parser_example.cc File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 if (out0 !=0x32||out1 !=val1||out2 !=val2||out3 !=val3||out4 !=val4)
 
buffer push_back (0x32)
 
u16 (buffer, val2)
 
u32 (buffer, val1)
 
u32 (buffer, val4)
 
u8 (buffer, val3)
 

Variables

std::string buffer
 
uint8_t out0 = p.u8()
 
uint32_t out1 = p.u32()
 
uint16_t out2 = p.u16()
 
uint8_t out3 = p.u8()
 
uint32_t out4 = p.u32()
 
const uint32_t val1 = 0xdeadbeef
 
const uint16_t val2 = 0xc0c0
 
const uint8_t val3 = 0xff
 
const uint32_t val4 = 0x0c05fefe
 

Function Documentation

◆ if()

if ( out0 = 0x32 || out1 != val1 || out2 != val2 || out3 != val3 || out4 != val4)

Definition at line 30 of file parser_example.cc.

◆ push_back()

buffer push_back ( 0x32  )

◆ u16()

p u16 ( buffer  ,
val2   
)

◆ u32() [1/2]

p u32 ( buffer  ,
val1   
)

◆ u32() [2/2]

p u32 ( buffer  ,
val4   
)

◆ u8()

p u8 ( buffer  ,
val3   
)

Variable Documentation

◆ buffer

std::string buffer

Definition at line 7 of file parser_example.cc.

◆ out0

out0 = p.u8()

Definition at line 18 of file parser_example.cc.

◆ out1

out1 = p.u32()

Definition at line 19 of file parser_example.cc.

◆ out2

out2 = p.u16()

Definition at line 20 of file parser_example.cc.

◆ out3

out3 = p.u8()

Definition at line 18 of file parser_example.cc.

◆ out4

out4 = p.u32()

Definition at line 19 of file parser_example.cc.

◆ val1

const uint32_t val1 = 0xdeadbeef

Definition at line 1 of file parser_example.cc.

◆ val2

const uint16_t val2 = 0xc0c0

Definition at line 2 of file parser_example.cc.

◆ val3

const uint8_t val3 = 0xff

Definition at line 3 of file parser_example.cc.

◆ val4

const uint32_t val4 = 0x0c05fefe

Definition at line 4 of file parser_example.cc.