Prevent creation of faces to endpoints owned by NFD instance
Prevent creation of UDP broadcast faces (255.255.255.255 and
those belonging to machine's interfaces) in response to
face creation command
Sanity check configuration file port numbers in face manager
refs: #1414, #1427
Change-Id: Ia3f0a9337f3d97c34388773eab05bc39ad6dd804
GlobalConfigurationFixture uses unit-tests.conf to determine default
and module specific logging levels. Logging will gracefully default to
INFO if unit-tests.conf is not found. See unit-tests.conf.sample for a
sample configuration file.
refs: #1375, #1267
Change-Id: Ib0c4eb4149748e6658f94ef1afa23ddd3072c0fa
Refactor management protocol specific option types to ControlParameters
Add control parameter field enforcement
Add missing control response "success" message bodies
Update fib management protocol response codes and behavior
Merge local control header manager into face manager
Refactor references of nfd::LocalControlHeaderFeature enum to ndn::nfd::LocalControlFeature
Remove "control-header" privilege from default configuration
refs: #1397, #1399, #1400
Change-Id: Id042daf00b3cee1f1c7fa38d2e4a4ff6d95c15c6
Clang 3.3 complains about a "missing field initializer" for struct ifreq.
However, according to the standard, if there are fewer initializers in a
brace-enclosed list than there are elements or members of an aggregate,
the remainder of the aggregate shall be initialized implicitly as if they
were declared static, i.e. with zero or default-constructed value.
Therefore using "= {0}" is correct (and common practice in C). Emitting
a warning doesn't make sense. As a matter of fact recent GCC releases
disabled it.
Luckily this is C++ and we can simply use the "empty braces" initializer
(which wouldn't be valid C99 syntax) to silence the compiler.
Change-Id: Ibee8d17cc9b5d0eaa5270c52f3596b7994b5e911
Finally getting rid of EthernetFactory::findAllInterfaces()
and EthernetFace::getInterfaceAddress().
Change-Id: I94fe2016cc98778af3115569b1d21d5c48425d9c
This flags replaces isPermanent flag in datagram faces, but with the
reversed logic (isPermanent = !isOnDemand)
Change-Id: I37ba604e5f105ca95a79a08b8cfc3d640df8b412
Refs: #1376
This is a temporary hack to be able to receive NDN packets sent to
an Ethernet multicast address different from the broadcast address.
It'll be removed when task #1278 is properly implemented.
Change-Id: I87380637ef2993cf28889ab69f13dc8b75b9644e
In cases when UdpChannel dispatches received UDP packet to a newly
created UdpFace, the Channel failed to resume reception of datagram on
the channel.
Change-Id: If876dacc237bd0a6a660d4d88581959782dc349b
This method accepts parsed URI object and attempts to create Face on the
right channel (e.g., if hostname in URI resolved to IPv6, IPv6 TCP channel
will be used).
Factories that do not support 'createFace' operation will throw an exception.
As of this commit, *Factory::create methods are renamed to more explicit
*Factory::createChannel, and *Factory::connect to *Factory::createFace.
All other Factory-specific methods should denote what exactly is
created: channel, face, or multicast face.
Change-Id: I6396dc84c4cd8bbcdde9f55cfac90635d99e93e9
Refs: #1195
Base class is ProtocolFactory and implementations are TcpFactory,
UnixStreamFactory, EthernetFactory.
Since Factories are doing more than just creating channels (some can
create faces directly), more general name is more appropriate.
Change-Id: I3d6c2460a1b29e244f8462453720f4e7785893ca
Scheduler and time are imported from ndn-cpp-dev.
Forwarder is using the new scheduler API.
Face system is not transitioned yet.
refs #1290
Change-Id: I5679cb50bbf9890a105f663b038f13951403c2b6
boost::ip::address::is_loopback method appeared only in Boost 1.47.
This commit enables the same functionality for earlier versions of
boost, based on implementation in 1.55.
Change-Id: I571408fc7db44eebd14405e7b7a9810b5d061802
LocalControlHeader can only be used on faces that are derived from
LocalFace. UnixStreamFace is directly inherited from LocalFace,
TCP face has two specializations: generic TcpFace (strictly not local),
and LocalTcpFace.
refs #1213
Change-Id: I8a158c3bc4bb929eedd15757cfddecc0d1049f9f
Fixes a permission denied error when nfd is run as root and a non-root
application tries to communicate with it over a Unix face.
refs: #1272
Change-Id: I4ba60f9a9dfbec12d787424dff98f38b76b48cf0
This way the decision about the face locality has to be done explicitly
inside specific face implementation and potentially avoids problems.
Change-Id: I5219cce87385313546453d14a5a7ca4542893911
As recommended by boost::asio documentation.
Also refactor the shutdown logic into its own method.
Change-Id: I033de350a9cb659439034f7b5bb36031cda87a25