Tommaso Pecorella activity https://gitlab.com/tommypec 2026-03-20T00:29:46Z tag:gitlab.com,2026-03-20:5224329434 Tommaso Pecorella pushed to project branch master at Tommaso Pecorella / ns-3-dev 2026-03-20T00:29:46Z tommypec Tommaso Pecorella

Tommaso Pecorella (c5a591eb) at 20 Mar 00:29

internet: fix off-by-one in Icmpv4DestinationUnreachable and Icmpv4...

tag:gitlab.com,2026-03-20:5224315467 Tommaso Pecorella pushed to project branch master at nsnam / ns-3-dev 2026-03-20T00:19:29Z tommypec Tommaso Pecorella

Tommaso Pecorella (c5a591eb) at 20 Mar 00:19

internet: fix off-by-one in Icmpv4DestinationUnreachable and Icmpv4...

tag:gitlab.com,2026-03-20:5224315461 Tommaso Pecorella accepted merge request !2781: internet: fix off-by-one in ICMPv4 Print() formatting at nsnam / ns-3-dev 2026-03-20T00:19:29Z tommypec Tommaso Pecorella

While reviewing the ICMPv4 header formatting code, I noticed a small off-by-one condition in the Print() methods.

In both Icmpv4DestinationUnreachable::Print() and Icmpv4TimeExceeded::Print(), the code prints the 8 data bytes contained in the header using a loop (i = 0..7). The previous condition checked i != 8 before printing a separator space, which is always true for this loop and results in an extra trailing space after the last byte.

The condition is corrected to i != 7, ensuring spaces are printed only between bytes and not after the final element.

This change only affects debug / textual output formatting and does not alter packet semantics or simulation behavior.

tag:gitlab.com,2026-03-19:5224130548 Tommaso Pecorella commented on merge request !2792 at nsnam / ns-3-dev 2026-03-19T22:32:32Z tommypec Tommaso Pecorella

@das.manmita12 would it be possible to add a test for this behavior?

tag:gitlab.com,2026-03-19:5224125542 Tommaso Pecorella pushed to project branch master at Tommaso Pecorella / ns-3-dev 2026-03-19T22:29:41Z tommypec Tommaso Pecorella

Tommaso Pecorella (e84081c2) at 19 Mar 22:29

sixlowpan: Fix missing stdlib includes for Windows compatibility

... and 1 more commit

tag:gitlab.com,2026-03-19:5224122656 Tommaso Pecorella pushed to project branch fix/icmpv4-off-by-one-single at Urval Kheni / ns-3-dev 2026-03-19T22:28:29Z tommypec Tommaso Pecorella

Tommaso Pecorella (c5a591eb) at 19 Mar 22:28

internet: fix off-by-one in Icmpv4DestinationUnreachable and Icmpv4...

... and 2 more commits

tag:gitlab.com,2026-03-19:5224117430 Tommaso Pecorella pushed to project branch master at nsnam / ns-3-dev 2026-03-19T22:26:38Z tommypec Tommaso Pecorella

Tommaso Pecorella (e84081c2) at 19 Mar 22:26

sixlowpan: Fix missing stdlib includes for Windows compatibility

tag:gitlab.com,2026-03-19:5224117420 Tommaso Pecorella accepted merge request !2786: sixlowpan: Fix missing stdlib includes for Windows compatibility at nsnam / ns-3-dev 2026-03-19T22:26:38Z tommypec Tommaso Pecorella

Add explicit <algorithm>, <ios>, <list>, <map>, <unordered_map>, <utility>, and <vector> includes to sixlowpan-nd headers and sources. GCC/Clang pull these in transitively; MSVC does not.

tag:gitlab.com,2026-03-19:5224115983 Tommaso Pecorella pushed to project branch sixlowpan-missing-headers at Jie Qi Boh / ns-3-dev 2026-03-19T22:26:06Z tommypec Tommaso Pecorella

Tommaso Pecorella (e84081c2) at 19 Mar 22:26

sixlowpan: Fix missing stdlib includes for Windows compatibility

... and 1 more commit

tag:gitlab.com,2026-03-19:5224114017 Tommaso Pecorella pushed to project branch master at nsnam / ns-3-dev 2026-03-19T22:25:14Z tommypec Tommaso Pecorella

Tommaso Pecorella (2ea1a3c1) at 19 Mar 22:25

internet: Make Icmpv6L4Protocol::PROT_NUMBER constexpr for Windows ...

