esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ethernet-transport.hpp
Go to the documentation of this file.
1#ifndef ESP8266NDN_TRANSPORT_ETHERNET_TRANSPORT_HPP
2#define ESP8266NDN_TRANSPORT_ETHERNET_TRANSPORT_HPP
3
4#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
5
6#include "../port/port.hpp"
7
8extern "C" {
9struct netif;
10}
11class Print;
12
13namespace esp8266ndn {
14
17 : public virtual ndnph::Transport
19public:
21 static void listNetifs(Print& os);
22
24
26
31 bool begin(const char ifname[2], uint8_t ifnum);
32
37 bool begin();
38
40 void end();
41
42private:
43 bool begin(netif* netif);
44
45 bool doIsUp() const final;
46
47 void doLoop() final;
48
49 bool doSend(const uint8_t* pkt, size_t pktLen, uint64_t endpointId) final;
50
51private:
52 class Impl;
53 std::unique_ptr<Impl> m_impl;
54};
55
56} // namespace esp8266ndn
57
58#endif // defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
59
60#endif // ESP8266NDN_TRANSPORT_ETHERNET_TRANSPORT_HPP
A transport that communicates over Ethernet.
Definition ethernet-transport.hpp:18
void end()
Disable the transport.
bool begin(const char ifname[2], uint8_t ifnum)
Start intercepting NDN packets on a network interface.
bool doIsUp() const final
bool begin()
Start intercepting NDN packets on first available station interface.
bool doSend(const uint8_t *pkt, size_t pktLen, uint64_t endpointId) final
static void listNetifs(Print &os)
Print a list of network interfaces.
Mixin of RX queue in Transport, allocating buffers from DynamicRegion.
Definition transport-rxqueue.hpp:134
Base class of low-level transport.
Definition transport.hpp:10
Definition autoconfig.hpp:24