nl:: बुनाई::WeaveFabricState
#include <src/lib/core/WeaveFabricState.h>
WeaveFabricState के एलान का एलान.
खास जानकारी
कंस्ट्रक्टर और कंस्ट्रक्टर |
|
---|---|
WeaveFabricState(void)
|
सार्वजनिक प्रकार |
|
---|---|
PeerIndexType
|
टाइपडेफ़uint8_t
|
SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)
|
टाइपडेफ़void(*
|
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
यह तय करता है कि कोई आईपी पता, स्थानीय Weave कपड़े में मौजूद नोड का पता दिखाता है या नहीं.
|
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)
|
पहले से निलंबित वीव सुरक्षा सेशन को क्रम से वापस लाएं.
|
SelectNodeAddress(uint64_t nodeId, uint16_t subnet) const
|
किसी खास नोड के लिए Weave ULA वाला IP पता देता है.
|
SelectNodeAddress(uint64_t nodeId) const
|
किसी खास नोड के लिए Weave ULA वाला IP पता देता है.
|
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:: |
सार्वजनिक प्रकार
मिलते-जुलते ऐप्लिकेशन का इंडेक्स टाइप
uint8_t PeerIndexType
सेशन खत्म होने के समय CFFunct
void(* SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)
राज्य
State
सार्वजनिक विशेषताएं
ऑटो क्रिएशन की
bool AutoCreateKeys
DebugFabricId
uint64_t DebugFabricId
डिफ़ॉल्ट सबनेट
uint16_t DefaultSubnet
फ़ैब्रिक आईडी
uint64_t FabricId
ग्रुप कीस्टोर
nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase * GroupKeyStore
AddIPv4अन्य
IPAddress ListenIPv4Addr
AddIPv6r
IPAddress ListenIPv6Addr
स्थानीय नोड आईडी
uint64_t LocalNodeId
LogKeys
bool LogKeys
MaxUnencUDPMsgIdRcvd
uint32_t MaxUnencUDPMsgIdRcvd[WEAVE_CONFIG_MAX_PEER_NODES]
संदेश परत
WeaveMessageLayer * MessageLayer
सबसे हाल में इस्तेमाल किए गए इंडेक्स
PeerIndexType MostRecentlyUsedIndexes[WEAVE_CONFIG_MAX_PEER_NODES]
नोड आईडी
uint64_t NodeId[WEAVE_CONFIG_MAX_PEER_NODES]
पेयरिंग कोड
const char * PairingCode
राज्य
uint8_t State
UnencRcvफ़्लैग
WeaveSessionState::ReceiveFlagsType UnencRcvFlags[WEAVE_CONFIG_MAX_PEER_NODES]
TestTest कुंजी
bool UseTestKey
सार्वजनिक फ़ंक्शन
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId )
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( WeaveSessionKey *sessionKey, uint64_t endNodeId )
इस तरीके से शेयर किए गए एंड नोड रिकॉर्ड में नया एंड नोड जोड़ा जाता है.
ब्यौरा | |||||
---|---|---|---|---|---|
पैरामीटर |
|
||||
सामान लौटाने की वैल्यू |
|
ऐलोकेशन
WEAVE_ERROR AllocSessionKey( uint64_t peerNodeId, uint16_t keyId, WeaveConnection *boundCon, WeaveSessionKey *& sessionKey )
क्लियरफ़ैब्रिक स्टेट
void ClearFabricState( void )
बनाएंफ़ैब्रिक
WEAVE_ERROR CreateFabric( void )
FindSessionKey
WEAVE_ERROR FindSessionKey( uint16_t keyId, uint64_t peerNodeId, bool create, WeaveSessionKey *& retRec )
इस तरीके से सत्र कुंजी की एंट्री दिखती है.
ब्यौरा | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
पैरामीटर |
|
||||||||||
सामान लौटाने की वैल्यू |
|
Findशेयर किया गया सेशन
WeaveSessionKey * FindSharedSession( uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType )
सत्र कुंजी वाले टेबल के लिए, पहले से शेयर की गई कोई ऐसी सेशन कुंजी खोजें जो खत्म होने वाले खास नोड को टारगेट करती हो और जो पुष्टि किए गए मोड और एन्क्रिप्शन टाइप से मेल खाती हो.
ब्यौरा | |||||||
---|---|---|---|---|---|---|---|
पैरामीटर |
|
||||||
सामान लौटाने की वैल्यू |
|
GetFabricState
WEAVE_ERROR GetFabricState( uint8_t *buf, uint32_t bufSize, uint32_t & fabricStateLen )
पासवर्ड पाएं
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 )
यह तरीका बताए गए सेशन के सभी आखिरी नोड नोड दिखाता है.
ब्यौरा | |||||||||
---|---|---|---|---|---|---|---|---|---|
पैरामीटर |
|
||||||||
सामान लौटाने की वैल्यू |
|
HandleConnection बंद है
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
यह तय करता है कि कोई आईपी पता, स्थानीय Weave कपड़े में मौजूद नोड का पता दिखाता है या नहीं.
IsLocalFabricAddress
bool IsLocalFabricAddress( const IPAddress & addr ) const
यह तय करता है कि कोई आईपी पता, लोकल नोड के लिए बुनाई के कपड़े का पता दिखाता है या नहीं.
IsSharedSession
bool IsSharedSession( uint16_t keyId, uint64_t peerNodeId )
इस तरीके से पता चलता है कि मिलते-जुलते ऐप्लिकेशन के खास सेशन और KeyId से जुड़ा सुरक्षित सेशन शेयर किया गया है या नहीं.
ब्यौरा | |||||
---|---|---|---|---|---|
पैरामीटर |
|
||||
सामान लौटाने की वैल्यू |
|
मौजूदा फ़ेब्रिक में शामिल हों
WEAVE_ERROR JoinExistingFabric( const uint8_t *fabricState, uint32_t fabricStateLen )
रजिस्टर सेशन खत्म होने पर कॉलबैक
WEAVE_ERROR RegisterSessionEndCallback( SessionEndCbCtxt *sessionEndCb )
DeleteIdleSessionKeys
bool RemoveIdleSessionKeys()
सत्र सत्र कुंजी हटाएं
WEAVE_ERROR RemoveSessionKey( uint16_t keyId, uint64_t peerNodeId )
सत्र सत्र कुंजी हटाएं
void RemoveSessionKey( WeaveSessionKey *sessionKey, bool wasIdle )
SharedSessionSessionEndNodes हटाएं
void RemoveSharedSessionEndNodes( const WeaveSessionKey *sessionKey )
सेशन को वापस लाएं
WEAVE_ERROR RestoreSession( uint8_t *serializedSession, uint16_t serializedSessionLen )
पहले से निलंबित वीव सुरक्षा सेशन को क्रम से वापस लाएं.
नोड पते को चुनें
IPAddress SelectNodeAddress( uint64_t nodeId, uint16_t subnet ) const
किसी खास नोड के लिए Weave ULA वाला IP पता देता है.
इस वैरिएंट की मदद से, सबनेट तय किया जा सकता है.
ब्यौरा | |||||
---|---|---|---|---|---|
पैरामीटर |
|
||||
सामान लौटाने की वैल्यू |
|
नोड पते को चुनें
IPAddress SelectNodeAddress( uint64_t nodeId ) const
किसी खास नोड के लिए Weave ULA वाला IP पता देता है.
यह वैरिएंट, स्थानीय नोड's डिफ़ॉल्ट सबनेट का इस्तेमाल करता है.
ब्यौरा | |||
---|---|---|---|
पैरामीटर |
|
||
सामान लौटाने की वैल्यू |
|
सेट डेलिगेट
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 )
निलंबन सत्र
WEAVE_ERROR SuspendSession( uint16_t keyId, uint64_t peerNodeId, uint8_t *buf, uint16_t bufSize, uint16_t & serializedSessionLen )
किसी चालू Weave सुरक्षा सत्र की स्थिति को निलंबित करें और उसे क्रम से लगाएं.
यह जांच किए गए Weave सुरक्षा सेशन की स्थिति को सप्लाई किए गए बफ़र में क्रम से लगा देता है और सेशन को निलंबित कर देता है, ताकि आगे से कोई मैसेज न तो भेजा जा सके और न ही मिल सके.
इस तरीके का इस्तेमाल उन डिवाइस को करने के लिए किया जाता है जो स्लीप मोड (कम बैटरी मोड) में होने पर, रैम को नहीं बनाए रखते हैं. इससे वे किसी चालू सेशन की स्थिति बनाए रख पाते हैं. साथ ही, जब डिवाइस चालू होता है, तब सेशन को फिर से चालू करने की ज़रूरत नहीं पड़ती.
WeaveFabricState
WeaveFabricState( void )