Commit Graph
87 Commits
Author SHA1 Message Date
Steve DiBenedetto ef04f27892 face, mgmt: add channel status dataset publisher
Expose channel maps in protocol factories

Change-Id: I057b1bba638bfc9372867318653d71ba7d0e9888
Refs: #1631, #1653
2014-06-13 11:30:36 -07:00
Junxiao Shi 08d07a764e face: avoid multiple onFail events
refs #1497

Change-Id: I8fda3fea5cd8a314b30eef45da104109e9748afc
2014-06-10 20:41:42 -07:00
Alexander Afanasyev c87bbf8d7f face: "Closing" WebSocket face when WebSocket tunnel closes
Change-Id: Ief2d643b09469eac7fc92aa5139e41bcb8d1e210
Refs: #1637
2014-06-06 07:36:54 +03:00
Alexander Afanasyev 5959b014c5 mgmt: Reinitialize multicast faces and partially reload config file on HUP signal
The following elements from the config file are reloaded:
- effective user/group
- log levels
- multicast faces (enable/disable)
- security

Change-Id: I6ddf124702b30610dd0404d8fbaa9a9d800f02bf
Refs: #1584
2014-06-04 09:15:03 +03:00
Alexander Afanasyev 251f3c1317 face: fire onFail event on WebSocket and Ethernet face close
Change-Id: I3d24c7b2e5003253ff04dab68ec1a2cb37b7d023
Refs: #1637
2014-06-03 18:37:04 +03:00
Alexander Afanasyev f4e89b4000 src: Small improvements
Change-Id: I9850cd6ec2330482915f815d94a2ac2ccaeae7f1
2014-05-31 15:54:18 +03:00
Alexander Afanasyev f6980284e6 src: Remove unnecessary uses of boost::cref in make_shared and replace boost::cref/boost::ref with just cref/ref
In some cases, due to argument-dependent lookup, it is necessary to use
ndn::ref, instead of just ref.

Change-Id: I682180a007609535855f77511b49622154ad4f11
Refs: #1591
2014-05-15 09:52:28 -07:00
Davide Pesavento f0ae4421a6 face: enable immediate mode for packet capture on EthernetFace.
Fixes #1511

Change-Id: I6551de8d650c5d14e27713258d958ac3c77a1649
2014-05-08 17:16:43 -07:00
Wentao Shang 53df163b62 face: Implement WebSocket channel, face, and factory.
Change-Id: Ic4dbb1abdbbdbec028746ba14b11be8ab9cc1edb
Refs: #1468
2014-05-08 17:16:43 -07:00
Alexander Afanasyev 650028d5c5 face: Gracefully handle tlv::Error when received TLV block is malformed
Change-Id: I954b13d0e26fec7bc7fe23edcbc015dfac654ef8
Refs: #1494
2014-04-25 22:55:24 -07:00
Alexander Afanasyev 4a77136894 build: == Dependency change == NFD now depends on ndn-cxx library
Change-Id: Ia9dd324a536573b5ac4fe1b73d82af772dc84923
Refs: #1536
2014-04-25 10:09:23 -07:00
Alexander Afanasyev 85b6b01af5 core: Adding workaround for missing <byteswap.h> on FreeBSD
This commit also fixes a couple of compilation issues with gcc 4.2.1

Change-Id: Iacc5a742b666849694b6ee947482e78340f74336
2014-04-21 20:55:35 -07:00
Giulio Grassi 6d7176dc43 face: bugfix of MulticastUdpFace receiving packets from all available NICs on Linux
Now on Linux the creation of MulticastUdpFace requires
CAP_NET_RAW capability if the name of the interface is specified

Change-Id: Iff53035371fb26c6ee40e1065a0935e5ed16dc60
Refs: #1475
2014-04-18 00:13:05 +02:00
Alexander Afanasyev 613e2a9ba3 src: Reorganizing source code in preparation to merge NRD code
Note that as of this commit, there are several changes in location of
compiled binaries in `build/` folder:

* `nfd` has been moved to `build/bin/nfd`
* `unit-tests` has been split into `unit-tests-core` and `unit-tests-daemon`

Change-Id: I2c830c117879edbaa5457d6423c13f0273285919
Refs: #1486
2014-04-16 11:54:35 -07:00
Davide Pesavento e22d8c8495 face: UnixStreamChannel: improved handling of existing socket files.
Add logic to prevent accidental removal of a socket file that belongs
to another (still running) NFD process.

