Dragos Ilie
unread,Oct 6, 2021, 9:13:16 AM10/6/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to omn...@googlegroups.com
Hi,
In inet-4.2.5 the calls to registerProtocol and registerService for MANET protocols used a nullptr for one of the arguments (2nd arg for registerService and 3rd arg for registerProtocol):
src/inet/routing/gpsr/Gpsr.cc: registerService(Protocol::manet, nullptr, gate("ipIn"));
src/inet/routing/gpsr/Gpsr.cc: registerProtocol(Protocol::manet, gate("ipOut"), nullptr);
src/inet/routing/dsdv/Dsdv.cc: registerService(Protocol::manet, nullptr, gate("ipIn"));
src/inet/routing/dsdv/Dsdv.cc: registerProtocol(Protocol::manet, gate("ipOut"), nullptr);
src/inet/routing/dymo/Dymo.cc: registerService(Protocol::manet, nullptr, gate("ipIn"));
src/inet/routing/dymo/Dymo.cc: registerProtocol(Protocol::manet, gate("ipOut"), nullptr);
In inet-4.3.2 the calls to registerService are not used anymore and the nullptr in registerProtocol has been replaced with a specific gate.
src/inet/routing/gpsr/Gpsr.cc: registerProtocol(Protocol::manet, gate("ipOut"), gate("ipIn"));
src/inet/routing/dsdv/Dsdv.cc: registerProtocol(Protocol::manet, gate("ipOut"), gate("ipIn"));
src/inet/routing/dymo/Dymo.cc: registerProtocol(Protocol::manet, gate("ipOut"), gate("ipIn"));
I had older code based on the APIs from v4.2.5 (with nullptr) that worked under v4.3.2. When I switched from Ieee80211ScalarRadio/Ieee80211MgmtAdhoc to AckingWirelessInterface the dispatcher could not forward incoming packets to IP layer because it could no find a manet handler.
I had to change the code from:
registerService(Protocol::manet, nullptr, gate("ipIn"));
registerProtocol(Protocol::manet, gate("ipOut"), nullptr);
to
registerService(Protocol::manet, gate("ipOut"), gate("ipIn"));
registerProtocol(Protocol::manet, gate("ipOut"), gate("ipIn"));
to make it work again.
Q1: Is the use of nullptr still valid under v4.3.2? If yes, what are the cases when the use of nullptr is desired for registerProtocol and registerService, respectively?
Q2: Why have the calls to registerService been removed from v4.3.2 fro MANET protocols? Does it make sense to use them in a MANET routing protocol?
Q3: Is Ieee80211ScalarRadio/Ieee80211MgmtAdhoc doing something special (in v4.3.2) that keeps the dispatcher happy when nullptr is used in the register* calls (unlike AckingWirelessInterface)?
DISCLAIMER: I have to admit that I don’t quite understand the register* API and I am mostly replicating what I see in existing examples. If there is more information available, please point me in the right direction.
Thanks,
Dragos