Commit Graph
28 Commits
Author SHA1 Message Date
Junxiao Shi c099ddb587 face: replace EventEmitter usage with Signal
refs #2300

Change-Id: I17d0d65d2c474b17dd9f23f271a6144b0b4fbc07
2015-01-06 20:50:15 -07:00
Davide Pesavento f8b41eb1b1 face: Fix ioctl() calls on platforms where libpcap uses /dev/bpf*
Change-Id: I2ed2cacf4915458d9b95f0a07beda46039aaa39d
Refs: #2327, #2328
2014-12-30 03:14:33 +01:00
Davide Pesavento 8eb9957db6 face: Support MTU larger than 1500 in EthernetFace (for jumbo frames)
Change-Id: Id784315569e11794dceaceffb4bb0af21b69be44
Refs: #2305
2014-12-19 19:14:36 +01:00
Matteo Sammarco 66df974ce8 face: implement NDNLP fragmentation in EthernetFace
Change-Id: I5b9ff271087ca0b2d5ee38be2f77911cfe9283f4
Refs: #1209
2014-12-08 06:35:09 -08:00
Davide Pesavento 7726ae5182 face: make EthernetFace more robust against errors.
We now call .fail() instead of throwing an exception.

Also modernize the code with some C++11 features.
In particular, std::unique_ptr is now used to manage
the pcap instance.

Change-Id: I91200ff9ab64ddb2d86f082647043e42ca85f538
Refs: #1984
2014-12-02 20:35:27 +01:00
Davide Pesavento 10783f221d EthernetFace: avoid putting the NIC in promiscuous mode if possible.
Try to use the PACKET_ADD_MEMBERSHIP socket option and the
SIOCADDMULTI ioctl, and only if they fail or are not available
we fall back to promiscuous mode.

Change-Id: Ib534e161ff86ca855e084240b94a166bc4d33ce1
Refs: #1278
2014-11-23 23:38:09 +01:00
Davide Pesavento b499a601b5 core: ignore non-Ethernet AF_LINK addresses when enumerating NICs.
Also modernize the code with some C++11 features.

Change-Id: Ibd29b39c37fdce8f87f917ab0cf48750e631e76c
2014-11-22 20:15:28 -08:00
Junxiao Shi a1937bf54c core: use FaceUri from ndn-cxx
refs #2143

Change-Id: Ida06daf406f941a699c9f1013450951db3cd28e9
2014-11-14 12:44:55 -08:00
Junxiao Shi 3ffe66d4ef core: use ethernet::Address from ndn-cxx
refs #2142

Change-Id: I1258a0a1cadbedb31c506c69c84b7906a61fc761
2014-11-06 20:27:23 -08:00
Davide Pesavento 4c1a0786db face: increment link layer byte counters in EthernetFace
refs #1780

Change-Id: I27b9c19ef70b976c83f35bcd569dc7eb7f9802cd
2014-08-14 11:13:53 -07:00
Alexander Afanasyev d9479aa9fa face: Fixing compilation failure with libpcap version 1.0.0
Change-Id: If285f1ed11a4e66bdafb50cbb7314faaed3d95f7
Refs: #1703
2014-06-26 13:54:22 -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 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
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
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
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
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 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
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 7e698e6aac face: Incrementing Face counters
Change-Id: Ia1d7917bb52cf01ab2ff304638bc9f6cbdb2626f
Refs: #1178
2014-03-08 20:27:43 +00:00
Alexander Afanasyev a39b90b2aa face: Implementing Face::getUri() method
Change-Id: I9a9f774b95784e5b7ec75472f1cc6cf64c4e5d7b
Refs: #1319
2014-03-06 09:25:06 +00: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
Davide Pesavento 44deacc811 face: Ethernet{Face,ChannelFactory} implementation.
refs: #1191

Change-Id: I08b7ebfdc5d70fb494b1f23bd7b1a77cf18653a1
2014-02-27 18:18:34 +01:00