nl::Weave::WeaveFabricState

#include <src/lib/core/WeaveFabricState.h>

WeaveFabricState için ileriye dönük beyan.

Özet

Oluşturucular ve Yıkıcılar

WeaveFabricState(void)

Herkese açık türler

PeerIndexType typedef
uint8_t
SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context) typedef
void(*
State enum

Herkese açık özellikler

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

Kamu işlevleri

AddSharedSessionEndNode(uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId)
AddSharedSessionEndNode(WeaveSessionKey *sessionKey, uint64_t endNodeId)
Bu yöntem, paylaşılan uç düğüm kaydına yeni uç düğüm ekler.
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)
Bu yöntem oturum anahtarı girişini bulur.
FindSharedSession(uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType)
Oturum anahtarları tablosunda, belirtilen sonlandırma düğümünü hedefleyen ve belirtilen kimlik doğrulama modu ve şifreleme türüyle eşleşen, oluşturulmuş paylaşılan bir oturum anahtarını arayın.
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)
Bu yöntem, belirtilen oturumu paylaşan tüm son düğüm kimliklerini döndürür.
HandleConnectionClosed(WeaveConnection *con)
void
Init(void)
Init(nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore)
IsFabricAddress(const IPAddress & addr) const
bool
Bir IP adresinin, yerel Weave yapısında bir düğümün adresini temsil edip etmediğini belirler.
IsLocalFabricAddress(const IPAddress & addr) const
bool
Bir IP adresinin yerel düğüm için bir Weave yapı adresini temsil edip etmediğini belirler.
IsSharedSession(uint16_t keyId, uint64_t peerNodeId)
bool
Bu yöntem, belirtilen eş ve keyId ile ilişkilendirilmiş güvenli oturumun paylaşılıp paylaşılmadığını kontrol eder.
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)
Daha önce askıya alınmış bir Weave Security Session'ı seri durumdan geri yükleyin.
SelectNodeAddress(uint64_t nodeId, uint16_t subnet) const
Belirtilen düğüm için Weave ULA içeren bir IPAddress döndürür.
SelectNodeAddress(uint64_t nodeId) const
Belirtilen düğüm için Weave ULA içeren bir IPAddress döndürür.
SetDelegate(FabricStateDelegate *aDelegate)
void
Bu yöntem, yetki nesnesini ayarlar.
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)
Etkin bir Weave güvenlik oturumunun durumunu askıya alın ve serileştirin.

Yapılar

nl::Weave::WeaveFabricState::SessionEndCbCtxt

Herkese açık türler

PeerIndexType

uint8_t PeerIndexType

SessionEndCbFunct

void(* SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)

Eyalet

 State

Herkese açık özellikler

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

Eyalet

uint8_t State

UnencRcvFlags

WeaveSessionState::ReceiveFlagsType UnencRcvFlags[WEAVE_CONFIG_MAX_PEER_NODES]

UseTestKey

bool UseTestKey

Kamu işlevleri

AddSharedSessionEndNode

WEAVE_ERROR AddSharedSessionEndNode(
  uint64_t endNodeId,
  uint64_t terminatingNodeId,
  uint16_t keyId
)

AddSharedSessionEndNode

WEAVE_ERROR AddSharedSessionEndNode(
  WeaveSessionKey *sessionKey,
  uint64_t endNodeId
)

Bu yöntem, paylaşılan uç düğüm kaydına yeni uç düğüm ekler.

Ayrıntılar
Parametreler
[in] sessionKey
Yeni bitiş düğümünün ekleneceği oturumu temsil eden WeaveSessionKey nesnesi.
[in] endNodeId
Eklenecek oturum bitiş düğümünün düğüm kimliği.
Döndürülen Değerler
WEAVE_ERROR_TOO_MANY_SHARED_SESSION_END_NODES
Paylaşılan uç düğüm listesinde yeni bir giriş için boş alan yoksa.
WEAVE_NO_ERROR
Başarılı olun.

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
)

Bu yöntem oturum anahtarı girişini bulur.

Ayrıntılar
Parametreler
[in] keyId
Örgü anahtarı tanımlayıcı.
[in] peerNodeId
Eşin düğüm tanımlayıcısı.
[in] create
Belirtilen anahtar bulunamazsa yeni anahtarın oluşturulup oluşturulmayacağını gösteren boole değeridir.
[out] retRec
Bir WeaveSessionKey nesnesine işaretçi referansı.
Döndürülen Değerler
WEAVE_ERROR_WRONG_KEY_TYPE
Belirtilen anahtar, oturum anahtarı türü değilse.
WEAVE_ERROR_INVALID_ARGUMENT
Girdi bağımsız değişkenlerinin değerleri yanlışsa.
WEAVE_ERROR_KEY_NOT_FOUND
Belirtilen anahtar bulunamazsa.
WEAVE_ERROR_TOO_MANY_KEYS
Yeni oturum anahtarı oluşturmak için ücretsiz giriş yoksa.
WEAVE_NO_ERROR
Başarılı olun.

FindSharedSession

WeaveSessionKey * FindSharedSession(
  uint64_t terminatingNodeId,
  WeaveAuthMode authMode,
  uint8_t encType
)

Oturum anahtarları tablosunda, belirtilen sonlandırma düğümünü hedefleyen ve belirtilen kimlik doğrulama modu ve şifreleme türüyle eşleşen, oluşturulmuş paylaşılan bir oturum anahtarını arayın.

