Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1115)

Unified Diff: src/internet/model/tcp-option.cc

Issue 283880043: SACK implementation
Patch Set: Fixing to ensure the patch can be applied on ns-3.24 Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/internet/model/tcp-option.h ('k') | src/internet/model/tcp-option-sack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/internet/model/tcp-option.cc
===================================================================
--- a/src/internet/model/tcp-option.cc
+++ b/src/internet/model/tcp-option.cc
@@ -22,6 +22,8 @@
#include "tcp-option-rfc793.h"
#include "tcp-option-winscale.h"
#include "tcp-option-ts.h"
+#include "tcp-option-sack-permitted.h"
+#include "tcp-option-sack.h"
#include "ns3/type-id.h"
#include "ns3/log.h"
@@ -71,11 +73,13 @@
static ObjectFactory objectFactory;
static kindToTid toTid[] =
{
- { TcpOption::END, TcpOptionEnd::GetTypeId () },
- { TcpOption::MSS, TcpOptionMSS::GetTypeId () },
- { TcpOption::NOP, TcpOptionNOP::GetTypeId () },
- { TcpOption::TS, TcpOptionTS::GetTypeId () },
- { TcpOption::WINSCALE, TcpOptionWinScale::GetTypeId () },
+ { TcpOption::END, TcpOptionEnd::GetTypeId () },
+ { TcpOption::MSS, TcpOptionMSS::GetTypeId () },
+ { TcpOption::NOP, TcpOptionNOP::GetTypeId () },
+ { TcpOption::TS, TcpOptionTS::GetTypeId () },
+ { TcpOption::WINSCALE, TcpOptionWinScale::GetTypeId () },
+ { TcpOption::SACKPERMITTED, TcpOptionSackPermitted::GetTypeId () },
+ { TcpOption::SACK, TcpOptionSack::GetTypeId () },
{ TcpOption::UNKNOWN, TcpOptionUnknown::GetTypeId () }
};
@@ -100,8 +104,10 @@
case NOP:
case MSS:
case WINSCALE:
+ case SACKPERMITTED:
+ case SACK:
case TS:
- // Do not add UNKNOWN here
+ // Do not add UNKNOWN here
return true;
}
@@ -161,7 +167,7 @@
i.WriteU8 (GetKind ());
i.WriteU8 (GetSerializedSize ());
- i.Write (m_content, m_size-2);
+ i.Write (m_content, m_size - 2);
}
uint32_t
@@ -179,7 +185,7 @@
return 0;
}
- i.Read (m_content, m_size-2);
+ i.Read (m_content, m_size - 2);
return m_size;
}
« no previous file with comments | « src/internet/model/tcp-option.h ('k') | src/internet/model/tcp-option-sack.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b