merge new TCP code

This commit is contained in:
Josh Pelkey committed 2010-12-17 13:57:22 -05:00
1 parent a650f91b57
commit da85b34487
35 files changed
+4397 -2548

No files matched your search

+1 -1
View File
@@ -176,7 +176,7 @@ SimpleNetDevice::GetMulticast (Ipv4Address multicastGroup) const
Address SimpleNetDevice::GetMulticast (Ipv6Address addr) const
{
return Mac48Address::GetMulticast (addr);
return Mac48Address::GetMulticast (addr);
}
bool
+9 -1
View File
@@ -32,6 +32,8 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (TcpSocket);
const char* const TcpSocket::TcpStateName[LAST_STATE] = {"CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "CLOSE_WAIT", "LAST_ACK", "FIN_WAIT_1", "FIN_WAIT_2", "CLOSING", "TIME_WAIT" };
TypeId
TcpSocket::GetTypeId (void)
{
@@ -83,7 +85,7 @@ TcpSocket::GetTypeId (void)
"Timeout value for TCP delayed acks, in seconds",
TimeValue (Seconds (0.2)),
MakeTimeAccessor (&TcpSocket::GetDelAckTimeout,
&TcpSocket::SetDelAckTimeout),
&TcpSocket::SetDelAckTimeout),
MakeTimeChecker ())
.AddAttribute ("DelAckCount",
"Number of packets to wait before sending a TCP ack",
@@ -91,6 +93,12 @@ TcpSocket::GetTypeId (void)
MakeUintegerAccessor (&TcpSocket::GetDelAckMaxCount,
&TcpSocket::SetDelAckMaxCount),
MakeUintegerChecker<uint32_t> ())
.AddAttribute ("PersistTimeout",
"Persist timeout to probe for rx window",
TimeValue (Seconds (6)),
MakeTimeAccessor (&TcpSocket::GetPersistTimeout,
&TcpSocket::SetPersistTimeout),
MakeTimeChecker ())
;
return tid;
}
+20
View File
@@ -35,6 +35,21 @@ namespace ns3 {
class Node;
class Packet;
/* Names of the 11 TCP states */
typedef enum {
CLOSED, // 0
LISTEN, // 1
SYN_SENT, // 2
SYN_RCVD, // 3
ESTABLISHED, // 4
CLOSE_WAIT, // 5
LAST_ACK, // 6
FIN_WAIT_1, // 7
FIN_WAIT_2, // 8
CLOSING, // 9
TIME_WAIT, // 10
LAST_STATE } TcpStates_t;
/**
* \ingroup socket
*
@@ -51,6 +66,9 @@ public:
TcpSocket (void);
virtual ~TcpSocket (void);
// Literal names of TCP states for use in log messages */
static const char* const TcpStateName[LAST_STATE];
private:
// Indirect the attribute setting and getting through private virtual methods
virtual void SetSndBufSize (uint32_t size) = 0;
@@ -71,6 +89,8 @@ private:
virtual Time GetDelAckTimeout (void) const = 0;
virtual void SetDelAckMaxCount (uint32_t count) = 0;
virtual uint32_t GetDelAckMaxCount (void) const = 0;
virtual void SetPersistTimeout (Time timeout) = 0;
virtual Time GetPersistTimeout (void) const = 0;
};