A query on the implementation of TCP-Jersey in ns-3

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

A query on the implementation of TCP-Jersey in ns-3

Vivek Jain
Hello,

I am implementing TCP-Jersey [1] in ns-3. It's implementation requires
modification in ReceivedAck ( ) and DupAck ( ) methods of TcpSocketBase*.* I
think modifying them for a particular TCP extension is not a good idea. So
I thought of overriding these methods.

Is this a correct approach? Is there any better approach for doing this?

Thanks for your time.

Regards,
Vivek Jain

[1] Xu, K., Tian, Y., & Ansari, N. (2004). TCP-Jersey for wireless IP
communications. *IEEE Journal on selected areas in communications*, *22*(4),
747-756 (http://ieeexplore.ieee.org/abstract/document/1295061/)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: A query on the implementation of TCP-Jersey in ns-3

Natale Patriciello
Hi,

what version are we talking about?

In general, I think the best option is to add an optional
TcpCongestionOps method, make the TcpSocketBase call that method and
implement it in your congestion control.


Nat

On 08/03/17 at 08:32, Vivek Jain wrote:

> Hello,
>
> I am implementing TCP-Jersey [1] in ns-3. It's implementation requires
> modification in ReceivedAck ( ) and DupAck ( ) methods of TcpSocketBase*.* I
> think modifying them for a particular TCP extension is not a good idea. So
> I thought of overriding these methods.
>
> Is this a correct approach? Is there any better approach for doing this?
>
> Thanks for your time.
>
> Regards,
> Vivek Jain
>
> [1] Xu, K., Tian, Y., & Ansari, N. (2004). TCP-Jersey for wireless IP
> communications. *IEEE Journal on selected areas in communications*, *22*(4),
> 747-756 (http://ieeexplore.ieee.org/abstract/document/1295061/)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: A query on the implementation of TCP-Jersey in ns-3

Vivek Jain
Hello Natale,

Thanks for your response. I am using ns-3-dev.

With the suggested approach, the code in TcpSocketBase will look somewhat
similar to this:

void
TcpSocketBase::ProcessAck (...)
{
 ...
  if (TcpVariant == TcpJersey)
    {
      call DoProcessAck ();  // a new method for TcpJersey in
TcpCongestionOps
      return;
    }
  ...
}

Did I get you right?

Regards,
Vivek Jain

On Thu, Mar 9, 2017 at 12:12 AM, Natale Patriciello <
[hidden email]> wrote:

> Hi,
>
> what version are we talking about?
>
> In general, I think the best option is to add an optional
> TcpCongestionOps method, make the TcpSocketBase call that method and
> implement it in your congestion control.
>
>
> Nat
>
> On 08/03/17 at 08:32, Vivek Jain wrote:
> > Hello,
> >
> > I am implementing TCP-Jersey [1] in ns-3. It's implementation requires
> > modification in ReceivedAck ( ) and DupAck ( ) methods of
> TcpSocketBase*.* I
> > think modifying them for a particular TCP extension is not a good idea.
> So
> > I thought of overriding these methods.
> >
> > Is this a correct approach? Is there any better approach for doing this?
> >
> > Thanks for your time.
> >
> > Regards,
> > Vivek Jain
> >
> > [1] Xu, K., Tian, Y., & Ansari, N. (2004). TCP-Jersey for wireless IP
> > communications. *IEEE Journal on selected areas in communications*,
> *22*(4),
> > 747-756 (http://ieeexplore.ieee.org/abstract/document/1295061/)
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: A query on the implementation of TCP-Jersey in ns-3

Natale Patriciello
Hello Viviek,

No :)

First of all, we already have a method that gets called each time a segment
is acked (PktsAcked), so probably it's better to check if you can fit your
edits there. If not, what I'm suggesting is to add a virtual void method
that gets called every time. If a TcpCongestionOps subclass does not
implement it, then it will do nothing, but if it's implemented, then it's
used. For instance:


TcpCongestionOps
{

  /* optional, a subclass can even not implement it */
  virtual void AMethod () { }
}


YourCongestionOps : TcpCongestionOps
{
  virtual void AMethod { /* Do something */ }
}



TcpSocketBase::SomeMethod ()
{
....
  m_congControl->AMethod();
....
}


It would be even better if you can map what you want to do in one of the
already existing Linux callback for a congestion control algorithm module
(look for tcp_congestion_ops), and then port it on ns-3.

Nat

2017-03-09 6:17 GMT+01:00 Vivek Jain <[hidden email]>:

> Hello Natale,
>
> Thanks for your response. I am using ns-3-dev.
>
> With the suggested approach, the code in TcpSocketBase will look somewhat
> similar to this:
>
> void
> TcpSocketBase::ProcessAck (...)
> {
>  ...
>   if (TcpVariant == TcpJersey)
>     {
>       call DoProcessAck ();  // a new method for TcpJersey in
> TcpCongestionOps
>       return;
>     }
>   ...
> }
>
> Did I get you right?
>
> Regards,
> Vivek Jain
>
> On Thu, Mar 9, 2017 at 12:12 AM, Natale Patriciello <
> [hidden email]> wrote:
>
>> Hi,
>>
>> what version are we talking about?
>>
>> In general, I think the best option is to add an optional
>> TcpCongestionOps method, make the TcpSocketBase call that method and
>> implement it in your congestion control.
>>
>>
>> Nat
>>
>> On 08/03/17 at 08:32, Vivek Jain wrote:
>> > Hello,
>> >
>> > I am implementing TCP-Jersey [1] in ns-3. It's implementation requires
>> > modification in ReceivedAck ( ) and DupAck ( ) methods of
>> TcpSocketBase*.* I
>> > think modifying them for a particular TCP extension is not a good idea.
>> So
>> > I thought of overriding these methods.
>> >
>> > Is this a correct approach? Is there any better approach for doing this?
>> >
>> > Thanks for your time.
>> >
>> > Regards,
>> > Vivek Jain
>> >
>> > [1] Xu, K., Tian, Y., & Ansari, N. (2004). TCP-Jersey for wireless IP
>> > communications. *IEEE Journal on selected areas in communications*,
>> *22*(4),
>> > 747-756 (http://ieeexplore.ieee.org/abstract/document/1295061/)
>>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: A query on the implementation of TCP-Jersey in ns-3

Vivek Jain
Hi Natale,
I got it now, thank you very much!

I will get back if there are more queries.

Regards,
Vivek Jain

On Mar 9, 2017 1:37 PM, "Natale Patriciello" <[hidden email]>
wrote:

> Hello Viviek,
>
> No :)
>
> First of all, we already have a method that gets called each time a
> segment is acked (PktsAcked), so probably it's better to check if you can
> fit your edits there. If not, what I'm suggesting is to add a virtual void
> method that gets called every time. If a TcpCongestionOps subclass does not
> implement it, then it will do nothing, but if it's implemented, then it's
> used. For instance:
>
>
> TcpCongestionOps
> {
>
>   /* optional, a subclass can even not implement it */
>   virtual void AMethod () { }
> }
>
>
> YourCongestionOps : TcpCongestionOps
> {
>   virtual void AMethod { /* Do something */ }
> }
>
>
>
> TcpSocketBase::SomeMethod ()
> {
> ....
>   m_congControl->AMethod();
> ....
> }
>
>
> It would be even better if you can map what you want to do in one of the
> already existing Linux callback for a congestion control algorithm module
> (look for tcp_congestion_ops), and then port it on ns-3.
>
> Nat
>
> 2017-03-09 6:17 GMT+01:00 Vivek Jain <[hidden email]>:
>
>> Hello Natale,
>>
>> Thanks for your response. I am using ns-3-dev.
>>
>> With the suggested approach, the code in TcpSocketBase will look
>> somewhat similar to this:
>>
>> void
>> TcpSocketBase::ProcessAck (...)
>> {
>>  ...
>>   if (TcpVariant == TcpJersey)
>>     {
>>       call DoProcessAck ();  // a new method for TcpJersey in
>> TcpCongestionOps
>>       return;
>>     }
>>   ...
>> }
>>
>> Did I get you right?
>>
>> Regards,
>> Vivek Jain
>>
>> On Thu, Mar 9, 2017 at 12:12 AM, Natale Patriciello <
>> [hidden email]> wrote:
>>
>>> Hi,
>>>
>>> what version are we talking about?
>>>
>>> In general, I think the best option is to add an optional
>>> TcpCongestionOps method, make the TcpSocketBase call that method and
>>> implement it in your congestion control.
>>>
>>>
>>> Nat
>>>
>>> On 08/03/17 at 08:32, Vivek Jain wrote:
>>> > Hello,
>>> >
>>> > I am implementing TCP-Jersey [1] in ns-3. It's implementation requires
>>> > modification in ReceivedAck ( ) and DupAck ( ) methods of
>>> TcpSocketBase*.* I
>>> > think modifying them for a particular TCP extension is not a good
>>> idea. So
>>> > I thought of overriding these methods.
>>> >
>>> > Is this a correct approach? Is there any better approach for doing
>>> this?
>>> >
>>> > Thanks for your time.
>>> >
>>> > Regards,
>>> > Vivek Jain
>>> >
>>> > [1] Xu, K., Tian, Y., & Ansari, N. (2004). TCP-Jersey for wireless IP
>>> > communications. *IEEE Journal on selected areas in communications*,
>>> *22*(4),
>>> > 747-756 (http://ieeexplore.ieee.org/abstract/document/1295061/)
>>>
>>
>>
>
Loading...