nl:: Weave:: WeaveFabricState
#include <src/lib/core/WeaveFabricState.h>
Deklaracja Forward WeaveFabricState.
Podsumowanie
Konstruktorzy i niszczyciele |
|
---|---|
WeaveFabricState(void)
|
Typy publiczne |
|
---|---|
PeerIndexType
|
typedefuint8_t
|
SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)
|
typedefvoid(*
|
State
|
enum | typ wyliczeniowy |
Atrybuty publiczne |
|
---|---|
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
|
Funkcje publiczne |
|
---|---|
AddSharedSessionEndNode(uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId)
|
|
AddSharedSessionEndNode(WeaveSessionKey *sessionKey, uint64_t endNodeId)
|
Ta metoda dodaje nowy węzeł końcowy do rekordu współdzielonych węzłów końcowych.
|
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)
|
Ta metoda znajduje wpis klucza sesji.
|
FindSharedSession(uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType)
|
Wyszukaj w tabeli kluczy sesji ustalony udostępniony klucz sesji, który jest kierowany na określony węzeł końcowy i pasuje do danego trybu uwierzytelniania i typu szyfrowania.
|
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)
|
Ta metoda zwraca wszystkie identyfikatory węzłów końcowych, które współużytkują określoną sesję.
|
HandleConnectionClosed(WeaveConnection *con)
|
void
|
Init(void)
|
|
Init(nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore)
|
|
IsFabricAddress(const IPAddress & addr) const
|
bool
Określa, czy adres IP reprezentuje adres węzła w lokalnej tkaninie Weave.
|
IsLocalFabricAddress(const IPAddress & addr) const
|
bool
Określa, czy adres IP reprezentuje adres tkaniny Weave dla węzła lokalnego.
|
IsSharedSession(uint16_t keyId, uint64_t peerNodeId)
|
bool
Ta metoda sprawdza, czy bezpieczna sesja powiązana z podanym peerem i podanym identyfikatorem klucza jest udostępniana.
|
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)
|
Nie możesz przywrócić wcześniej zawieszonej sesji zabezpieczeń Weave ze stanu zserializowanego.
|
SelectNodeAddress(uint64_t nodeId, uint16_t subnet) const
|
Zwraca adres IP zawierający wartość ULA weave dla określonego węzła.
|
SelectNodeAddress(uint64_t nodeId) const
|
Zwraca adres IP zawierający wartość ULA weave dla określonego węzła.
|
SetDelegate(FabricStateDelegate *aDelegate)
|
void
Ta metoda ustawia obiekt delegata.
|
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)
|
Zawieś i zserializuj stan aktywnej sesji zabezpieczeń Weave.
|
Konstrukcja |
|
---|---|
nl:: |
Typy publiczne
PeerIndexType
uint8_t PeerIndexType
SessionEndCbFunct
void(* SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)
Stan
State
Atrybuty publiczne
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
Stan
uint8_t State
UnencRcvFlags
WeaveSessionState::ReceiveFlagsType UnencRcvFlags[WEAVE_CONFIG_MAX_PEER_NODES]
UseTestKey
bool UseTestKey
Funkcje publiczne
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId )
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( WeaveSessionKey *sessionKey, uint64_t endNodeId )
Ta metoda dodaje nowy węzeł końcowy do rekordu współdzielonych węzłów końcowych.
Szczegóły | |||||
---|---|---|---|---|---|
Parametry |
|
||||
Zwracane wartości |
|
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 )
Ta metoda znajduje wpis klucza sesji.
Szczegóły | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parametry |
|
||||||||||
Zwracane wartości |
|
FindSharedSession
WeaveSessionKey * FindSharedSession( uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType )
Wyszukaj w tabeli kluczy sesji ustalony udostępniony klucz sesji, który jest kierowany na określony węzeł końcowy i pasuje do danego trybu uwierzytelniania i typu szyfrowania.
Szczegóły | |||||||
---|---|---|---|---|---|---|---|
Parametry |
|
||||||
Zwracane wartości |
|
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 )
Ta metoda zwraca wszystkie identyfikatory węzłów końcowych, które współużytkują określoną sesję.
Szczegóły | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parametry |
|
||||||||
Zwracane wartości |
|
HandleConnectionClosed
void HandleConnectionClosed( WeaveConnection *con )
Zainicjuj
WEAVE_ERROR Init( void )
Zainicjuj
WEAVE_ERROR Init( nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore )
IsFabricAddress
bool IsFabricAddress( const IPAddress & addr ) const
Określa, czy adres IP reprezentuje adres węzła w lokalnej tkaninie Weave.
IsLocalFabricAddress
bool IsLocalFabricAddress( const IPAddress & addr ) const
Określa, czy adres IP reprezentuje adres tkaniny Weave dla węzła lokalnego.
IsSharedSession
bool IsSharedSession( uint16_t keyId, uint64_t peerNodeId )
Ta metoda sprawdza, czy bezpieczna sesja powiązana z podanym peerem i podanym identyfikatorem klucza jest udostępniana.
Szczegóły | |||||
---|---|---|---|---|---|
Parametry |
|
||||
Zwracane wartości |
|
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 )
Nie możesz przywrócić wcześniej zawieszonej sesji zabezpieczeń Weave ze stanu zserializowanego.
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId, uint16_t subnet ) const
Zwraca adres IP zawierający wartość ULA weave dla określonego węzła.
Ten wariant umożliwia określenie podsieci.
Szczegóły | |||||
---|---|---|---|---|---|
Parametry |
|
||||
Zwracane wartości |
|
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId ) const
Zwraca adres IP zawierający wartość ULA weave dla określonego węzła.
Ten wariant używa domyślnej podsieci węzła lokalnego.
Szczegóły | |||
---|---|---|---|
Parametry |
|
||
Zwracane wartości |
|
SetDelegate
void SetDelegate( FabricStateDelegate *aDelegate )
Ta metoda ustawia obiekt delegata.
Metody wywołań zwrotnych delegowania są wywoływane po każdej zmianie pola FabricId, tj. przy dołączaniu/tworzeniu tkaniny lub po opuszczeniu tkaniny (stan bezbarwnej tkaniny)
Jeśli delegat jest wcześniej ustawiony, drugie wywołanie tej metody spowoduje zastąpienie poprzedniego.
Szczegóły | |||
---|---|---|---|
Parametry |
|
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 )
Wyłączono
WEAVE_ERROR Shutdown( void )
SuspendSession
WEAVE_ERROR SuspendSession( uint16_t keyId, uint64_t peerNodeId, uint8_t *buf, uint16_t bufSize, uint16_t & serializedSessionLen )
Zawieś i zserializuj stan aktywnej sesji zabezpieczeń Weave.
Serializuje stan zidentyfikowanej sesji zabezpieczeń Weave w podanym buforze i zawiesza sesję, tak aby nie można było wysyłać ani odbierać kolejnych wiadomości.
Ta metoda jest przeznaczona dla urządzeń, które nie zachowują pamięci RAM podczas uśpienia, dzięki czemu mogą utrzymać stan aktywnej sesji i tym samym uniknąć ponownego uruchamiania sesji po wybudzeniu.
WeaveFabricState
WeaveFabricState( void )