Refs: #1360, #1367

Change-Id: Ibf755cd55e27f5a4cf165a0fbcdbf01fdb33005a
2014-04-15 04:46:37 +02:00
Alexander Afanasyev 885a85bf90 build+face: Fixing regression that broke ethernet support
As of this commit, libpcap is required unless specifically disabled
using --without-libpcap parameter during configure stage.

Change-Id: Iec6f8bd9babfe4da193c98a49043b08319311106
Refs: #1472
2014-04-13 21:15:31 -07:00
Davide Pesavento 1bdef28419 build: update default CXXFLAGS.
* Add -std=c++03 and -pedantic, and fix the resulting warnings. The
  long-long-int warning is explicitly suppressed because it's not
  trivial to workaround in a platform-independent and ISO-conformant
  way without using C++11.

* Initial support for building with -std=c++11 (experimental).

* Prefer -Og optimization level in debug builds if supported by the
  compiler.

Change-Id: I744a25c8b52842dc3ea3a733d6ab2fa66171e6f8
2014-04-10 15:07:00 -07:00
Davide Pesavento edae353eae face: change default separator for ethernet::Address::toString() to ':'
Change-Id: I4c8d2e90bd0279cc6221ec58790de19d656f4ca3
2014-04-10 04:16:19 +02:00
Alexander Afanasyev 9bcbc7c130 docs: Update of copyright and license statement in all .hpp and .cpp files
Change-Id: I4082db67f2390482615a780d91a513f09d57a9a4
Refs: #1266
2014-04-07 09:18:25 -07:00
Steve DiBenedetto ca53ac6b00 face, mgmt: improve face creation failure and bad URI handling
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
2014-04-06 10:54:20 -07:00
Junxiao Shi 6e69432262 face/mgmt/fw/tools: add localUri to FaceStatus and FaceEventNotification
refs #1396

Change-Id: I6084745c62c44a409ecbd4a795cb712475e32416
2014-04-03 10:27:13 -07:00
Junxiao Shi 79494164c3 face: Face::getLocalUri
refs #1396

Change-Id: Icf02ae0a4136b6da3f6388cdce2f861bec44e940
2014-04-02 18:43:01 -07:00
Steve DiBenedetto bf6a93da4e core: change logging from environment variable to configuration file-based
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
2014-03-31 20:46:51 -06:00
Junxiao Shi 98e29f4731 core: delete deprecated getGlobalScheduler() API
refs #1290

Change-Id: If994e3bd303f0788d8e945351c182bbd4ab5e0b2
2014-03-31 10:27:26 -07:00
Steve DiBenedetto 7564d97d13 mgmt: refactor management modules to conform to NFD Management Protocol
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
2014-03-25 17:46:31 -06:00
Alexander Afanasyev 53a6fd33b9 face: Implementing forgotten isListening() feature in TcpChannel
Change-Id: Idfcd8337d16b414d2f739f936660dffdce413729
2014-03-24 17:01:45 -07:00
Alexander Afanasyev 5a8d8d848c face: Remove reliance on exceptions during TLV decoding
Change-Id: I8e96cc9369a5702805d3856ce70dfbe64834e1df
Refs: #1379
2014-03-22 17:27:15 -07:00
Davide Pesavento e4631003a9 face: silence silly warning thrown by clang.
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
2014-03-21 15:44:42 -07:00
Davide Pesavento d8d4d98656 face: delete redundant protocol typedefs.
Change-Id: I32e1100e7395070a29ee813658aac82b63b6c4f2
2014-03-21 23:34:33 +01:00
Davide Pesavento 73c65d7bae face: mark UnixStreamFace constructor explicit.
The keyword was accidentally removed in commit
355c066fe1.

Change-Id: I1e345cf5ccb1d5ddc56419fb19493eb446590880
2014-03-21 18:08:59 +01:00
Davide Pesavento b60cc1298d face: use NetworkInterfaceInfo directly in EthernetFace.
Finally getting rid of EthernetFactory::findAllInterfaces()
and EthernetFace::getInterfaceAddress().