Ayrıntılar
Parametreler
[in] terminatingNodeId
Oturum sonlandırıcının düğüm tanımlayıcısı.
[in] authMode
İstenen oturum kimlik doğrulaması modu.
[in] encType
İstenen ileti şifreleme türü.
Döndürülen Değerler
WeaveSessionKey
* Eşleşen paylaşılan oturumu temsil eden bir WeaveSessionKey nesnesine işaret eden veya eşleşen oturum bulunamazsa NULL.

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
)

Bu yöntem, belirtilen oturumu paylaşan tüm son düğüm kimliklerini döndürür.

Ayrıntılar
Parametreler
[in] sessionKey
Oturum anahtarı nesnesine işaret eden bir işaretçi.
[in] endNodeIds
Düğüm kimliklerinin arabelleğine yönlendiren bir işaretçi.
[in] endNodeIdsMaxCount
Arabelleğe sığabilecek maksimum düğüm kimliği sayısı.
[out] endNodeIdsCount
Belirtilen oturumu paylaşan bulunan son düğüm kimliklerinin sayısı.
Döndürülen Değerler
WEAVE_ERROR_BUFFER_TOO_SMALL
Sağlanan son düğüm kimlikleri arabelleği yeterince büyük değildir.
WEAVE_NO_ERROR
Başarılı olun.

HandleConnectionClosed

void HandleConnectionClosed(
  WeaveConnection *con
)

Başlat

WEAVE_ERROR Init(
  void
)

Başlat

WEAVE_ERROR Init(
  nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore
)

IsFabricAddress

bool IsFabricAddress(
  const IPAddress & addr
) const 

Bir IP adresinin, yerel Weave yapısında bir düğümün adresini temsil edip etmediğini belirler.

IsLocalFabricAddress

bool IsLocalFabricAddress(
  const IPAddress & addr
) const 

Bir IP adresinin yerel düğüm için bir Weave yapı adresini temsil edip etmediğini belirler.

IsSharedSession

bool IsSharedSession(
  uint16_t keyId,
  uint64_t peerNodeId
)

Bu yöntem, belirtilen eş ve keyId ile ilişkilendirilmiş güvenli oturumun paylaşılıp paylaşılmadığını kontrol eder.

Ayrıntılar
Parametreler
[in] keyId
Oturum anahtarı tanımlayıcısı.
[in] peerNodeId
Eşin düğüm tanımlayıcısı.
Döndürülen Değerler
bool
Belirtilen oturumun paylaşılıp paylaşılmayacağı.

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
)

Daha önce askıya alınmış bir Weave Security Session'ı seri durumdan geri yükleyin.

SelectNodeAddress

IPAddress SelectNodeAddress(
  uint64_t nodeId,
  uint16_t subnet
) const 

Belirtilen düğüm için Weave ULA içeren bir IPAddress döndürür.

Bu varyant, alt ağın belirtilmesini sağlar.

Ayrıntılar
Parametreler
[in] nodeId
Söz konusu düğümün Düğüm Kimliği numarası.
[in] subnet
ULA'nın istenen alt ağı.
Döndürülen Değerler
IPAddress
IPAddress nesnesi.

SelectNodeAddress

IPAddress SelectNodeAddress(
  uint64_t nodeId
) const 

Belirtilen düğüm için Weave ULA içeren bir IPAddress döndürür.

Bu varyant, yerel düğümün varsayılan alt ağını kullanır.

Ayrıntılar
Parametreler
[in] nodeId
Söz konusu düğümün Düğüm Kimliği numarası.
Döndürülen Değerler
IPAddress
IPAddress nesnesi.

SetDelegate

void SetDelegate(
  FabricStateDelegate *aDelegate
)

Bu yöntem, yetki nesnesini ayarlar.

FabricId değiştirildiğinde (ör.bir kumaşa katıldığımızda/oluşturduğumuzda veya bir kumaştan ayrıldığımızda) (şeffaf kumaş durumu) yetki geri çağırma yöntemleri çağrılır.

Yetki verilmiş kullanıcı daha önce ayarlandıysa bu yönteme yapılan ikinci bir çağrı, önceki yetkinin üzerine yazılır.

Ayrıntılar
Parametreler
[in] aDelegate
Yetki verilen nesne. Yetki verilmiş kullanıcı gerekmiyorsa NULL değeri olabilir.

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
)

Kapat

WEAVE_ERROR Shutdown(
  void
)

SuspendSession

WEAVE_ERROR SuspendSession(
  uint16_t keyId,
  uint64_t peerNodeId,
  uint8_t *buf,
  uint16_t bufSize,
  uint16_t & serializedSessionLen
)

Etkin bir Weave güvenlik oturumunun durumunu askıya alın ve serileştirin.

Tanımlanmış bir Weave güvenlik oturumunun durumunu, sağlanan arabelleğe alır ve başka ileti gönderilemeyecek ya da alınamayacak şekilde oturumu askıya alır.

Bu yöntem, uyku sırasında RAM'i korumayan cihazlar tarafından kullanılmak üzere tasarlanmıştır. Böylece, etkin oturumun durumunu koruyabilir ve böylece, uyandıklarında oturumu yeniden kurma ihtiyacını ortadan kaldırabilirler.

WeaveFabricState

 WeaveFabricState(
  void
)