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
קובעת אם כתובת IP מייצגת כתובת של צומת בתוך מארג Weave מקומי.
|
IsLocalFabricAddress(const IPAddress & addr) const
|
bool
קובעת אם כתובת IP מייצגת כתובת מבד Weave עבור הצומת המקומי.
|
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 שהושעתה בעבר ממצב סריאלי.
|
SelectNodeAddress(uint64_t nodeId, uint16_t subnet) const
|
מחזירה כתובת IPAddress שמכילה ULA של Weave עבור צומת שצוין.
|
SelectNodeAddress(uint64_t nodeId) const
|
מחזירה כתובת IPAddress שמכילה ULA של Weave עבור צומת שצוין.
|
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
קובעת אם כתובת IP מייצגת כתובת של צומת בתוך מארג Weave מקומי.
IsLocalFabricAddress
bool IsLocalFabricAddress( const IPAddress & addr ) const
קובעת אם כתובת IP מייצגת כתובת מבד Weave עבור הצומת המקומי.
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 שהושעתה בעבר ממצב סריאלי.
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId, uint16_t subnet ) const
מחזירה כתובת IPAddress שמכילה ULA של Weave עבור צומת שצוין.
הווריאנט הזה מאפשר לציין תת-רשת.
פרטים | |||||
---|---|---|---|---|---|
פרמטרים |
|
||||
ערכים מוחזרים |
|
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId ) const
מחזירה כתובת IPAddress שמכילה ULA של Weave עבור צומת שצוין.
הווריאנט הזה משתמש בתת-הרשת של הצומת המקומי שמוגדרת כברירת מחדל.
פרטים | |||
---|---|---|---|
פרמטרים |
|
||
ערכים מוחזרים |
|
SetDelegate
void SetDelegate( FabricStateDelegate *aDelegate )
שיטה זו מגדירה את אובייקט ההקצאה.
שיטות הקריאה החוזרת (callback) מופעלות בכל פעם ש-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 למאגר הזמני שסופק ומשהה את הסשן כך שלא ניתן יהיה לשלוח או לקבל הודעות נוספות.
שיטה זו מיועדת לשימוש על ידי מכשירים שאינם שומרים RAM בזמן שינה, כדי לאפשר להם לשמור על מצב של פעילות פעילה וכך להימנע מהצורך ליצור מחדש את הסשן כשהם יוצאים ממצב שינה.
WeaveFabricState
WeaveFabricState( void )