Sponge
CS144's user-space TCP library
libsponge
tcp_helpers
tcp_over_ip.hh
Go to the documentation of this file.
1
#ifndef SPONGE_LIBSPONGE_TCP_OVER_IP_HH
2
#define SPONGE_LIBSPONGE_TCP_OVER_IP_HH
3
4
#include "
buffer.hh
"
5
#include "
fd_adapter.hh
"
6
#include "
ipv4_datagram.hh
"
7
#include "
tcp_segment.hh
"
8
9
#include <optional>
10
12
class
TCPOverIPv4Adapter
:
public
FdAdapterBase
{
13
public
:
14
std::optional<TCPSegment>
unwrap_tcp_in_ip
(
const
InternetDatagram
&ip_dgram);
15
16
InternetDatagram
wrap_tcp_in_ip
(
TCPSegment
&seg);
17
};
18
19
#endif // SPONGE_LIBSPONGE_TCP_OVER_IP_HH
fd_adapter.hh
tcp_segment.hh
IPv4Datagram
IPv4 Internet datagram
Definition:
ipv4_datagram.hh:8
TCPOverIPv4Adapter::wrap_tcp_in_ip
InternetDatagram wrap_tcp_in_ip(TCPSegment &seg)
Definition:
tcp_over_ip.cc:75
ipv4_datagram.hh
buffer.hh
FdAdapterBase
Basic functionality for file descriptor adaptors.
Definition:
fd_adapter.hh:16
TCPOverIPv4Adapter
A converter from TCP segments to serialized IPv4 datagrams.
Definition:
tcp_over_ip.hh:12
TCPOverIPv4Adapter::unwrap_tcp_in_ip
std::optional< TCPSegment > unwrap_tcp_in_ip(const InternetDatagram &ip_dgram)
Definition:
tcp_over_ip.cc:26
TCPSegment
TCP segment
Definition:
tcp_segment.hh:10
Generated by
1.8.17