nl :: Dệt :: Dệt may
#include <src/lib/core/WeaveFabricState.h>
Khai báo chuyển tiếp của WeaveFainstState .
Tóm lược
Người xây dựng và Người phá hủy | |
---|---|
WeaveFabricState (void) |
Các 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 cộng | |
---|---|
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 |
Chức năng công cộng | |
---|---|
AddSharedSessionEndNode (uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId) | |
AddSharedSessionEndNode ( WeaveSessionKey *sessionKey, uint64_t endNodeId) | Phương pháp này thêm nút cuối mới vào bản ghi các nút cuối được chia sẻ. |
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 tìm mục nhập khóa phiên. |
FindSharedSession (uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType) | Tìm kiếm trong bảng khóa phiên để tìm khóa phiên được chia sẻ đã thiết lập nhắm mục tiêu đến nút kết thúc được chỉ định và khớp với chế độ xác thực và loại mã hóa đã 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ả các ID nút cuối chia sẻ 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 cấu trúc 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 dệt cho nút cục bộ hay không. |
IsSharedSession (uint16_t keyId, uint64_t peerNodeId) | bool Phương pháp này kiểm tra xem phiên bảo mật được liên kết với ngang hàng và keyId được 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 Phiên bảo mật Weave bị tạm ngưng trước đó từ trạng thái được tuần tự hóa. |
SelectNodeAddress (uint64_t nodeId, uint16_t subnet) const | Trả về một Địa chỉ IP chứa ULA Weave cho một nút được chỉ định. |
SelectNodeAddress (uint64_t nodeId) const | Trả về Địa chỉ IP có chứa ULA Weave cho một nút được chỉ định. |
SetDelegate ( FabricStateDelegate *aDelegate) | void Phương thức này đặt đối tượng ủy nhiệm. |
SetSessionKey (uint16_t keyId, uint64_t peerNodeId, uint8_t encType, WeaveAuthMode authMode, constWeaveEncryptionKey *encKey) | |
SetSessionKey ( WeaveSessionKey *sessionKey, uint8_t encType, WeaveAuthMode authMode, constWeaveEncryptionKey *encKey) | |
Shutdown (void) | |
SuspendSession (uint16_t keyId, uint64_t peerNodeId, uint8_t *buf, uint16_t bufSize, uint16_t & serializedSessionLen) | Tạm dừng và tuần tự hóa trạng thái của một phiên bảo mật Weave đang hoạt động. |
Cấu trúc | |
---|---|
nl :: Weave :: WeaveFainstState :: SessionEndCbCtxt |
Các 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 cộng
AutoCreateKeys
bool AutoCreateKeys
DebugFainstId
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]
Mã ghép nối
const char * PairingCode
Tiểu bang
uint8_t State
UnncRcvFlags
WeaveSessionState::ReceiveFlagsType UnencRcvFlags[WEAVE_CONFIG_MAX_PEER_NODES]
UseTestKey
bool UseTestKey
Chức năng công cộng
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( uint64_t endNodeId, uint64_t terminatingNodeId, uint16_t keyId )
AddSharedSessionEndNode
WEAVE_ERROR AddSharedSessionEndNode( WeaveSessionKey *sessionKey, uint64_t endNodeId )
Phương pháp này thêm nút cuối mới vào bản ghi các nút cuối được chia sẻ.
Chi tiết | |||||
---|---|---|---|---|---|
Thông số |
| ||||
Giá trị trả lại |
|
AllocSessionKey
WEAVE_ERROR AllocSessionKey( uint64_t peerNodeId, uint16_t keyId, WeaveConnection *boundCon, WeaveSessionKey *& sessionKey )
ClearFnaiState
void ClearFabricState( void )
Tạo
WEAVE_ERROR CreateFabric( void )
FindSessionKey
WEAVE_ERROR FindSessionKey( uint16_t keyId, uint64_t peerNodeId, bool create, WeaveSessionKey *& retRec )
Phương thức này tìm mục nhập khóa phiên.
Chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||||
Giá trị trả lại |
|
FindSharedSession
WeaveSessionKey * FindSharedSession( uint64_t terminatingNodeId, WeaveAuthMode authMode, uint8_t encType )
Tìm kiếm trong bảng khóa phiên để tìm khóa phiên được chia sẻ đã thiết lập nhắm mục tiêu đến nút kết thúc được chỉ định và khớp với chế độ xác thực và loại mã hóa đã cho.
Chi tiết | |||||||
---|---|---|---|---|---|---|---|
Thông số |
| ||||||
Giá trị trả lại |
|
GetFainstState
WEAVE_ERROR GetFabricState( uint8_t *buf, uint32_t bufSize, uint32_t & fabricStateLen )
Lấy mật khẩu
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ả các ID nút cuối chia sẻ phiên được chỉ định.
Chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||
Giá trị trả lại |
|
HandleConnectionClosed
void HandleConnectionClosed( WeaveConnection *con )
Trong đó
WEAVE_ERROR Init( void )
Trong đó
WEAVE_ERROR Init( nl::Weave::Profiles::Security::AppKeys::GroupKeyStoreBase *groupKeyStore )
IsF FabricAddress
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 cấu trúc Weave cục bộ hay không.
IsLocalFnaiAddress
bool IsLocalFabricAddress( const IPAddress & addr ) const
Xác định xem địa chỉ IP có đại diện cho địa chỉ vải dệt cho nút cục bộ hay không.
IsSharedSession
bool IsSharedSession( uint16_t keyId, uint64_t peerNodeId )
Phương pháp này kiểm tra xem phiên bảo mật được liên kết với ngang hàng và keyId được chỉ định có được chia sẻ hay không.
Chi tiết | |||||
---|---|---|---|---|---|
Thông số |
| ||||
Giá trị trả lại |
|
JoinExistingFainst
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 )
Khôi phục phiên
WEAVE_ERROR RestoreSession( uint8_t *serializedSession, uint16_t serializedSessionLen )
Khôi phục Phiên bảo mật Weave bị tạm ngưng trước đó từ trạng thái được tuần tự hóa.
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId, uint16_t subnet ) const
Trả về một Địa chỉ IP chứa ULA Weave cho một nút được chỉ định.
Biến thể này cho phép chỉ định một mạng con.
Chi tiết | |||||
---|---|---|---|---|---|
Thông số |
| ||||
Giá trị trả lại |
|
SelectNodeAddress
IPAddress SelectNodeAddress( uint64_t nodeId ) const
Trả về Địa chỉ IP có chứa ULA Weave cho một nút được chỉ định.
Biến thể này sử dụng mạng con mặc định của nút cục bộ.
Chi tiết | |||
---|---|---|---|
Thông số |
| ||
Giá trị trả lại |
|
SetDelegate
void SetDelegate( FabricStateDelegate *aDelegate )
Phương thức này đặt đối tượng ủy nhiệm.
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 nối / tạo một loại vải hoặc khi chúng ta rời khỏi một loại vải (trạng thái vải rõ ràng)
Nếu đại biểu đã được đặt trước đó, thì lần gọi thứ hai tới phương thức này sẽ ghi đè đại biểu trước đó.
Chi tiết | |||
---|---|---|---|
Thông 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 )
Tạm ngưng
WEAVE_ERROR SuspendSession( uint16_t keyId, uint64_t peerNodeId, uint8_t *buf, uint16_t bufSize, uint16_t & serializedSessionLen )
Tạm dừng và tuần tự hóa trạng thái của một phiên bảo mật Weave đang hoạt động.
Sắp xếp thứ tự trạng thái của phiên bảo mật Weave đã xác định vào bộ đệm được cung cấp và tạm dừng phiên đó để không thể gửi hoặc nhận thêm thông báo nào.
Phương pháp này nhằm mục đích được sử dụng bởi các thiết bị không giữ lại RAM trong khi ngủ, cho phép chúng duy trì trạng thái của phiên hoạt động và do đó tránh phải thiết lập lại phiên khi chúng thức dậy.
Dệt may
WeaveFabricState( void )