UdpSocketIo.multicastAddresses in INET not working as expected

16 views
Skip to first unread message

Fredrik Ekstedt Karpers

unread,
Jun 14, 2022, 8:18:48 AM6/14/22
to OMNeT++ Users
Hello

I'm trying to create a simple network with multicast, and the simplest route seemed to draw inspiration from the In-vehicle showcase network.

This in my INI file works fine (just like the showcase):
*.XXX3.numApps = 1
*.XXX3.app[0].typename = "UdpSinkApp"
*.XXX3.app[0].io.localPort = 1001
*.XXX3.app[0].io.multicastAddresses = ["224.0.0.42"]


But If I try to use several addresses for the same app, I get run-time errors
*.XXX3.numApps = 1
*.XXX3.app[0].typename = "UdpSinkApp"
*.XXX3.app[0].io.localPort = 1001
*.XXX3.app[0].io.multicastAddresses = ["224.0.0.42", "224.0.0.43"]


Error message:
getInterfaceById(): no interface with ID=-1 -- in module (inet::Udp) TSNsimulation.XXX3.udp (id=867), at t=0s, event #4

I'm not sure if I'm using it wrong, or if it doesn't work properly. But there is unfortunately no example network that uses this feature with more than one IP address (which I would expect it to work with, since the input is a list), so it's very hard for me to tell.

I can supply project files if you need to, but the in-vehicle showcase behaves the same way.

Thank you for your time and best regards

//Fredrik


Levente Mészáros

unread,
Jun 15, 2022, 3:03:49 AM6/15/22
to OMNeT++ Discussion List
Yes, you are right that this should work.

I guess it doesn't because the interface is not specified. Somewhere in the Udp module the join multicast address code path throws an exception (my guess is Udp.cc:460). You can clearly see this because it says 'no interface with ID=-1', but getInterfaceById() shouldn't be called with -1 in the first place. I'll forward this to my colleague to check what's the problem.

Meanwhile, you could try specifying the interface if that's possible?

Best regards,
levy

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/omnetpp/7b5dcaf3-a3f8-462a-89c2-875c69e0c0fen%40googlegroups.com.

Zoltán Böjthe

unread,
Jun 15, 2022, 6:30:43 AM6/15/22
to OMNeT++ Users

Fredrik Ekstedt Karpers

unread,
Jun 15, 2022, 10:55:04 AM6/15/22
to OMNeT++ Users
Thanks a lot for the speedy responses!

I copied the code from the commits and everything seems to behave as expected in my scenario.

Reply all
Reply to author
Forward
0 new messages