Bug 2455

Summary: wscript is missing copy header stage for ipv4-end-point and similar files
Product: ns-3 Reporter: l.salameh
Component: internetAssignee: Tommaso Pecorella <tommaso.pecorella>
Status: RESOLVED INVALID    
Severity: normal CC: l.salameh, ns-bugs, tomh
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description l.salameh 2016-07-20 13:18:15 UTC
The wscript for the internet module should add the following files to its copy header stage:

ipv4-end-point.h
ipv6-end-point.h
ipv4-end-point-demux.h
ipv6-end-point-demux.h

The reason the code currently compiles is because we include "ipv4-end-point.h", and any file which includes "ns3/ipv4-end-point.h" will fail to compile.
Comment 1 Tommaso Pecorella 2016-07-22 08:13:45 UTC
Well, the point is exactly to *not* put them in the common headers, because these are implementation details.

Demuxes are (usually) only relevant inside the internet module itself.
If you can explain why an external module, or even a user script, could want to use the demuxes, I'll be more than happy to fix the wscript.

Thanks.
Comment 2 Tom Henderson 2016-07-26 17:33:09 UTC
(In reply to Tommaso Pecorella from comment #1)
> Well, the point is exactly to *not* put them in the common headers, because
> these are implementation details.
> 
> Demuxes are (usually) only relevant inside the internet module itself.
> If you can explain why an external module, or even a user script, could want
> to use the demuxes, I'll be more than happy to fix the wscript.
> 
> Thanks.

I agree, these were intended as internal headers, so let's agree on a use case to make them public before doing so.
Comment 3 l.salameh 2016-07-31 12:45:59 UTC
I guess they can remain private. I was working with some of the mptcp code, and had created a subdirectory called mptcp inside internet/model. When including ipv4-end-point.h for example, I thought it was cleaner to:

#include "ns3/ipv4-end-point.h"

rather than

#include "../ipv4-end-point.h"

But it's really not necessary to make them public. I thought maybe it was an accident they were private.
Comment 4 Tommaso Pecorella 2016-07-31 12:50:20 UTC
Nice to know.

Usually we don't use sub-victories inside modules. Perhaps that's the reason you don't see any use of includes with relative paths.

I'll close the bug then.

Cheers.

(In reply to l.salameh from comment #3)
> I guess they can remain private. I was working with some of the mptcp code,
> and had created a subdirectory called mptcp inside internet/model. When
> including ipv4-end-point.h for example, I thought it was cleaner to:
> 
> #include "ns3/ipv4-end-point.h"
> 
> rather than
> 
> #include "../ipv4-end-point.h"
> 
> But it's really not necessary to make them public. I thought maybe it was an
> accident they were private.