nl:: Weave:: WeaveFabricState
#include <src/lib/core/WeaveFabricState.h>
Chuyển tiếp nội dung khai báo WeaveFabricState.
Tóm tắt
Hàm khởi tạo và hàm phá |
|
---|---|
WeaveFabricState(void)
|
Loại công khai |
|
---|---|
PeerIndexType
|
typedefuint8_t
|
SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)
|
typedefvoid(*
|
State
|
enum |
Thuộc tính công khai |
|
---|---|
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
|
Hàm công khai |
|
---|---|
AddSharedSessionEndNode(uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId)
|
|
AddSharedSessionEndNode(WeaveSessionKey *sessionKey, uint64_t endNodeId)
|
Phương thức này thêm nút cuối mới vào bản ghi nút cuối dùng chung.
|
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)
|
Phương thức này sẽ tìm mục nhập khoá phiên.
|
FindSharedSession(uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType)
|
Tìm kiếm bảng khoá phiên cho khoá phiên được chia sẻ đã thiết lập sẽ nhắm mục tiêu nút kết thúc đã chỉ định và khớp với chế độ xác thực và loại mã hoá đã cho.
|
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)
|
Phương thức này trả về tất cả mã nhận dạng nút cuối có chung phiên được chỉ định.
|
HandleConnectionClosed(WeaveConnection *con)
|
void
|
Init(void)
|
|
Init(nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore)
|
|
IsFabricAddress(const IPAddress & addr) const
|
bool
Xác định xem địa chỉ IP có đại diện cho địa chỉ của một nút trong kết cấu vải Weave cục bộ hay không.
|
IsLocalFabricAddress(const IPAddress & addr) const
|
bool
Xác định xem địa chỉ IP có đại diện cho địa chỉ vải Weave cho nút cục bộ hay không.
|
IsSharedSession(uint16_t keyId, uint64_t peerNodeId)
|
bool
Phương thức này kiểm tra xem phiên bảo mật liên kết với ứng dụng ngang hàng và keyId đã chỉ định có được chia sẻ hay không.
|
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)
|
Khôi phục một Phiên bảo mật Weave Security đã bị tạm ngưng trước đó từ trạng thái chuyển đổi tuần tự.
|
SelectNodeAddress(uint64_t nodeId, uint16_t subnet) const
|
Trả về IPAddress chứa ULA của Weave cho một nút đã chỉ định.
|
SelectNodeAddress(uint64_t nodeId) const
|
Trả về IPAddress chứa ULA của Weave cho một nút đã chỉ định.
|
SetDelegate(FabricStateDelegate *aDelegate)
|
void
Phương thức này sẽ đặt đối tượng uỷ quyền.
|
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)
|
Tạm ngưng và chuyển đổi tuần tự trạng thái của phiên bảo mật Weave đang hoạt động.
|
Cấu trúc |
|
---|---|
nl:: |
Loại công khai
PeerIndexType
uint8_t PeerIndexType
SessionEndCbFunct
void(* SessionEndCbFunct)(uint16_t keyId, uint64_t peerNodeId, void *context)
Tiểu bang
State
Thuộc tính công khai
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
Tiểu bang
uint8_t State
UnencRcvFlags
WeaveSessionState::ReceiveFlagsType UnencRcvFlags[WEAVE_CONFIG_MAX_PEER_NODES]
UseTestKey
bool UseTestKey
Hàm công khai
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId )
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( WeaveSessionKey *sessionKey, uint64_t endNodeId )
Phương thức này thêm nút cuối mới vào bản ghi nút cuối dùng chung.
Thông tin chi tiết | |||||
---|---|---|---|---|---|
Các tham số |
|
||||
Giá trị trả về |
|
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 )
Phương thức này sẽ tìm mục nhập khoá phiên.
Thông tin chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
||||||||||
Giá trị trả về |
|
FindSharedSession
WeaveSessionKey * FindSharedSession( uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType )
Tìm kiếm bảng khoá phiên cho khoá phiên được chia sẻ đã thiết lập sẽ nhắm mục tiêu nút kết thúc đã chỉ định và khớp với chế độ xác thực và loại mã hoá đã cho.
Thông tin chi tiết | |||||||
---|---|---|---|---|---|---|---|
Các tham số |
|
||||||
Giá trị trả về |
|
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 )
Phương thức này trả về tất cả mã nhận dạng nút cuối có chung phiên được chỉ định.
Thông tin chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
||||||||
Giá trị trả về |
|
HandleConnectionClosed
void HandleConnectionClosed( WeaveConnection *con )
Bắt đầu
WEAVE_ERROR Init( void )
Bắt đầu
WEAVE_ERROR Init( nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore )
IsFabricAddress
bool IsFabricAddress( const IPAddress & addr ) const
Xác định xem địa chỉ IP có đại diện cho địa chỉ của một nút trong kết cấu vải Weave cục bộ hay không.
IsLocalFabricAddress
bool IsLocalFabricAddress( const IPAddress & addr ) const
Xác định xem địa chỉ IP có đại diện cho địa chỉ vải Weave cho nút cục bộ hay không.
IsSharedSession
bool IsSharedSession( uint16_t keyId, uint64_t peerNodeId )
Phương thức này kiểm tra xem phiên bảo mật liên kết với ứng dụng ngang hàng và keyId đã chỉ định có được chia sẻ hay không.
Thông tin chi tiết | |||||
---|---|---|---|---|---|
Các tham số |
|
||||
Giá trị trả về |
|
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 )
Khôi phục một Phiên bảo mật Weave Security đã bị tạm ngưng trước đó từ trạng thái chuyển đổi tuần tự.
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId, uint16_t subnet ) const
Trả về IPAddress chứa ULA của Weave cho một nút đã chỉ định.
Biến thể này cho phép chỉ định mạng con.
Thông tin chi tiết | |||||
---|---|---|---|---|---|
Các tham số |
|
||||
Giá trị trả về |
|
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId ) const
Trả về IPAddress chứa ULA của Weave cho một nút đã chỉ định.
Biến thể này sử dụng mạng con mặc định của nút cục bộ.
Thông tin chi tiết | |||
---|---|---|---|
Các tham số |
|
||
Giá trị trả về |
|
SetDelegate
void SetDelegate( FabricStateDelegate *aDelegate )
Phương thức này sẽ đặt đối tượng uỷ quyền.
Các phương thức gọi lại của đại biểu được gọi bất cứ khi nào FabricId được thay đổi, tức là khi chúng ta kết hợp/tạo một loại vải hoặc khi chúng ta để lại một kết cấu (trạng thái rõ ràng của kết cấu)
Nếu phương thức uỷ quyền đã được đặt trước đó, thì lệnh gọi thứ hai đối với phương thức này sẽ ghi đè phương thức uỷ quyền trước đó.
Thông tin chi tiết | |||
---|---|---|---|
Các tham số |
|
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 )
Tắt
WEAVE_ERROR Shutdown( void )
SuspendSession
WEAVE_ERROR SuspendSession( uint16_t keyId, uint64_t peerNodeId, uint8_t *buf, uint16_t bufSize, uint16_t & serializedSessionLen )
Tạm ngưng và chuyển đổi tuần tự trạng thái của phiên bảo mật Weave đang hoạt động.
Chuyển đổi tuần tự trạng thái của một phiên bảo mật Weave đã xác định vào vùng đệm được cung cấp và tạm ngưng phiên đó để không thể gửi hoặc nhận thêm thông báo nào.
Phương thức này dành cho các thiết bị không giữ lại RAM trong khi ngủ, cho phép các thiết bị duy trì trạng thái của một phiên đang hoạt động và do đó tránh được nhu cầu thiết lập lại phiên đó khi thức.
WeaveFabricState
WeaveFabricState( void )