LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2007 Georgia Tech Research Corporation | 3 * Copyright (c) 2007 Georgia Tech Research Corporation |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 10 matching lines...) Expand all Loading... |
21 #define TCP_SOCKET_IMPL_H | 21 #define TCP_SOCKET_IMPL_H |
22 | 22 |
23 #include <stdint.h> | 23 #include <stdint.h> |
24 #include <queue> | 24 #include <queue> |
25 #include "ns3/callback.h" | 25 #include "ns3/callback.h" |
26 #include "ns3/traced-value.h" | 26 #include "ns3/traced-value.h" |
27 #include "ns3/tcp-socket.h" | 27 #include "ns3/tcp-socket.h" |
28 #include "ns3/ptr.h" | 28 #include "ns3/ptr.h" |
29 #include "ns3/ipv4-address.h" | 29 #include "ns3/ipv4-address.h" |
30 #include "ns3/event-id.h" | 30 #include "ns3/event-id.h" |
| 31 #include "ns3/ipv4-header.h" |
31 #include "ipv4-interface.h" | 32 #include "ipv4-interface.h" |
32 #include "tcp-typedefs.h" | 33 #include "tcp-typedefs.h" |
33 #include "pending-data.h" | 34 #include "pending-data.h" |
34 #include "sequence-number.h" | 35 #include "sequence-number.h" |
35 #include "rtt-estimator.h" | 36 #include "rtt-estimator.h" |
36 | 37 |
37 | 38 |
38 namespace ns3 { | 39 namespace ns3 { |
39 | 40 |
40 class Ipv4EndPoint; | 41 class Ipv4EndPoint; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 virtual Ptr<Packet> Recv (uint32_t maxSize, uint32_t flags); | 96 virtual Ptr<Packet> Recv (uint32_t maxSize, uint32_t flags); |
96 virtual Ptr<Packet> RecvFrom (uint32_t maxSize, uint32_t flags, | 97 virtual Ptr<Packet> RecvFrom (uint32_t maxSize, uint32_t flags, |
97 Address &fromAddress); | 98 Address &fromAddress); |
98 virtual int GetSockName (Address &address) const;· | 99 virtual int GetSockName (Address &address) const;· |
99 virtual void BindToNetDevice (Ptr<NetDevice> netdevice); | 100 virtual void BindToNetDevice (Ptr<NetDevice> netdevice); |
100 | 101 |
101 private: | 102 private: |
102 friend class Tcp; | 103 friend class Tcp; |
103 // invoked by Tcp class | 104 // invoked by Tcp class |
104 int FinishBind (void); | 105 int FinishBind (void); |
105 void ForwardUp (Ptr<Packet> p, Ipv4Address saddr, Ipv4Address daddr, uint16_t
port, | 106 void ForwardUp (Ptr<Packet> p, Ipv4Header header, uint16_t port, |
106 Ptr<Ipv4Interface> incomingInterface); | 107 Ptr<Ipv4Interface> incomingInterface); |
107 void Destroy (void); | 108 void Destroy (void); |
108 int DoSendTo (Ptr<Packet> p, const Address &daddr); | 109 int DoSendTo (Ptr<Packet> p, const Address &daddr); |
109 int DoSendTo (Ptr<Packet> p, Ipv4Address daddr, uint16_t dport); | 110 int DoSendTo (Ptr<Packet> p, Ipv4Address daddr, uint16_t dport); |
110 void SendEmptyPacket(uint8_t flags); | 111 void SendEmptyPacket(uint8_t flags); |
111 void SendRST(); | 112 void SendRST(); |
112 ·· | 113 ·· |
113 //methods for state | 114 //methods for state |
114 bool ProcessAction (Actions_t a); | 115 bool ProcessAction (Actions_t a); |
115 bool ProcessAction (Actions_t a, const TcpHeader& tcpHeader, | 116 bool ProcessAction (Actions_t a, const TcpHeader& tcpHeader, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 uint32_t m_cnCount; | 239 uint32_t m_cnCount; |
239 | 240 |
240 // Attributes | 241 // Attributes |
241 uint32_t m_sndBufSize; // buffer limit for the outgoing queue | 242 uint32_t m_sndBufSize; // buffer limit for the outgoing queue |
242 uint32_t m_rxBufMaxSize; // maximum receive socket buffer size | 243 uint32_t m_rxBufMaxSize; // maximum receive socket buffer size |
243 }; | 244 }; |
244 | 245 |
245 }//namespace ns3 | 246 }//namespace ns3 |
246 | 247 |
247 #endif /* TCP_SOCKET_IMPL_H */ | 248 #endif /* TCP_SOCKET_IMPL_H */ |
LEFT | RIGHT |