Python Sniffer Implementation for Windows (#1147)

* Initial function loading of new listener interface.

* Additional changes for Node sniffer interface

* Use Interface Index instead of GUID

* Initialize Handle in sniffer

* Put Channel in the sniffer message
This commit is contained in:
Nick Banks
2017-01-18 09:10:07 -08:00
committed by Jonathan Hui
parent 419d251e2f
commit 71f47c105e
4 changed files with 359 additions and 2 deletions
+31
View File
@@ -365,6 +365,37 @@ OTNODEAPI int32_t OTCALL otNodeSendActiveSet(otNode* aNode, uint64_t aActiveTime
*/
OTNODEAPI int32_t OTCALL otNodeSetMaxChildren(otNode* aNode, uint8_t aMaxChildren);
/**
* The interface used to listen in on virtual nodes' MAC frames
*/
typedef struct otListener otListener;
/**
* Creates and starts a new listener
*/
OTNODEAPI otListener* OTCALL otListenerInit(uint32_t nodeid);
/**
* Frees a listener
*/
OTNODEAPI int32_t OTCALL otListenerFinalize(otListener* aListener);
/**
* Structure that represents a received MAC frame from the listener
*/
typedef struct otMacFrame
{
uint8_t buffer[128];
uint8_t length;
uint32_t nodeid;
} otMacFrame;
/**
* Reads the next MAC frame from the listener
*/
OTNODEAPI int32_t OTCALL otListenerRead(otListener* aListener, otMacFrame *aFrame);
#ifdef __cplusplus
} // extern "C"
#endif