mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-17 06:38:25 +00:00
Plumb injectPacketFromHost through to API.
This commit is contained in:
@ -227,6 +227,23 @@ public:
|
||||
bool updateCheck()
|
||||
throw();
|
||||
|
||||
/**
|
||||
* Inject a packet into a network's tap as if it came from the host
|
||||
*
|
||||
* This is primarily for debugging, and at the moment is only supported on
|
||||
* the test/dummy Ethernet tap implementation. Attempting to use it for real
|
||||
* devices will fail and return 'false.'
|
||||
*
|
||||
* @param nwid Network ID
|
||||
* @param from Source MAC address (must be 6 bytes in length)
|
||||
* @param to Destination MAC address (must be 6 bytes in length)
|
||||
* @param etherType Ethernet frame type
|
||||
* @param data Frame data
|
||||
* @param len Length of frame in bytes
|
||||
* @return True on success; false if not a member of network, injection not supported, or data too large
|
||||
*/
|
||||
bool injectPacketFromHost(uint64_t nwid,const unsigned char *from,const unsigned char *to,unsigned int etherType,const void *data,unsigned int len);
|
||||
|
||||
static const char *versionString() throw();
|
||||
static unsigned int versionMajor() throw();
|
||||
static unsigned int versionMinor() throw();
|
||||
|
Reference in New Issue
Block a user