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

Issue 244350043: TcpL4Protocol improvements (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 10 months ago by n.p
Modified:
8 years, 5 months ago
Reviewers:
Tom Henderson
CC:
ns-3-reviews_googlegroups.com
Visibility:
Public.

Description

TcpL4Protocol improvements

Patch Set 1 #

Patch Set 2 : Fixed a bug in SendPacket #

Total comments: 17

Patch Set 3 : Fixed comments and improved debug messages in TcpSocketBase and TcpL4Protocol #

Unified diffs Side-by-side diffs Delta from patch set Stats (+548 lines, -549 lines) Patch
M src/internet/model/tcp-header.h View 1 2 4 chunks +15 lines, -6 lines 0 comments Download
M src/internet/model/tcp-header.cc View 1 2 4 chunks +13 lines, -6 lines 0 comments Download
M src/internet/model/tcp-l4-protocol.h View 1 2 6 chunks +160 lines, -88 lines 0 comments Download
M src/internet/model/tcp-l4-protocol.cc View 1 2 12 chunks +267 lines, -239 lines 0 comments Download
M src/internet/model/tcp-socket-base.h View 1 2 1 chunk +9 lines, -13 lines 0 comments Download
M src/internet/model/tcp-socket-base.cc View 1 2 21 chunks +84 lines, -197 lines 0 comments Download

Messages

Total messages: 6
n.p
8 years, 10 months ago (2015-06-14 16:49:27 UTC) #1
Tom Henderson
https://codereview.appspot.com/244350043/diff/20001/src/internet/model/tcp-l4-protocol.h File src/internet/model/tcp-l4-protocol.h (right): https://codereview.appspot.com/244350043/diff/20001/src/internet/model/tcp-l4-protocol.h#newcode94 src/internet/model/tcp-l4-protocol.h:94: I suggest to move the above two to private ...
8 years, 10 months ago (2015-06-17 14:30:51 UTC) #2
n.p
https://codereview.appspot.com/244350043/diff/20001/src/internet/model/tcp-l4-protocol.h File src/internet/model/tcp-l4-protocol.h (right): https://codereview.appspot.com/244350043/diff/20001/src/internet/model/tcp-l4-protocol.h#newcode94 src/internet/model/tcp-l4-protocol.h:94: On 2015/06/17 14:30:50, Tom Henderson wrote: > I suggest ...
8 years, 10 months ago (2015-06-18 10:57:34 UTC) #3
n.p
I've posted an update of this review request. In case it should be merged, I ...
8 years, 10 months ago (2015-06-18 13:03:15 UTC) #4
Tom Henderson
On 2015/06/18 10:57:34, n.p wrote: > https://codereview.appspot.com/244350043/diff/20001/src/internet/model/tcp-l4-protocol.h > File src/internet/model/tcp-l4-protocol.h (right): > > https://codereview.appspot.com/244350043/diff/20001/src/internet/model/tcp-l4-protocol.h#newcode94 > ...
8 years, 10 months ago (2015-06-23 13:48:50 UTC) #5
n.p
8 years, 10 months ago (2015-06-26 10:35:04 UTC) #6
On 2015/06/23 13:48:50, Tom Henderson wrote:
> Can we remove the other overloaded functions and just have one SendPacket()?
> 
> It is not a major point in this one instance, but it is somewhat against the
> ns-3 API style to provide lots of overloaded variants of methods with
different
> address classes, since the Address class is polymorphic.  See, for instance,
the
> Socket class which is declared only with class Address but which accepts
various
> different address types.

The two functions (ipv4 and ipv6 are there because the things that they should
do are different, and switching between them with a big if statement is not a
viable solution IMHO.

Anyway, I renamed them in SendPacketV4 and SendPacketV6 and make them private;
this way, only SendPacket (Address, Address) is public and compiler do not blame
for anything. To recap:

public:
void SendPacket (Ptr<Packet> pkt, const TcpHeader &outgoing,
                   const Address &saddr, const Address &daddr,
                   Ptr<NetDevice> oif = 0) const

private:

void SendPacketV4 (Ptr<Packet> pkt, const TcpHeader &outgoing,
                   const Ipv4Address &saddr, const Ipv4Address &daddr,
                   Ptr<NetDevice> oif = 0) const


void SendPacketV6 (Ptr<Packet> pkt, const TcpHeader &outgoing,
                   const Ipv6Address &saddr, const Ipv6Address &daddr,
                   Ptr<NetDevice> oif = 0) const
Sign in to reply to this message.

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