Faker, see my comments and questions inline. http://codereview.appspot.com/63068/diff/1/2 File src/helper/internet-stack-helper.cc (right): http://codereview.appspot.com/63068/diff/1/2#newcode237 Line 237: m_tcpFactory.Create<Object> ...
6 months, 1 week ago
Faker, see my comments and questions inline.
http://codereview.appspot.com/63068/diff/1/2
File src/helper/internet-stack-helper.cc (right):
http://codereview.appspot.com/63068/diff/1/2#newcode237
Line 237: m_tcpFactory.Create<Object> ()->AggregateObject (node);
please add a comment here why all other aggregations are of the form
node->AggregateObject (protocol) but here we have (TCP) factory->AggregateObject
(node)
http://codereview.appspot.com/63068/diff/1/3
File src/helper/internet-stack-helper.h (right):
http://codereview.appspot.com/63068/diff/1/3#newcode77
Line 77: * to be setup, please use instead the following SetTcp implementation.
what happens if a user mistakenly sets NSC with this function? Your reference
to "following" could be more specific by saying "the version that requires an
attribute" (or else do not overload SetTcp and instead call it
SetTcpWithAttribute()). Also, s/functions/function/
http://codereview.appspot.com/63068/diff/1/3#newcode95
Line 95: void SetTcp (std::string tid, std::string n0, const AttributeValue
&v0);
would be clearer to rename "n0" to something like "attr" (and "v0" to something
like "val")
http://codereview.appspot.com/63068/diff/1/10
File src/internet-stack/ipv4-l3-protocol.cc (right):
http://codereview.appspot.com/63068/diff/1/10#newcode163
Line 163: }
based on the doxygen, I expected to see some logic here to handle notifications
that a new L4 protocol has been aggregated.
http://codereview.appspot.com/63068/diff/1/17
File src/internet-stack/tcp-test.cc (right):
http://codereview.appspot.com/63068/diff/1/17#newcode6
Line 6: */
please add gpl and emacs mode line, and clarify whether this is for all Tcp
socket tests or just TcpSocketImpl
http://codereview.appspot.com/63068/diff/1/18
File src/internet-stack/udp-l4-protocol.cc (right):
http://codereview.appspot.com/63068/diff/1/18#newcode98
Line 98: }
It seems to me that this implementation relies on the aggregation being
performed in a specific order (Ipv4L3Protocol before UdpL4Protocol)-- is that
intended? The doxygen comments for all of these NotifyNewAggregate () functions
do not seem to me to be strictly correct; the doxygen suggests that other
objects will be notified of the existence of this new object, but instead what
seems to be going on is the new object is not notifying anyone but is just doing
the plumbing in this function. (perhaps I misunderstand what is intended)
http://codereview.appspot.com/63068/diff/1/21
File src/internet-stack/udp-test.cc (right):
http://codereview.appspot.com/63068/diff/1/21#newcode1
Line 1: #ifdef RUN_SELF_TESTS
GPL and emacs mode missing
On 2009/05/18 05:46:47, Tom H. wrote: > Faker, see my comments and questions inline. > ...
6 months, 1 week ago
On 2009/05/18 05:46:47, Tom H. wrote:
> Faker, see my comments and questions inline.
>
> http://codereview.appspot.com/63068/diff/1/2
> File src/helper/internet-stack-helper.cc (right):
>
> http://codereview.appspot.com/63068/diff/1/2#newcode237
> Line 237: m_tcpFactory.Create<Object> ()->AggregateObject (node);
> please add a comment here why all other aggregations are of the form
> node->AggregateObject (protocol) but here we have (TCP)
factory->AggregateObject
> (node)
>
> http://codereview.appspot.com/63068/diff/1/3
> File src/helper/internet-stack-helper.h (right):
>
> http://codereview.appspot.com/63068/diff/1/3#newcode77
> Line 77: * to be setup, please use instead the following SetTcp
implementation.
> what happens if a user mistakenly sets NSC with this function? Your reference
> to "following" could be more specific by saying "the version that requires an
> attribute" (or else do not overload SetTcp and instead call it
> SetTcpWithAttribute()). Also, s/functions/function/
>
> http://codereview.appspot.com/63068/diff/1/3#newcode95
> Line 95: void SetTcp (std::string tid, std::string n0, const AttributeValue
> &v0);
> would be clearer to rename "n0" to something like "attr" (and "v0" to
something
> like "val")
>
> http://codereview.appspot.com/63068/diff/1/10
> File src/internet-stack/ipv4-l3-protocol.cc (right):
>
> http://codereview.appspot.com/63068/diff/1/10#newcode163
> Line 163: }
> based on the doxygen, I expected to see some logic here to handle
notifications
> that a new L4 protocol has been aggregated.
>
> http://codereview.appspot.com/63068/diff/1/17
> File src/internet-stack/tcp-test.cc (right):
>
> http://codereview.appspot.com/63068/diff/1/17#newcode6
> Line 6: */
> please add gpl and emacs mode line, and clarify whether this is for all Tcp
> socket tests or just TcpSocketImpl
>
> http://codereview.appspot.com/63068/diff/1/18
> File src/internet-stack/udp-l4-protocol.cc (right):
>
> http://codereview.appspot.com/63068/diff/1/18#newcode98
> Line 98: }
> It seems to me that this implementation relies on the aggregation being
> performed in a specific order (Ipv4L3Protocol before UdpL4Protocol)-- is that
> intended? The doxygen comments for all of these NotifyNewAggregate ()
functions
> do not seem to me to be strictly correct; the doxygen suggests that other
> objects will be notified of the existence of this new object, but instead what
> seems to be going on is the new object is not notifying anyone but is just
doing
> the plumbing in this function. (perhaps I misunderstand what is intended)
>
> http://codereview.appspot.com/63068/diff/1/21
> File src/internet-stack/udp-test.cc (right):
>
> http://codereview.appspot.com/63068/diff/1/21#newcode1
> Line 1: #ifdef RUN_SELF_TESTS
> GPL and emacs mode missing
http://codereview.appspot.com/63068/diff/1/2 File src/helper/internet-stack-helper.cc (right): http://codereview.appspot.com/63068/diff/1/2#newcode237 Line 237: m_tcpFactory.Create<Object> ()->AggregateObject (node); I will inverse it to ...
Issue 63068: Moved the internet stack creation to the helper, refactor some functions and files and repla
Created 6 months, 2 weeks ago by faker.moatamri
Modified 3 months, 4 weeks ago
Reviewers: Tom Henderson
SVN Base:
Comments: 13