nl:: Weave:: WeaveFabricState
#include <src/lib/core/WeaveFabricState.h>
WeaveFabricState की जानकारी को फ़ॉरवर्ड करें.
खास जानकारी
कंस्ट्रक्टर और डिस्ट्रक्टर |
|
---|---|
WeaveFabricState(void)
|
सार्वजनिक टाइप |
|
---|---|
PeerIndexType
|
typedefuint8_t
|
SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)
|
typedefvoid(*
|
State
|
enum |
सार्वजनिक एट्रिब्यूट |
|
---|---|
AutoCreateKeys
|
bool
|
DebugFabricId
|
uint64_t
|
DefaultSubnet
|
uint16_t
|
FabricId
|
uint64_t
|
GroupKeyStore
|
|
ListenIPv4Addr
|
IPAddress
|
ListenIPv6Addr
|
IPAddress
|
LocalNodeId
|
uint64_t
|
LogKeys
|
bool
|
MaxUnencUDPMsgIdRcvd[WEAVE_CONFIG_MAX_PEER_NODES]
|
uint32_t
|
MessageLayer
|
|
MostRecentlyUsedIndexes[WEAVE_CONFIG_MAX_PEER_NODES]
|
PeerIndexType
|
NodeId[WEAVE_CONFIG_MAX_PEER_NODES]
|
uint64_t
|
PairingCode
|
const char *
|
State
|
uint8_t
|
UnencRcvFlags[WEAVE_CONFIG_MAX_PEER_NODES]
|
WeaveSessionState::ReceiveFlagsType
|
UseTestKey
|
bool
|
सार्वजनिक फ़ंक्शन |
|
---|---|
AddSharedSessionEndNode(uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId)
|
|
AddSharedSessionEndNode(WeaveSessionKey *sessionKey, uint64_t endNodeId)
|
यह तरीका शेयर किए गए एंड नोड रिकॉर्ड में नया एंड नोड जोड़ता है.
|
AllocSessionKey(uint64_t peerNodeId, uint16_t keyId, WeaveConnection *boundCon, WeaveSessionKey *& sessionKey)
|
|
ClearFabricState(void)
|
void
|
CreateFabric(void)
|
|
FindSessionKey(uint16_t keyId, uint64_t peerNodeId, bool create, WeaveSessionKey *& retRec)
|
यह तरीका, सेशन कुंजी की एंट्री खोजता है.
|
FindSharedSession(uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType)
|
सेशन कुंजी की टेबल में, शेयर की गई पहले से मौजूद किसी सेशन कुंजी को खोजें. यह कुंजी, तय किए गए आखिरी नोड को टारगेट करती है और दिए गए पुष्टि मोड और एन्क्रिप्शन टाइप से मेल खाती है.
|
GetFabricState(uint8_t *buf, uint32_t bufSize, uint32_t & fabricStateLen)
|
|
GetPassword(uint8_t pwSrc, const char *& ps, uint16_t & pwLen)
|
|
GetSessionKey(uint16_t keyId, uint64_t peerNodeId, WeaveSessionKey *& outSessionKey)
|
|
GetSessionState(uint64_t remoteNodeId, uint16_t keyId, uint8_t encType, WeaveConnection *con, WeaveSessionState & outSessionState)
|
|
GetSharedSessionEndNodeIds(const WeaveSessionKey *sessionKey, uint64_t *endNodeIds, uint8_t endNodeIdsBufSize, uint8_t & endNodeIdsCount)
|
यह तरीका उन सभी एंड नोड आईडी को दिखाता है जो किसी खास सेशन को शेयर करते हैं.
|
HandleConnectionClosed(WeaveConnection *con)
|
void
|
Init(void)
|
|
Init(nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore)
|
|
IsFabricAddress(const IPAddress & addr) const
|
bool
इससे पता चलता है कि कोई आईपी पता, लोकल वीव फ़ैब्रिक में किसी नोड के पते को दिखाता है या नहीं.
|
IsLocalFabricAddress(const IPAddress & addr) const
|
bool
इससे पता चलता है कि कोई आईपी पता, लोकल नोड के लिए वीव फ़ैब्रिक का पता दिखाता है या नहीं.
|
IsSharedSession(uint16_t keyId, uint64_t peerNodeId)
|
bool
इस तरीके से यह जांच की जाती है कि दिए गए मिलते-जुलते ऐप्लिकेशन और keyId से जुड़ा सुरक्षित सेशन शेयर किया गया है या नहीं.
|
JoinExistingFabric(const uint8_t *fabricState, uint32_t fabricStateLen)
|
|
RegisterSessionEndCallback(SessionEndCbCtxt *sessionEndCb)
|
|
RemoveIdleSessionKeys()
|
bool
|
RemoveSessionKey(uint16_t keyId, uint64_t peerNodeId)
|
|
RemoveSessionKey(WeaveSessionKey *sessionKey, bool wasIdle)
|
void
|
RemoveSharedSessionEndNodes(const WeaveSessionKey *sessionKey)
|
void
|
RestoreSession(uint8_t *serializedSession, uint16_t serializedSessionLen)
|
पहले निलंबित किए गए Weave Security सेशन को सीरियल नंबर पर वापस लाएं.
|
SelectNodeAddress(uint64_t nodeId, uint16_t subnet) const
|
किसी खास नोड के लिए Weave ULA वाला IPAddress दिखाता है.
|
SelectNodeAddress(uint64_t nodeId) const
|
किसी खास नोड के लिए Weave ULA वाला IPAddress दिखाता है.
|
SetDelegate(FabricStateDelegate *aDelegate)
|
void
यह तरीका, डेलिगेट ऑब्जेक्ट को सेट करता है.
|
SetSessionKey(uint16_t keyId, uint64_t peerNodeId, uint8_t encType, WeaveAuthMode authMode, const WeaveEncryptionKey *encKey)
|
|
SetSessionKey(WeaveSessionKey *sessionKey, uint8_t encType, WeaveAuthMode authMode, const WeaveEncryptionKey *encKey)
|
|
Shutdown(void)
|
|
SuspendSession(uint16_t keyId, uint64_t peerNodeId, uint8_t *buf, uint16_t bufSize, uint16_t & serializedSessionLen)
|
किसी चालू Weave सुरक्षा सत्र की स्थिति को निलंबित करें और उसे सीरियलाइज़ करें.
|
संरचना |
|
---|---|
nl:: |
सार्वजनिक टाइप
PeerIndexType
uint8_t PeerIndexType
SessionEndCbFunct
void(* SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)
स्थिति
State
सार्वजनिक एट्रिब्यूट
AutoCreateKeys
bool AutoCreateKeys
DebugFabricId
uint64_t DebugFabricId
DefaultSubnet
uint16_t DefaultSubnet
FabricId
uint64_t FabricId
GroupKeyStore
nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase * GroupKeyStore
ListenIPv4Addr
IPAddress ListenIPv4Addr
ListenIPv6Addr
IPAddress ListenIPv6Addr
LocalNodeId
uint64_t LocalNodeId
LogKeys
bool LogKeys
MaxUnencUDPMsgIdRcvd
uint32_t MaxUnencUDPMsgIdRcvd[WEAVE_CONFIG_MAX_PEER_NODES]
MessageLayer
WeaveMessageLayer * MessageLayer
MostRecentlyUsedIndexes
PeerIndexType MostRecentlyUsedIndexes[WEAVE_CONFIG_MAX_PEER_NODES]
NodeId
uint64_t NodeId[WEAVE_CONFIG_MAX_PEER_NODES]
PairingCode
const char * PairingCode
स्थिति
uint8_t State
UnencRcvFlags
WeaveSessionState::ReceiveFlagsType UnencRcvFlags[WEAVE_CONFIG_MAX_PEER_NODES]
UseTestKey
bool UseTestKey
सार्वजनिक फ़ंक्शन
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId )
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( WeaveSessionKey *sessionKey, uint64_t endNodeId )
यह तरीका शेयर किए गए एंड नोड रिकॉर्ड में नया एंड नोड जोड़ता है.
जानकारी | |||||
---|---|---|---|---|---|
पैरामीटर |
|
||||
रिटर्न वैल्यू |
|
AllocSessionKey
WEAVE_ERROR AllocSessionKey( uint64_t peerNodeId, uint16_t keyId, WeaveConnection *boundCon, WeaveSessionKey *& sessionKey )
ClearFabricState
void ClearFabricState( void )
CreateFabric
WEAVE_ERROR CreateFabric( void )
FindSessionKey
WEAVE_ERROR FindSessionKey( uint16_t keyId, uint64_t peerNodeId, bool create, WeaveSessionKey *& retRec )
यह तरीका, सेशन कुंजी की एंट्री खोजता है.
जानकारी | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
पैरामीटर |
|
||||||||||
रिटर्न वैल्यू |
|
FindSharedSession
WeaveSessionKey * FindSharedSession( uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType )
सेशन कुंजी की टेबल में, शेयर की गई पहले से मौजूद किसी सेशन कुंजी को खोजें. यह कुंजी, तय किए गए आखिरी नोड को टारगेट करती है और दिए गए पुष्टि मोड और एन्क्रिप्शन टाइप से मेल खाती है.
जानकारी | |||||||
---|---|---|---|---|---|---|---|
पैरामीटर |
|
||||||
रिटर्न वैल्यू |
|
GetFabricState
WEAVE_ERROR GetFabricState( uint8_t *buf, uint32_t bufSize, uint32_t & fabricStateLen )
GetPassword
WEAVE_ERROR GetPassword( uint8_t pwSrc, const char *& ps, uint16_t & pwLen )
GetSessionKey
WEAVE_ERROR GetSessionKey( uint16_t keyId, uint64_t peerNodeId, WeaveSessionKey *& outSessionKey )
GetSessionState
WEAVE_ERROR GetSessionState( uint64_t remoteNodeId, uint16_t keyId, uint8_t encType, WeaveConnection *con, WeaveSessionState & outSessionState )
GetSharedSessionEndNodeIds
WEAVE_ERROR GetSharedSessionEndNodeIds( const WeaveSessionKey *sessionKey, uint64_t *endNodeIds, uint8_t endNodeIdsBufSize, uint8_t & endNodeIdsCount )
यह तरीका उन सभी एंड नोड आईडी को दिखाता है जो किसी खास सेशन को शेयर करते हैं.
जानकारी | |||||||||
---|---|---|---|---|---|---|---|---|---|
पैरामीटर |
|
||||||||
रिटर्न वैल्यू |
|
HandleConnectionClosed
void HandleConnectionClosed( WeaveConnection *con )
शुरू करें
WEAVE_ERROR Init( void )
शुरू करें
WEAVE_ERROR Init( nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore )
IsFabricAddress
bool IsFabricAddress( const IPAddress & addr ) const
इससे पता चलता है कि कोई आईपी पता, लोकल वीव फ़ैब्रिक में किसी नोड के पते को दिखाता है या नहीं.
IsLocalFabricAddress
bool IsLocalFabricAddress( const IPAddress & addr ) const
इससे पता चलता है कि कोई आईपी पता, लोकल नोड के लिए वीव फ़ैब्रिक का पता दिखाता है या नहीं.
IsSharedSession
bool IsSharedSession( uint16_t keyId, uint64_t peerNodeId )
इस तरीके से यह जांच की जाती है कि दिए गए मिलते-जुलते ऐप्लिकेशन और keyId से जुड़ा सुरक्षित सेशन शेयर किया गया है या नहीं.
जानकारी | |||||
---|---|---|---|---|---|
पैरामीटर |
|
||||
रिटर्न वैल्यू |
|
JoinExistingFabric
WEAVE_ERROR JoinExistingFabric( const uint8_t *fabricState, uint32_t fabricStateLen )
RegisterSessionEndCallback
WEAVE_ERROR RegisterSessionEndCallback( SessionEndCbCtxt *sessionEndCb )
RemoveIdleSessionKeys
bool RemoveIdleSessionKeys()
RemoveSessionKey
WEAVE_ERROR RemoveSessionKey( uint16_t keyId, uint64_t peerNodeId )
RemoveSessionKey
void RemoveSessionKey( WeaveSessionKey *sessionKey, bool wasIdle )
RemoveSharedSessionEndNodes
void RemoveSharedSessionEndNodes( const WeaveSessionKey *sessionKey )
RestoreSession
WEAVE_ERROR RestoreSession( uint8_t *serializedSession, uint16_t serializedSessionLen )
पहले निलंबित किए गए Weave Security सेशन को सीरियल नंबर पर वापस लाएं.
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId, uint16_t subnet ) const
किसी खास नोड के लिए Weave ULA वाला IPAddress दिखाता है.
इस वैरिएंट की मदद से, सबनेट की जानकारी दी जा सकती है.
जानकारी | |||||
---|---|---|---|---|---|
पैरामीटर |
|
||||
रिटर्न वैल्यू |
|
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId ) const
किसी खास नोड के लिए Weave ULA वाला IPAddress दिखाता है.
यह वैरिएंट, लोकल नोड के डिफ़ॉल्ट सबनेट का इस्तेमाल करता है.
जानकारी | |||
---|---|---|---|
पैरामीटर |
|
||
रिटर्न वैल्यू |
|
SetDelegate
void SetDelegate( FabricStateDelegate *aDelegate )
यह तरीका, डेलिगेट ऑब्जेक्ट को सेट करता है.
FabricId बदलने पर, डेलिगेट के लिए कॉलबैक के तरीके इस्तेमाल किए जाते हैं. जैसे, जब हम कोई कपड़ा जोड़ते हैं या बनाते हैं या किसी कपड़े को छोड़ते हैं (फ़ैब्रिक की स्थिति साफ़ करते हैं)
अगर आपने किसी और को अपने ईमेल खाते का ऐक्सेस दिया है, तो इस तरीके का इस्तेमाल करके दोबारा किया जाने वाला कॉल, पिछले ऐक्सेस की जगह ले लेगा.
जानकारी | |||
---|---|---|---|
पैरामीटर |
|
SetSessionKey
WEAVE_ERROR SetSessionKey( uint16_t keyId, uint64_t peerNodeId, uint8_t encType, WeaveAuthMode authMode, const WeaveEncryptionKey *encKey )
SetSessionKey
WEAVE_ERROR SetSessionKey( WeaveSessionKey *sessionKey, uint8_t encType, WeaveAuthMode authMode, const WeaveEncryptionKey *encKey )
बंद है
WEAVE_ERROR Shutdown( void )
SuspendSession
WEAVE_ERROR SuspendSession( uint16_t keyId, uint64_t peerNodeId, uint8_t *buf, uint16_t bufSize, uint16_t & serializedSessionLen )
किसी चालू Weave सुरक्षा सत्र की स्थिति को निलंबित करें और उसे सीरियलाइज़ करें.
यह, बताए गए Weave के सुरक्षा सेशन की स्थिति को दिए गए बफ़र में सीरियल के तौर पर दिखाता है. साथ ही, सेशन को निलंबित कर देता है, ताकि कोई और मैसेज न तो भेजा जा सके और न ही मिल सके.
यह तरीका उन डिवाइसों पर इस्तेमाल किया जाता है जो सोते समय रैम को बनाए नहीं रखते. इससे, सेशन चालू रहने के दौरान उन्हें फिर से चालू करने की ज़रूरत नहीं पड़ती.
WeaveFabricState
WeaveFabricState( void )