tag:gitlab.com,2026-03-19:5224114010 Tommaso Pecorella accepted merge request !2787: internet: Make Icmpv6L4Protocol::PROT_NUMBER constexpr for Windows DLL compatibility at nsnam / ns-3-dev 2026-03-19T22:25:14Z tommypec Tommaso Pecorella

static const data members are not auto-exported by CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS, causing linker failures when referenced across DLL boundaries. constexpr makes the value inline in the header, eliminating the cross-DLL symbol reference entirely.

tag:gitlab.com,2026-03-19:5220352350 Tommaso Pecorella pushed to project branch master at Tommaso Pecorella / ns-3-dev 2026-03-19T04:22:22Z tommypec Tommaso Pecorella

Tommaso Pecorella (1ae527b3) at 19 Mar 04:22

sixlowpan: Add 6LoWPAN-ND GSoC implementation

... and 1 more commit

tag:gitlab.com,2026-03-18:5219216962 Tommaso Pecorella pushed to project branch extend-SeqNum at Tommaso Pecorella / ns-3-dev 2026-03-18T19:33:54Z tommypec Tommaso Pecorella

Tommaso Pecorella (820cf3b7) at 18 Mar 19:33

more comments

... and 13 more commits

tag:gitlab.com,2026-03-18:5219214436 Tommaso Pecorella pushed to project branch fix/icmpv4-off-by-one-single at Urval Kheni / ns-3-dev 2026-03-18T19:32:58Z tommypec Tommaso Pecorella

Tommaso Pecorella (15b9c0ab) at 18 Mar 19:32

internet: fix off-by-one in Icmpv4DestinationUnreachable and Icmpv4...

... and 6 more commits

tag:gitlab.com,2026-03-18:5215932257 Tommaso Pecorella pushed to project branch master at Tommaso Pecorella / ns-3-dev 2026-03-18T06:56:51Z tommypec Tommaso Pecorella

Tommaso Pecorella (0740177d) at 18 Mar 06:56

build: Add extra presets

... and 1 more commit

tag:gitlab.com,2026-03-17:5215043481 Tommaso Pecorella pushed to project branch master at Tommaso Pecorella / ns-3-dev 2026-03-17T22:37:36Z tommypec Tommaso Pecorella

Tommaso Pecorella (bfaa28b9) at 17 Mar 22:37

wifi: (fixes #1318) Replace interference-helper std::find with std:...

... and 3 more commits

tag:gitlab.com,2026-03-17:5211622894 Tommaso Pecorella commented on merge request !2782 at nsnam / ns-3-dev 2026-03-17T08:52:42Z tommypec Tommaso Pecorella

grep -r " M_" src

It seems that we use:

  • M_1_PI (std::numbers::inv_pi)
  • M_PI, M_PI_2 and M_PI_4 (std::numbers::pi with eventual divisions, it's constexpr)
  • M_SQRT2 (std::numbers::sqrt2)
tag:gitlab.com,2026-03-16:5210349996 Tommaso Pecorella commented on merge request !2782 at nsnam / ns-3-dev 2026-03-16T23:07:30Z tommypec Tommaso Pecorella

Just a couple of suggestions:

  1. I'd split this into multiple commits, one per module (others might disagree).
  2. I'd avoid defining pi or PI when it's used only once - e.g. in src/uan/examples/uan-rc-example.cc. In this case I'd find acceptable to just use std::numbers::pi.
  3. Since we're at it, we could also substitute M_SQRT2 with std::numbers::sqrt2 and (possibly) other symbols. See for example https://en.cppreference.com/w/cpp/numeric/constants.html
tag:gitlab.com,2026-03-16:5210025486 Tommaso Pecorella approved merge request !2781: internet: fix off-by-one in ICMPv4 Print() formatting at nsnam / ns-3-dev 2026-03-16T20:42:58Z tommypec Tommaso Pecorella

While reviewing the ICMPv4 header formatting code, I noticed a small off-by-one condition in the Print() methods.

In both Icmpv4DestinationUnreachable::Print() and Icmpv4TimeExceeded::Print(), the code prints the 8 data bytes contained in the header using a loop (i = 0..7). The previous condition checked i != 8 before printing a separator space, which is always true for this loop and results in an extra trailing space after the last byte.

The condition is corrected to i != 7, ensuring spaces are printed only between bytes and not after the final element.

This change only affects debug / textual output formatting and does not alter packet semantics or simulation behavior.

tag:gitlab.com,2026-03-15:5205223973 Tommaso Pecorella commented on merge request !2781 at nsnam / ns-3-dev 2026-03-15T12:14:44Z tommypec Tommaso Pecorella

It would be useful to have an example of the output before and after the patch.