Sponge
CS144's user-space TCP library
Public Member Functions | Private Attributes | List of all members
IPv4Datagram Class Reference

IPv4 Internet datagram More...

#include <ipv4_datagram.hh>

Public Member Functions

ParseResult parse (const Buffer buffer)
 Parse the segment from a string. More...
 
BufferList serialize () const
 Serialize the segment to a string. More...
 
Accessors
const IPv4Headerheader () const
 
IPv4Headerheader ()
 
const BufferListpayload () const
 
BufferListpayload ()
 

Private Attributes

IPv4Header _header {}
 
BufferList _payload {}
 

Detailed Description

IPv4 Internet datagram

Definition at line 8 of file ipv4_datagram.hh.

Member Function Documentation

◆ header() [1/2]

IPv4Header& IPv4Datagram::header ( )
inline

Definition at line 23 of file ipv4_datagram.hh.

◆ header() [2/2]

const IPv4Header& IPv4Datagram::header ( ) const
inline

Definition at line 22 of file ipv4_datagram.hh.

◆ parse()

ParseResult IPv4Datagram::parse ( const Buffer  buffer)

Parse the segment from a string.

Definition at line 11 of file ipv4_datagram.cc.

◆ payload() [1/2]

BufferList& IPv4Datagram::payload ( )
inline

Definition at line 26 of file ipv4_datagram.hh.

◆ payload() [2/2]

const BufferList& IPv4Datagram::payload ( ) const
inline

Definition at line 25 of file ipv4_datagram.hh.

◆ serialize()

BufferList IPv4Datagram::serialize ( ) const

Serialize the segment to a string.

Definition at line 23 of file ipv4_datagram.cc.

Member Data Documentation

◆ _header

IPv4Header IPv4Datagram::_header {}
private

Definition at line 10 of file ipv4_datagram.hh.

◆ _payload

BufferList IPv4Datagram::_payload {}
private

Definition at line 11 of file ipv4_datagram.hh.


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