|
@@ -45,12 +45,14 @@
|
|
|
|
|
|
namespace ZeroTier {
|
|
|
|
|
|
+class NetconEthernetTap;
|
|
|
+
|
|
|
/**
|
|
|
* Network Containers instance -- emulates an Ethernet tap device as far as OneService knows
|
|
|
*/
|
|
|
class NetconEthernetTap
|
|
|
{
|
|
|
- friend class Phy<NetconEthernetTap>;
|
|
|
+ friend class Phy<NetconEthernetTap *>;
|
|
|
|
|
|
public:
|
|
|
NetconEthernetTap(
|
|
@@ -80,20 +82,20 @@ public:
|
|
|
|
|
|
private:
|
|
|
void phyOnDatagram(PhySocket *sock,void **uptr,const struct sockaddr *from,void *data,unsigned long len);
|
|
|
- void phyOnTcpConnect(PhySocket *sock,void **uptr,bool success);
|
|
|
- void phyOnTcpAccept(PhySocket *sockL,PhySocket *sockN,void **uptrL,void **uptrN,const struct sockaddr *from);
|
|
|
- void phyOnTcpClose(PhySocket *sock,void **uptr);
|
|
|
- void phyOnTcpData(PhySocket *sock,void **uptr,void *data,unsigned long len);
|
|
|
- void phyOnTcpWritable(PhySocket *sock,void **uptr);
|
|
|
- void phyOnUnixAccept(PhySocket *sockL,PhySocket *sockN,void **uptrL,void **uptrN);
|
|
|
- void phyOnUnixClose(PhySocket *sock,void **uptr);
|
|
|
- void phyOnUnixData(PhySocket *sock,void **uptr,void *data,unsigned long len);
|
|
|
- void phyOnUnixWritable(PhySocket *sock,void **uptr);
|
|
|
+ void phyOnTcpConnect(PhySocket *sock,void **uptr,bool success);
|
|
|
+ void phyOnTcpAccept(PhySocket *sockL,PhySocket *sockN,void **uptrL,void **uptrN,const struct sockaddr *from);
|
|
|
+ void phyOnTcpClose(PhySocket *sock,void **uptr);
|
|
|
+ void phyOnTcpData(PhySocket *sock,void **uptr,void *data,unsigned long len);
|
|
|
+ void phyOnTcpWritable(PhySocket *sock,void **uptr);
|
|
|
+ void phyOnUnixAccept(PhySocket *sockL,PhySocket *sockN,void **uptrL,void **uptrN);
|
|
|
+ void phyOnUnixClose(PhySocket *sock,void **uptr);
|
|
|
+ void phyOnUnixData(PhySocket *sock,void **uptr,void *data,unsigned long len);
|
|
|
+ void phyOnUnixWritable(PhySocket *sock,void **uptr);
|
|
|
|
|
|
void (*_handler)(void *,uint64_t,const MAC &,const MAC &,unsigned int,unsigned int,const void *,unsigned int);
|
|
|
void *_arg;
|
|
|
|
|
|
- Phy<NetconEthernetTap> _phy;
|
|
|
+ Phy<NetconEthernetTap *> *_phy;
|
|
|
PhySocket *_unixListenSocket;
|
|
|
|
|
|
uint64_t _nwid;
|