inet-framework / inet

INET Framework for the OMNeT++ discrete event simulator
https://inet.omnetpp.org
Other
442 stars 488 forks source link

Error and fix: "error: no member named 'ipprotocol' in 'inet::ProtocolGroup'" in the 4.5.2 INET version #975

Closed rezapajhouhesh closed 6 months ago

rezapajhouhesh commented 6 months ago

Hi, I use the INET 4.5.2 framework. In the following code: auto payloadProtocol = ProtocolGroup::ipprotocol.getProtocol(245); the compiler generate this error:

error: no member named 'ipprotocol' in 'inet::ProtocolGroup'

In the list of changes log, there is no explanation about it. Please explain, instead of the above command, what command should I write that is compatible with the 4.5.2 INET version and does the same thing. Thanks in advance

levy commented 6 months ago

I'm not sure why you would do this but you can use ProtocolGroup::getIpProtocolGroup() instead.