From cdea454aa355bd4a0c382b7ace8eaadc5a6a5558 Mon Sep 17 00:00:00 2001 From: Vivek Jain Date: Thu, 30 Jan 2020 19:26:46 -0600 Subject: [PATCH] tcp: (merges !180) Use forward declaration wherever possible --- src/internet/model/tcp-congestion-ops.h | 4 ++-- src/internet/model/tcp-highspeed.cc | 2 ++ src/internet/model/tcp-highspeed.h | 5 +++-- src/internet/model/tcp-htcp.h | 5 +++-- src/internet/model/tcp-hybla.cc | 3 ++- src/internet/model/tcp-hybla.h | 5 +++-- src/internet/model/tcp-illinois.cc | 2 ++ src/internet/model/tcp-illinois.h | 5 +++-- src/internet/model/tcp-ledbat.cc | 4 +++- src/internet/model/tcp-ledbat.h | 6 ++++-- src/internet/model/tcp-lp.cc | 3 ++- src/internet/model/tcp-lp.h | 6 ++++-- src/internet/model/tcp-prr-recovery.cc | 3 ++- src/internet/model/tcp-recovery-ops.cc | 1 + src/internet/model/tcp-scalable.cc | 2 ++ src/internet/model/tcp-scalable.h | 5 +++-- src/internet/model/tcp-vegas.cc | 2 ++ src/internet/model/tcp-vegas.h | 5 +++-- src/internet/model/tcp-veno.cc | 2 ++ src/internet/model/tcp-veno.h | 5 +++-- 20 files changed, 51 insertions(+), 24 deletions(-) diff --git a/src/internet/model/tcp-congestion-ops.h b/src/internet/model/tcp-congestion-ops.h index 682af6b80..6a4e54193 100644 --- a/src/internet/model/tcp-congestion-ops.h +++ b/src/internet/model/tcp-congestion-ops.h @@ -19,8 +19,8 @@ #ifndef TCPCONGESTIONOPS_H #define TCPCONGESTIONOPS_H -#include "ns3/tcp-socket-state.h" -#include "ns3/tcp-rate-ops.h" +#include "tcp-rate-ops.h" +#include "tcp-socket-state.h" namespace ns3 { diff --git a/src/internet/model/tcp-highspeed.cc b/src/internet/model/tcp-highspeed.cc index 85ffa3e4b..75e6ac3e6 100644 --- a/src/internet/model/tcp-highspeed.cc +++ b/src/internet/model/tcp-highspeed.cc @@ -18,6 +18,8 @@ */ #include "tcp-highspeed.h" +#include "tcp-socket-state.h" + #include "ns3/log.h" namespace ns3 { diff --git a/src/internet/model/tcp-highspeed.h b/src/internet/model/tcp-highspeed.h index c65ff3a80..14498bec3 100644 --- a/src/internet/model/tcp-highspeed.h +++ b/src/internet/model/tcp-highspeed.h @@ -20,11 +20,12 @@ #ifndef TCPHIGHSPEED_H #define TCPHIGHSPEED_H -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" +#include "tcp-congestion-ops.h" namespace ns3 { +class TcpSocketState; + /** * \ingroup congestionOps * diff --git a/src/internet/model/tcp-htcp.h b/src/internet/model/tcp-htcp.h index ea19c31c7..e09c00418 100644 --- a/src/internet/model/tcp-htcp.h +++ b/src/internet/model/tcp-htcp.h @@ -27,11 +27,12 @@ #ifndef TCP_HTCP_H #define TCP_HTCP_H -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" +#include "tcp-congestion-ops.h" namespace ns3 { +class TcpSocketState; + /** * \ingroup congestionOps * diff --git a/src/internet/model/tcp-hybla.cc b/src/internet/model/tcp-hybla.cc index 5c7213189..fdf0f93c6 100644 --- a/src/internet/model/tcp-hybla.cc +++ b/src/internet/model/tcp-hybla.cc @@ -18,8 +18,9 @@ */ #include "tcp-hybla.h" +#include "tcp-socket-state.h" + #include "ns3/log.h" -#include "ns3/tcp-socket-base.h" namespace ns3 { diff --git a/src/internet/model/tcp-hybla.h b/src/internet/model/tcp-hybla.h index 68561679e..a3318f45a 100644 --- a/src/internet/model/tcp-hybla.h +++ b/src/internet/model/tcp-hybla.h @@ -19,12 +19,13 @@ #ifndef TCPHYBLA_H #define TCPHYBLA_H -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" +#include "tcp-congestion-ops.h" #include "ns3/traced-value.h" namespace ns3 { +class TcpSocketState; + /** * \ingroup congestionOps * diff --git a/src/internet/model/tcp-illinois.cc b/src/internet/model/tcp-illinois.cc index de2c7f364..e940eba45 100644 --- a/src/internet/model/tcp-illinois.cc +++ b/src/internet/model/tcp-illinois.cc @@ -27,6 +27,8 @@ #include "tcp-illinois.h" +#include "tcp-socket-state.h" + #include "ns3/log.h" namespace ns3 { diff --git a/src/internet/model/tcp-illinois.h b/src/internet/model/tcp-illinois.h index 90ac5e573..486fefb24 100644 --- a/src/internet/model/tcp-illinois.h +++ b/src/internet/model/tcp-illinois.h @@ -28,11 +28,12 @@ #ifndef TCPILLINOIS_H #define TCPILLINOIS_H -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" +#include "tcp-congestion-ops.h" namespace ns3 { +class TcpSocketState; + /** * \ingroup congestionOps * diff --git a/src/internet/model/tcp-ledbat.cc b/src/internet/model/tcp-ledbat.cc index 69d51128a..52eb4179f 100644 --- a/src/internet/model/tcp-ledbat.cc +++ b/src/internet/model/tcp-ledbat.cc @@ -20,8 +20,10 @@ */ #include "tcp-ledbat.h" +#include "tcp-socket-state.h" + #include "ns3/log.h" -#include "ns3/simulator.h" +#include "ns3/simulator.h" // Now () namespace ns3 { diff --git a/src/internet/model/tcp-ledbat.h b/src/internet/model/tcp-ledbat.h index 5e06298ef..494ea8f78 100644 --- a/src/internet/model/tcp-ledbat.h +++ b/src/internet/model/tcp-ledbat.h @@ -22,12 +22,14 @@ #ifndef TCP_LEDBAT_H #define TCP_LEDBAT_H +#include "tcp-congestion-ops.h" + #include -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" namespace ns3 { +class TcpSocketState; + /** * \ingroup congestionOps * diff --git a/src/internet/model/tcp-lp.cc b/src/internet/model/tcp-lp.cc index 9b4e202b6..8020967a2 100644 --- a/src/internet/model/tcp-lp.cc +++ b/src/internet/model/tcp-lp.cc @@ -22,8 +22,9 @@ */ #include "tcp-lp.h" -#include "ns3/tcp-socket-base.h" + #include "ns3/log.h" +#include "ns3/simulator.h" namespace ns3 { diff --git a/src/internet/model/tcp-lp.h b/src/internet/model/tcp-lp.h index d15ec17e7..d659ba702 100644 --- a/src/internet/model/tcp-lp.h +++ b/src/internet/model/tcp-lp.h @@ -24,12 +24,14 @@ #ifndef TCPLP_H #define TCPLP_H -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" +#include "tcp-congestion-ops.h" + #include "ns3/traced-value.h" namespace ns3 { +class TcpSocketState; + class TcpLp : public TcpNewReno { public: diff --git a/src/internet/model/tcp-prr-recovery.cc b/src/internet/model/tcp-prr-recovery.cc index a43b4fabc..00b0b5a66 100644 --- a/src/internet/model/tcp-prr-recovery.cc +++ b/src/internet/model/tcp-prr-recovery.cc @@ -22,7 +22,8 @@ */ #include "tcp-prr-recovery.h" -#include "ns3/tcp-congestion-ops.h" +#include "tcp-socket-state.h" + #include "ns3/log.h" namespace ns3 { diff --git a/src/internet/model/tcp-recovery-ops.cc b/src/internet/model/tcp-recovery-ops.cc index c80c31496..90020a5eb 100644 --- a/src/internet/model/tcp-recovery-ops.cc +++ b/src/internet/model/tcp-recovery-ops.cc @@ -22,6 +22,7 @@ */ #include "tcp-recovery-ops.h" #include "tcp-socket-state.h" + #include "ns3/log.h" namespace ns3 { diff --git a/src/internet/model/tcp-scalable.cc b/src/internet/model/tcp-scalable.cc index f765f52d1..95b08252d 100644 --- a/src/internet/model/tcp-scalable.cc +++ b/src/internet/model/tcp-scalable.cc @@ -28,6 +28,8 @@ */ #include "tcp-scalable.h" +#include "tcp-socket-state.h" + #include "ns3/log.h" namespace ns3 { diff --git a/src/internet/model/tcp-scalable.h b/src/internet/model/tcp-scalable.h index bda66ed0e..1ddc6f08c 100644 --- a/src/internet/model/tcp-scalable.h +++ b/src/internet/model/tcp-scalable.h @@ -30,11 +30,12 @@ #ifndef TCPSCALABLE_H #define TCPSCALABLE_H -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" +#include "tcp-congestion-ops.h" namespace ns3 { +class TcpSocketState; + /** * \ingroup congestionOps * diff --git a/src/internet/model/tcp-vegas.cc b/src/internet/model/tcp-vegas.cc index a97f8773a..31cf1cb3d 100644 --- a/src/internet/model/tcp-vegas.cc +++ b/src/internet/model/tcp-vegas.cc @@ -25,6 +25,8 @@ */ #include "tcp-vegas.h" +#include "tcp-socket-state.h" + #include "ns3/log.h" namespace ns3 { diff --git a/src/internet/model/tcp-vegas.h b/src/internet/model/tcp-vegas.h index d092af0ab..3fa0952c8 100644 --- a/src/internet/model/tcp-vegas.h +++ b/src/internet/model/tcp-vegas.h @@ -27,11 +27,12 @@ #ifndef TCPVEGAS_H #define TCPVEGAS_H -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" +#include "tcp-congestion-ops.h" namespace ns3 { +class TcpSocketState; + /** * \ingroup congestionOps * diff --git a/src/internet/model/tcp-veno.cc b/src/internet/model/tcp-veno.cc index fa318bffd..1843ea96e 100644 --- a/src/internet/model/tcp-veno.cc +++ b/src/internet/model/tcp-veno.cc @@ -25,6 +25,8 @@ */ #include "tcp-veno.h" +#include "tcp-socket-state.h" + #include "ns3/log.h" namespace ns3 { diff --git a/src/internet/model/tcp-veno.h b/src/internet/model/tcp-veno.h index dbd76ad79..642c1e037 100644 --- a/src/internet/model/tcp-veno.h +++ b/src/internet/model/tcp-veno.h @@ -27,11 +27,12 @@ #ifndef TCPVENO_H #define TCPVENO_H -#include "ns3/tcp-congestion-ops.h" -#include "ns3/tcp-recovery-ops.h" +#include "tcp-congestion-ops.h" namespace ns3 { +class TcpSocketState; + /** * \ingroup congestionOps *