|
Bugzilla – Full Text Bug Listing |
| Summary: | ConfigStore Save + Load => Could not set default value for ns3::UdpSocketImpl::IcmpCallback | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Nicola Baldo <nicola> |
| Component: | config-store | Assignee: | Mitch Watrous <watrous> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | ns-3-dev | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Nicola Baldo
2012-06-26 12:45:26 UTC
Here are the attributes of interest for the UdpSocketImpl class:
.AddAttribute ("IcmpCallback", "Callback invoked whenever an icmp error is received on this socket.",
CallbackValue (),
MakeCallbackAccessor (&UdpSocketImpl::m_icmpCallback),
MakeCallbackChecker ())
.AddAttribute ("IcmpCallback6", "Callback invoked whenever an icmpv6 error is received on this socket.",
CallbackValue (),
MakeCallbackAccessor (&UdpSocketImpl::m_icmpCallback6),
MakeCallbackChecker ())
Default attribute values are currently stored as strings by the ConfigStore in the configuration file:
...
default ns3::ArpCache::MaxRetries "3"
default ns3::ArpCache::PendingQueueSize "3"
default ns3::UdpSocketImpl::IcmpCallback "0"
default ns3::UdpSocketImpl::IcmpCallback6 "0"
default ns3::UdpSocket::RcvBufSize "131072"
default ns3::UdpSocket::IpTtl "0"
...
In principle any arbitrary callback could be set as the default callback attribute, but there is no way to represent any arbitrary callback function as a string.
I propose that the writing and reading of default callback attributes should be disabled.
Bug fixed. ns-3-dev changeset: b5ef4158fb8f |