Change-Id: I94fe2016cc98778af3115569b1d21d5c48425d9c
2014-03-20 21:07:22 -07:00
Alexander Afanasyev 355c066fe1 face: Implementing new "isOnDemand" flag
This flags replaces isPermanent flag in datagram faces, but with the
reversed logic (isPermanent = !isOnDemand)

Change-Id: I37ba604e5f105ca95a79a08b8cfc3d640df8b412
Refs: #1376
2014-03-20 18:10:44 -07:00
Alexander Afanasyev eb3197fa35 all: Update code to compile with latest time-related changes in ndn-cpp-dev library
Change-Id: I7e859989c833001f49b286d4a9917f4dc740b4a4
2014-03-18 17:34:12 -07:00
Davide Pesavento 9eaeac7716 face: enable promiscuous mode in Ethernet face.
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
2014-03-15 10:18:33 +01:00
Alexander Afanasyev eee71fd6bc face: Disable IPv4-mapping of IPv6 addresses in TCP and UDP channels
Change-Id: I9997ed4114b9708778ee55f82f567264dede6798
Refs: #1352
2014-03-13 17:49:00 -07:00
Davide Pesavento 56fb59799d face: Implementation of ethernet::Address::fromString()
Change-Id: I18279bee23f8e80ee667099c1207e50556fbd1a1
2014-03-12 10:47:01 -07:00
Giulio Grassi 69871f03d3 face: close idle Datagram faces
refs #1281

Change-Id: Ifc766964f653d3991b55d76361c8b9bbe5d630cf
2014-03-11 15:54:48 -07:00
Davide Pesavento 248d6bd666 core: add free function to enumerate network interfaces.
Change-Id: Icd89662afe9e1295cd18a615970c5b4299529b38
Refs: #1306
2014-03-11 12:17:49 -07:00
Alexander Afanasyev 7e698e6aac face: Incrementing Face counters
Change-Id: Ia1d7917bb52cf01ab2ff304638bc9f6cbdb2626f
Refs: #1178
2014-03-08 20:27:43 +00:00
Alexander Afanasyev 6f5ff63f86 face: Fixing a bug in UdpChannel with missing async_receive
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
2014-03-08 20:27:43 +00:00
Alexander Afanasyev 69a342712d face: Fix bug when TcpChannel::handleSuccessfulConnect seem to be called before channel is acutally connected
Change-Id: Ibf50da48f01137649ffd90e8f6d16c4f03c87a2b
Refs: #1344
2014-03-08 01:58:47 -08:00
Alexander Afanasyev a39b90b2aa face: Implementing Face::getUri() method
Change-Id: I9a9f774b95784e5b7ec75472f1cc6cf64c4e5d7b
Refs: #1319
2014-03-06 09:25:06 +00:00
Junxiao Shi 61e3cc51ed faces: Channel base class
refs #1261

Change-Id: If17037c4802cb6ccec0201c3bff7fc4b6db41c6a
2014-03-05 11:56:10 -07:00
Junxiao Shi a4f2be8248 fw: FaceTable
refs #1317

Change-Id: Ief04fe572407120ca6777c087a519c1749f0cdd2
2014-03-04 14:32:04 -07:00
Giulio Grassi 624f6c610f face: UDP face/channel/factory
Change-Id: I4683b45378637133982efd23edd16a0c35148948
refs #1189
2014-03-02 13:29:10 +01:00
Alexander Afanasyev 5f1ec25245 face: Minor updates of TCP faces
Change-Id: I9a11fb4b2cd1aaaa670313cab0b08f097554e1fc
2014-02-28 16:12:46 -08:00
Alexander Afanasyev d665530904 face: Adding new 'createFace' method in all Factories
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
2014-02-28 16:12:12 -08:00
Alexander Afanasyev 0eb70659f7 face: Rename all ChannelFactories to protocol Factories
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
2014-02-28 12:54:16 -08:00
Alexander Afanasyev 7329e02f60 face: Convert to use the global IO service by all ChannelFactories
Change-Id: Ibd8d5cea142171b5700d8920eb3eedc084bbd588
2014-02-28 11:04:40 -08:00
Davide Pesavento 0ff10db95a face: remove awkward Face::setLocal, use a constructor argument instead.
Change-Id: Ic366ecdc83c5771138ff584ffb944a4e17300eb1
2014-02-28 08:45:14 -08:00