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

Ethernet frame. More...

#include <ethernet_frame.hh>

Public Member Functions

ParseResult parse (const Buffer buffer)
 Parse the frame from a string. More...
BufferList serialize () const
 Serialize the frame to a string. More...
const EthernetHeaderheader () const
EthernetHeaderheader ()
const BufferListpayload () const
BufferListpayload ()

Private Attributes

EthernetHeader _header {}
BufferList _payload {}

Detailed Description

Ethernet frame.

Definition at line 8 of file ethernet_frame.hh.

Member Function Documentation

◆ header() [1/2]

EthernetHeader& EthernetFrame::header ( )

Definition at line 23 of file ethernet_frame.hh.

◆ header() [2/2]

const EthernetHeader& EthernetFrame::header ( ) const

Definition at line 22 of file ethernet_frame.hh.

◆ parse()

ParseResult EthernetFrame::parse ( const Buffer  buffer)

Parse the frame from a string.

Definition at line 11 of file ethernet_frame.cc.

◆ payload() [1/2]

BufferList& EthernetFrame::payload ( )

Definition at line 26 of file ethernet_frame.hh.

◆ payload() [2/2]

const BufferList& EthernetFrame::payload ( ) const

Definition at line 25 of file ethernet_frame.hh.

◆ serialize()

BufferList EthernetFrame::serialize ( ) const

Serialize the frame to a string.

Definition at line 19 of file ethernet_frame.cc.

Member Data Documentation

◆ _header

EthernetHeader EthernetFrame::_header {}

Definition at line 10 of file ethernet_frame.hh.

◆ _payload

BufferList EthernetFrame::_payload {}

Definition at line 11 of file ethernet_frame.hh.

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