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 * This program is free software; you can redistribute it and/or modify | 3 * This program is free software; you can redistribute it and/or modify |
4 * it under the terms of the GNU General Public License version 2 as | 4 * it under the terms of the GNU General Public License version 2 as |
5 * published by the Free Software Foundation; | 5 * published by the Free Software Foundation; |
6 * | 6 * |
7 * This program is distributed in the hope that it will be useful, | 7 * This program is distributed in the hope that it will be useful, |
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 * GNU General Public License for more details. | 10 * GNU General Public License for more details. |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 #include "ns3/callback.h" | 23 #include "ns3/callback.h" |
24 #include "ns3/traced-value.h" | 24 #include "ns3/traced-value.h" |
25 #include "ns3/tcp-socket.h" | 25 #include "ns3/tcp-socket.h" |
26 #include "ns3/ptr.h" | 26 #include "ns3/ptr.h" |
27 #include "ns3/ipv4-address.h" | 27 #include "ns3/ipv4-address.h" |
28 #include "ns3/inet-socket-address.h" | 28 #include "ns3/inet-socket-address.h" |
29 #include "ns3/event-id.h" | 29 #include "ns3/event-id.h" |
30 #include "tcp-typedefs.h" | 30 #include "tcp-typedefs.h" |
31 #include "pending-data.h" | 31 #include "pending-data.h" |
32 #include "sequence-number.h" | 32 #include "ns3/sequence-number.h" |
33 | 33 |
34 struct INetStreamSocket; | 34 struct INetStreamSocket; |
35 | 35 |
36 namespace ns3 { | 36 namespace ns3 { |
37 | 37 |
38 class Ipv4EndPoint; | 38 class Ipv4EndPoint; |
39 class Node; | 39 class Node; |
40 class Packet; | 40 class Packet; |
41 class NscTcpL4Protocol; | 41 class NscTcpL4Protocol; |
42 class TcpHeader; | 42 class TcpHeader; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 virtual int Connect(const Address &address); | 75 virtual int Connect(const Address &address); |
76 virtual int Listen(void); | 76 virtual int Listen(void); |
77 virtual uint32_t GetTxAvailable (void) const; | 77 virtual uint32_t GetTxAvailable (void) const; |
78 virtual int Send (Ptr<Packet> p, uint32_t flags); | 78 virtual int Send (Ptr<Packet> p, uint32_t flags); |
79 virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress); | 79 virtual int SendTo(Ptr<Packet> p, uint32_t flags, const Address &toAddress); |
80 virtual uint32_t GetRxAvailable (void) const; | 80 virtual uint32_t GetRxAvailable (void) const; |
81 virtual Ptr<Packet> Recv (uint32_t maxSize, uint32_t flags); | 81 virtual Ptr<Packet> Recv (uint32_t maxSize, uint32_t flags); |
82 virtual Ptr<Packet> RecvFrom (uint32_t maxSize, uint32_t flags, | 82 virtual Ptr<Packet> RecvFrom (uint32_t maxSize, uint32_t flags, |
83 Address &fromAddress); | 83 Address &fromAddress); |
84 virtual int GetSockName (Address &address) const;· | 84 virtual int GetSockName (Address &address) const;· |
| 85 virtual bool SetAllowBroadcast (bool allowBroadcast); |
| 86 virtual bool GetAllowBroadcast () const; |
85 | 87 |
86 private: | 88 private: |
87 void NSCWakeup(void); | 89 void NSCWakeup(void); |
88 friend class Tcp; | 90 friend class Tcp; |
89 // invoked by Tcp class | 91 // invoked by Tcp class |
90 int FinishBind (void); | 92 int FinishBind (void); |
91 void ForwardUp (Ptr<Packet> p, Ipv4Address saddr, Ipv4Address daddr, uint16_t
port); | 93 void ForwardUp (Ptr<Packet> p, Ipv4Header header, uint16_t port,· |
| 94 Ptr<Ipv4Interface> incomingInterface); |
92 void Destroy (void); | 95 void Destroy (void); |
93 //methods for state | 96 //methods for state |
94 bool SendPendingData(void); | 97 bool SendPendingData(void); |
95 bool ReadPendingData(void); | 98 bool ReadPendingData(void); |
96 bool Accept(void); | 99 bool Accept(void); |
97 void CompleteFork(void); | 100 void CompleteFork(void); |
98 void ConnectionSucceeded(); | 101 void ConnectionSucceeded(); |
99 | 102 |
100 // Manage data tx/rx | 103 // Manage data tx/rx |
101 // XXX This should be virtual and overridden | 104 // XXX This should be virtual and overridden |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 INetStreamSocket* m_nscTcpSocket; | 176 INetStreamSocket* m_nscTcpSocket; |
174 | 177 |
175 // Attributes | 178 // Attributes |
176 uint32_t m_sndBufSize; // buffer limit for the outgoing queue | 179 uint32_t m_sndBufSize; // buffer limit for the outgoing queue |
177 uint32_t m_rcvBufSize; // maximum receive socket buffer size | 180 uint32_t m_rcvBufSize; // maximum receive socket buffer size |
178 }; | 181 }; |
179 | 182 |
180 }//namespace ns3 | 183 }//namespace ns3 |
181 | 184 |
182 #endif /* NSC_TCP_SOCKET_IMPL_H */ | 185 #endif /* NSC_TCP_SOCKET_IMPL_H */ |
LEFT | RIGHT |