nl:: Weave
Summary
Typedefs |
|
---|---|
FabricSecretRotationScheme
|
typedefuint8_t
|
FabricSecretScope
|
nl::Weave::FabricSecretScopeuint8_t
Identifies the category of devices that can possess and use fabric secret. |
WeaveAuthMode
|
typedefuint16_t
Identifies how a peer node is authenticated. |
WeaveEncryptionKey
|
typedef |
WeaveEncryptionType
|
typedefenum nl::Weave::WeaveEncryptionType
The encryption types for the Weave message. |
WeaveExchangeFlags
|
typedefenum nl::Weave::WeaveExchangeFlags
The Weave Exchange header flag bits. |
WeaveExchangeVersion
|
typedefenum nl::Weave::WeaveExchangeVersion
The Weave Exchange header version. |
WeaveMessageFlags
|
typedefenum nl::Weave::WeaveMessageFlags
Flags associated with a inbound or outbound Weave message. |
WeaveMessageHeader
|
typedefstruct WeaveMessageInfo
|
WeaveMessageVersion
|
typedefenum nl::Weave::WeaveMessageVersion
The version of the Weave Message format. |
WeaveSubnetId
|
typedefenum nl::Weave::WeaveSubnetId
Weave has some reserved subnet numbers for distinguished network interfaces on typical devices. |
Variables |
|
---|---|
ExchangeMgr
|
NL_DLL_EXPORT WeaveExchangeManager
|
FabricState
|
NL_DLL_EXPORT WeaveFabricState
|
MessageLayer
|
NL_DLL_EXPORT WeaveMessageLayer
|
SecurityMgr
|
NL_DLL_EXPORT WeaveSecurityManager
|
WeaveConnection
|
class NL_DLL_EXPORT
|
WeaveExchangeManager
|
class NL_DLL_EXPORT
|
WeaveMessageLayer
|
class NL_DLL_EXPORT
|
gDefaultWRMPConfig = { WEAVE_CONFIG_WRMP_DEFAULT_INITIAL_RETRANS_TIMEOUT,
WEAVE_CONFIG_WRMP_DEFAULT_ACTIVE_RETRANS_TIMEOUT,
WEAVE_CONFIG_WRMP_DEFAULT_ACK_TIMEOUT,
WEAVE_CONFIG_WRMP_DEFAULT_MAX_RETRANS }
|
const WRMPConfig
|
kWeaveMsgEncAppKeyDiversifier = { 0xB1, 0x1D, 0xAE, 0x5B }[]
|
const uint8_t
Key diversifier used for Weave message encryption key derivation.
|
Functions |
|
---|---|
AppGroupMasterKeyIdFromAuthMode(WeaveAuthMode authMode)
|
uint8_t
Returns the application group master key ID associated with the authentication mode.
|
CASEAuthMode(uint8_t certType)
|
WeaveAuthMode
Returns a corresponding CASE authentication mode for a given certificate type.
|
CertTypeFromAuthMode(WeaveAuthMode authMode)
|
uint8_t
Returns the password source for the given authentication mode.
|
DecodeHeaderField(const uint16_t headerField, WeaveMessageInfo *msgInfo)
|
void
|
DefaultOnMessageReceived(ExchangeContext *ec, const IPPacketInfo *pktInfo, const WeaveMessageInfo *msgInfo, uint32_t profileId, uint8_t msgType, PacketBuffer *payload)
|
void
|
EncodeHeaderField(const WeaveMessageInfo *msgInfo)
|
uint16_t
|
FindMessageName(uint32_t inProfileId, uint8_t inMsgType)
|
const char *
|
FindProfileName(uint32_t inProfileId)
|
const char *
|
FormatWeaveError(char *buf, uint16_t bufSize, int32_t err)
|
bool
Given a Weave error, returns a human-readable NULL-terminated C string describing the error.
|
GenerateWeaveNodeId(uint64_t & nodeId)
|
NL_DLL_EXPORT WEAVE_ERROR
Generate random Weave node Id.
|
GetFibonacciForIndex(uint32_t index)
|
uint32_t
This function generates 32-bit Fibonacci number for a given 32 bit index.
|
GetMessageName(uint32_t profileId, uint8_t msgType)
|
const char *
|
GetProfileName(uint32_t profileId)
|
const char *
|
GetRandU16(void)
|
uint16_t
This function generates 16-bit unsigned random number.
|
GetRandU32(void)
|
uint32_t
This function generates 32-bit unsigned random number.
|
GetRandU64(void)
|
uint64_t
This function generates 64-bit unsigned random number.
|
GetRandU8(void)
|
uint8_t
This function generates 8-bit unsigned random number.
|
GetVendorName(uint16_t vendorId)
|
const char *
|
GroupKeyAuthMode(uint32_t keyId)
|
WeaveAuthMode
Returns a corresponding group key authentication mode for a given key ID.
|
IPv6InterfaceIdToWeaveNodeId(uint64_t interfaceId)
|
uint64_t
Convert an IPv6 address interface identifier to a Weave node identifier.
|
IsCASEAuthMode(WeaveAuthMode authMode)
|
bool
True if the authentication mode is based on the Weave CASE protocol.
|
IsCertAuthMode(WeaveAuthMode authMode)
|
bool
True if the authentication mode is based on possession of a private key associated with a certificate.
|
IsGroupKeyAuthMode(WeaveAuthMode authMode)
|
bool
True if the authentication mode is based on possession of a shared group key.
|
IsPASEAuthMode(WeaveAuthMode authMode)
|
bool
True if the authentication mode is based on the Weave PASE protocol.
|
IsPasswordAuthMode(WeaveAuthMode authMode)
|
bool
True if the authentication mode is based possession of a shared password.
|
IsTAKEAuthMode(WeaveAuthMode authMode)
|
bool
True if the authentication mode is based on the Weave TAKE protocol.
|
IsWRMPControlMessage(uint32_t profileId, uint8_t msgType)
|
bool
|
J2N_ByteArray(JNIEnv *env, jbyteArray inArray, uint8_t *& outArray, uint32_t & outArrayLen)
|
|
J2N_ByteArrayFieldVal(JNIEnv *env, jobject obj, const char *fieldName, uint8_t *& outArray, uint32_t & outArrayLen)
|
|
J2N_ByteArrayInPlace(JNIEnv *env, jbyteArray inArray, uint8_t *outArray, uint32_t maxArrayLen)
|
|
J2N_EnumFieldVal(JNIEnv *env, jobject obj, const char *fieldName, const char *fieldType, int & outVal)
|
|
J2N_EnumVal(JNIEnv *env, jobject enumObj, int & outVal)
|
|
J2N_IntFieldVal(JNIEnv *env, jobject obj, const char *fieldName, jint & outVal)
|
|
J2N_LongFieldVal(JNIEnv *env, jobject obj, const char *fieldName, jlong & outVal)
|
|
J2N_ShortFieldVal(JNIEnv *env, jobject obj, const char *fieldName, jshort & outVal)
|
|
J2N_StringFieldVal(JNIEnv *env, jobject obj, const char *fieldName, char *& outVal)
|
|
MakeClassName(const char *basePackageName, const char *relativeClassName, char *& classNameBuf)
|
|
PASEAuthMode(uint8_t pwSource)
|
WeaveAuthMode
Returns a corresponding PASE authentication mode for a given password source.
|
PasswordSourceFromAuthMode(WeaveAuthMode authMode)
|
uint8_t
Returns the password source for the given authentication mode.
|
PrintTunnelInfo(const WeaveConnectionTunnel & tun, const TCPEndPoint & fromEndPoint, const TCPEndPoint & toEndPoint, const PacketBuffer & data)
|
void
|
ToHex(const uint8_t data)
|
char
|
ToHexString(const uint8_t *data, size_t dataLen, char *& outBuf, size_t & outBufSize)
|
void
|
WeaveEncryptionKeyToString(uint8_t encType, const WeaveEncryptionKey & key, char *buf, size_t bufSize)
|
void
|
WeaveFabricIdToIPv6GlobalId(uint64_t fabricId)
|
uint64_t
Convert a Weave fabric identifier to an IPv6 ULA global identifier.
|
WeaveMessageSourceToStr(char *buf, uint32_t bufSize, const WeaveMessageInfo *msgInfo)
|
void
DEPRECATED Use WeaveMessageLayer::GetPeerDescription() instead.
|
WeaveNodeAddrToStr(char *buf, uint32_t bufSize, uint64_t nodeId, const IPAddress *addr, uint16_t port, WeaveConnection *con)
|
void
DEPRECATED Use WeaveMessageLayer::GetPeerDescription() instead.
|
WeaveNodeIdToIPv6InterfaceId(uint64_t nodeId)
|
uint64_t
Convert a Weave node identifier to an IPv6 address interface identifier.
|
max(const _T & a, const _T & b)
|
const _T &
|
min(const _T & a, const _T & b)
|
const _T &
|
Classes |
|
---|---|
nl:: |
Captures the intended target of a Weave communication and associated configuration information. |
nl:: |
An interface for managing a counter as an integer value. |
nl:: |
This class represents an ongoing conversation (ExchangeContext) between two or more nodes. |
nl:: |
This abstract delegate class communicates fabric state changes. |
nl:: |
For managing and manipulating a Host Port List, a compact, binary-encoded collection of host and port identifier tuples associated with the Weave Service Directory. |
nl:: |
|
nl:: |
A class for managing a monotonically-increasing counter as an integer value. |
nl:: |
A class for managing a counter as an integer value intended to persist across reboots. |
nl:: |
The definition of the Weave Connection class. |
nl:: |
The definition of the WeaveConnectionTunnel class, which manages a pair of TCPEndPoints whose original WeaveConnections have been coupled, and between which the WeaveMessageLayer forwards all data and connection closures. |
nl:: |
|
nl:: |
This specifies the Weave profile and message type of a particular Weave message within an ExchangeContext. |
nl:: |
This class is used to manage ExchangeContexts with other Weave nodes. |
nl:: |
Forward declaration of WeaveFabricState. |
nl:: |
The definition of the Weave Key identifier. |
nl:: |
The definition of the WeaveMessageLayer class, which manages communication with other Weave nodes. |
nl:: |
Contains information about Weave message encryption key. |
nl:: |
Key cache for Weave message encryption keys. |
nl:: |
|
nl:: |
Common, base object for implementing Weave profile unsolicited responders (servers) that encapsulates validating authenticated requests and sending status reports and provides common data member storage for fabric state and an exchange manager. |
nl:: |
A common base class for implementing Weave server delegate objects. |
nl:: |
Contains information about a Weave session key. |
nl:: |
Conveys the communication state needed to send/receive messages with another node. |
Structs |
|
---|---|
nl:: |
|
nl:: |
The WRMP configuration. |
nl:: |
Information about a Weave message that is in the process of being sent or received. |
Unions |
|
---|---|
nl:: |
Namespaces |
|
---|---|
nl:: |
This namespace includes all interfaces within Weave for working with Abstract Syntax Notation One (ASN.1). |
nl:: |
This namespace includes all interfaces within Weave for shared cryptographic support. |
nl:: |
|
nl:: |
|
nl:: |
This namespace provides functions for: |
nl:: |
This namespace includes all interfaces within Weave for shared logging support. |
nl:: |
|
nl:: |
This namespace includes all interfaces within Weave for Weave profiles, both Common and Nest Labs vendor-specific. |
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
|
nl:: |
Definitions for working with data encoded in Weave TLV format. |
nl:: |
This namespace includes interfaces for the Weave Address and Routing Module, a portable Module for configuring Weave IP addresses and Routes. |
Enumerations
@21
@21
Properties | |
---|---|
kFlagAckPending
|
If a response is expected for a message that is being sent. |
kFlagAutoReleaseConnection
|
Automatically release the message encryption key when the exchange context is freed. |
kFlagAutoReleaseKey
|
When set, signifies that at least one message has been received from peer on this exchange context. |
kFlagAutoRequestAck
|
This context was associated with a WeaveConnection. |
kFlagConnectionClosed
|
This context is the initiator of the exchange. |
kFlagDropAck
|
When set, automatically request an acknowledgment whenever a message is sent via UDP. |
kFlagMsgRcvdFromPeer
|
When set, signifies that at least one message received on this exchange requested an acknowledgment. This flag is read by the application to decide if it needs to request an acknowledgment for the response message it is about to send. This flag can also indicate whether peer is using WRMP. |
kFlagPeerRequestedAck
|
When set, signifies that there is an acknowledgment pending to be sent back. |
kFlagResponseExpected
|
Internal and debug only: when set, the exchange layer does not send an acknowledgment. |
kFlagUseEphemeralUDPPort
|
Automatically release the associated WeaveConnection when the exchange context is freed. |
@36
@36
@37
@37
@38
@38
@39
@39
Identifies the purpose or application of certificate.
A certificate type is a label that describes a certificate's purpose or application. Certificate types are not carried as attributes of the corresponding certificates, but rather are derived from the certificate's structure and/or the context in which it is used. The certificate type enumeration includes a set of pre-defined values describing commonly used certificate applications. Developers can also extend the certificate type value range with application-specific types that described custom certificates or certificates with unique security properties.
Certificate types are primarily used in the implementation of access control policies, where access to application features is influenced by the type of certificate presented by a requester.
@40
@40
Identifies the source for the password used in a password-based authentication protocol (e.g.
Weave PASE)
@41
@41
@43
@43
@44
@44
Weave message encryption application key diversifier size.
@45
@45
@53
@53
@54
@54
Properties | |
---|---|
kWeavePeerDescription_MaxLength
|
Maximum length of string (including NUL character) returned by WeaveMessageLayer::GetPeerDescription(). |
@55
@55
Definitions pertaining to the header of an encoded Weave message.
@56
@56
Bit field definitions for IEEE EUI-64 Identifiers.
@57
@57
WeaveEncryptionType
WeaveEncryptionType
WeaveExchangeFlags
WeaveExchangeFlags
The Weave Exchange header flag bits.
WeaveExchangeVersion
WeaveExchangeVersion
The Weave Exchange header version.
WeaveMessageFlags
WeaveMessageFlags
Flags associated with a inbound or outbound Weave message.
The values defined here are for use within the WeaveMessageInfo.Flags field.
WeaveMessageVersion
WeaveMessageVersion
The version of the Weave Message format.
Weave will choose the appropriate message version based on the frame format required for the Weave message. By default, the message version is kWeaveMessageVersion_V1. When using Weave Reliable Messaging, for example, the version is kWeaveMessageVersion_V2.
Properties | |
---|---|
kWeaveMessageVersion_Unspecified
|
Unspecified message version. |
kWeaveMessageVersion_V1
|
Message header format version V1. |
kWeaveMessageVersion_V2
|
Message header format version V2. |
WeaveSubnetId
WeaveSubnetId
Weave has some reserved subnet numbers for distinguished network interfaces on typical devices.
These numbers are assigned here to symbolic constants. These subnet numbers are used by Weave to configure IPv6 ULA addresses on appropriate interfaces.
WeaveVendorId
WeaveVendorId
Typedefs
FabricSecretRotationScheme
uint8_t FabricSecretRotationScheme
FabricSecretScope
uint8_t FabricSecretScope
Identifies the category of devices that can possess and use fabric secret.
WeaveAuthMode
uint16_t WeaveAuthMode
Identifies how a peer node is authenticated.
WeaveAuthMode describes the means by which a peer node has been, or should be, authenticated during a Weave message exchange. In an initiating context, applications use WeaveAuthMode to express a desired peer authentication mode for an exchange, thereby instructing the Weave security and messaging layers to achieve the desired mode or fail the communication. In a responding context, WeaveAuthMode identifies how the requesting node (the peer) was authenticated, allowing the responding application to enforce access controls based on this information.
The WeaveAuthMode assigned to an incoming Weave message is related to the nature of the key that was used to encrypt that message. The WeaveAuthMode derives from the mechanism by which the key was established and the criteria used to verify the identities of the communicating parties at the time of key establishment.
WeaveAuthMode includes a set of pre-defined values describing common authentication modes. These are broken down by the key agreement mechanism (CASE, PASE, GroupKey, etc.). Developers can extend WeaveAuthMode by defining application-specific modes, which they can attach to specific encryption keys.
WeaveEncryptionKey
union nl::Weave::WeaveEncryptionKey WeaveEncryptionKey
WeaveEncryptionType
enum nl::Weave::WeaveEncryptionType WeaveEncryptionType
The encryption types for the Weave message.
WeaveExchangeFlags
enum nl::Weave::WeaveExchangeFlags WeaveExchangeFlags
The Weave Exchange header flag bits.
WeaveExchangeVersion
enum nl::Weave::WeaveExchangeVersion WeaveExchangeVersion
The Weave Exchange header version.
WeaveMessageFlags
enum nl::Weave::WeaveMessageFlags WeaveMessageFlags
Flags associated with a inbound or outbound Weave message.
The values defined here are for use within the WeaveMessageInfo.Flags field.
WeaveMessageHeader
struct WeaveMessageInfo WeaveMessageHeader
WeaveMessageVersion
enum nl::Weave::WeaveMessageVersion WeaveMessageVersion
The version of the Weave Message format.
Weave will choose the appropriate message version based on the frame format required for the Weave message. By default, the message version is kWeaveMessageVersion_V1. When using Weave Reliable Messaging, for example, the version is kWeaveMessageVersion_V2.
WeaveSubnetId
enum nl::Weave::WeaveSubnetId WeaveSubnetId
Weave has some reserved subnet numbers for distinguished network interfaces on typical devices.
These numbers are assigned here to symbolic constants. These subnet numbers are used by Weave to configure IPv6 ULA addresses on appropriate interfaces.
Variables
ExchangeMgr
NL_DLL_EXPORT WeaveExchangeManager ExchangeMgr
FabricState
NL_DLL_EXPORT WeaveFabricState FabricState
MessageLayer
NL_DLL_EXPORT WeaveMessageLayer MessageLayer
SecurityMgr
NL_DLL_EXPORT WeaveSecurityManager SecurityMgr
WeaveConnection
class NL_DLL_EXPORT WeaveConnection
WeaveExchangeManager
class NL_DLL_EXPORT WeaveExchangeManager
WeaveMessageLayer
class NL_DLL_EXPORT WeaveMessageLayer
gDefaultWRMPConfig
const WRMPConfig gDefaultWRMPConfig = { WEAVE_CONFIG_WRMP_DEFAULT_INITIAL_RETRANS_TIMEOUT, WEAVE_CONFIG_WRMP_DEFAULT_ACTIVE_RETRANS_TIMEOUT, WEAVE_CONFIG_WRMP_DEFAULT_ACK_TIMEOUT, WEAVE_CONFIG_WRMP_DEFAULT_MAX_RETRANS }
kWeaveMsgEncAppKeyDiversifier
const uint8_t kWeaveMsgEncAppKeyDiversifier[] = { 0xB1, 0x1D, 0xAE, 0x5B }
Key diversifier used for Weave message encryption key derivation.
This value represents first 4 bytes of the SHA-1 HASH of "Nest Weave Message EK and AK" phrase.
Functions
AppGroupMasterKeyIdFromAuthMode
uint8_t AppGroupMasterKeyIdFromAuthMode( WeaveAuthMode authMode )
Returns the application group master key ID associated with the authentication mode.
CASEAuthMode
WeaveAuthMode CASEAuthMode( uint8_t certType )
Returns a corresponding CASE authentication mode for a given certificate type.
CertTypeFromAuthMode
uint8_t CertTypeFromAuthMode( WeaveAuthMode authMode )
Returns the password source for the given authentication mode.
DecodeHeaderField
void DecodeHeaderField( const uint16_t headerField, WeaveMessageInfo *msgInfo )
DefaultOnMessageReceived
void DefaultOnMessageReceived( ExchangeContext *ec, const IPPacketInfo *pktInfo, const WeaveMessageInfo *msgInfo, uint32_t profileId, uint8_t msgType, PacketBuffer *payload )
EncodeHeaderField
uint16_t EncodeHeaderField( const WeaveMessageInfo *msgInfo )
FindMessageName
const char * FindMessageName( uint32_t inProfileId, uint8_t inMsgType )
FindProfileName
const char * FindProfileName( uint32_t inProfileId )
FormatWeaveError
bool FormatWeaveError( char *buf, uint16_t bufSize, int32_t err )
Given a Weave error, returns a human-readable NULL-terminated C string describing the error.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns |
true If a description string was written into the supplied buffer.
|
||||||
Returns |
false If the supplied error was not a Weave error.
|
GenerateWeaveNodeId
NL_DLL_EXPORT WEAVE_ERROR GenerateWeaveNodeId( uint64_t & nodeId )
Generate random Weave node Id.
This function generates 64-bit locally unique Weave node Id. This function uses cryptographically strong random data source to guarantee uniqueness of generated value. Note that bit 57 of the generated Weave node Id is set to 1 to indicate that generated Weave node Id is locally (not globally) unique.
Details | |||
---|---|---|---|
Parameters |
|
||
Return Values |
|
GetFibonacciForIndex
uint32_t GetFibonacciForIndex( uint32_t index )
This function generates 32-bit Fibonacci number for a given 32 bit index.
Details | |
---|---|
Returns |
32-bit unsigned fibonacci number.
|
GetMessageName
const char * GetMessageName( uint32_t profileId, uint8_t msgType )
GetProfileName
const char * GetProfileName( uint32_t profileId )
GetRandU16
uint16_t GetRandU16( void )
This function generates 16-bit unsigned random number.
Details | |
---|---|
Returns |
16-bit unsigned random integer.
|
GetRandU32
uint32_t GetRandU32( void )
This function generates 32-bit unsigned random number.
Details | |
---|---|
Returns |
32-bit unsigned random integer.
|
GetRandU64
uint64_t GetRandU64( void )
This function generates 64-bit unsigned random number.
Details | |
---|---|
Returns |
64-bit unsigned random integer.
|
GetRandU8
uint8_t GetRandU8( void )
This function generates 8-bit unsigned random number.
Details | |
---|---|
Returns |
8-bit unsigned random integer.
|
GetVendorName
const char * GetVendorName( uint16_t vendorId )
GroupKeyAuthMode
WeaveAuthMode GroupKeyAuthMode( uint32_t keyId )
Returns a corresponding group key authentication mode for a given key ID.
IPv6InterfaceIdToWeaveNodeId
uint64_t IPv6InterfaceIdToWeaveNodeId( uint64_t interfaceId )
Convert an IPv6 address interface identifier to a Weave node identifier.
As a convenience to testing, node identifiers less or equal than #kMaxAlwaysLocalWeaveNodeId (65535) are considered 'local', and have their universal/local bit is set to zero. This simplifies the string representation of the corresponding IPv6 addresses. For example a ULA for node identifier 10
would be FD00:0
:1:1::A.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
the mapped 64 bit Weave node identifier.
|
IsCASEAuthMode
bool IsCASEAuthMode( WeaveAuthMode authMode )
True if the authentication mode is based on the Weave CASE protocol.
IsCertAuthMode
bool IsCertAuthMode( WeaveAuthMode authMode )
True if the authentication mode is based on possession of a private key associated with a certificate.
IsGroupKeyAuthMode
bool IsGroupKeyAuthMode( WeaveAuthMode authMode )
True if the authentication mode is based on possession of a shared group key.
IsPASEAuthMode
bool IsPASEAuthMode( WeaveAuthMode authMode )
True if the authentication mode is based on the Weave PASE protocol.
IsPasswordAuthMode
bool IsPasswordAuthMode( WeaveAuthMode authMode )
True if the authentication mode is based possession of a shared password.
IsTAKEAuthMode
bool IsTAKEAuthMode( WeaveAuthMode authMode )
True if the authentication mode is based on the Weave TAKE protocol.
IsWRMPControlMessage
bool IsWRMPControlMessage( uint32_t profileId, uint8_t msgType )
J2N_ByteArray
WEAVE_ERROR J2N_ByteArray( JNIEnv *env, jbyteArray inArray, uint8_t *& outArray, uint32_t & outArrayLen )
J2N_ByteArrayFieldVal
WEAVE_ERROR J2N_ByteArrayFieldVal( JNIEnv *env, jobject obj, const char *fieldName, uint8_t *& outArray, uint32_t & outArrayLen )
J2N_ByteArrayInPlace
WEAVE_ERROR J2N_ByteArrayInPlace( JNIEnv *env, jbyteArray inArray, uint8_t *outArray, uint32_t maxArrayLen )
J2N_EnumFieldVal
WEAVE_ERROR J2N_EnumFieldVal( JNIEnv *env, jobject obj, const char *fieldName, const char *fieldType, int & outVal )
J2N_EnumVal
WEAVE_ERROR J2N_EnumVal( JNIEnv *env, jobject enumObj, int & outVal )
J2N_IntFieldVal
WEAVE_ERROR J2N_IntFieldVal( JNIEnv *env, jobject obj, const char *fieldName, jint & outVal )
J2N_LongFieldVal
WEAVE_ERROR J2N_LongFieldVal( JNIEnv *env, jobject obj, const char *fieldName, jlong & outVal )
J2N_ShortFieldVal
WEAVE_ERROR J2N_ShortFieldVal( JNIEnv *env, jobject obj, const char *fieldName, jshort & outVal )
J2N_StringFieldVal
WEAVE_ERROR J2N_StringFieldVal( JNIEnv *env, jobject obj, const char *fieldName, char *& outVal )
MakeClassName
WEAVE_ERROR MakeClassName( const char *basePackageName, const char *relativeClassName, char *& classNameBuf )
PASEAuthMode
WeaveAuthMode PASEAuthMode( uint8_t pwSource )
Returns a corresponding PASE authentication mode for a given password source.
PasswordSourceFromAuthMode
uint8_t PasswordSourceFromAuthMode( WeaveAuthMode authMode )
Returns the password source for the given authentication mode.
PrintTunnelInfo
void PrintTunnelInfo( const WeaveConnectionTunnel & tun, const TCPEndPoint & fromEndPoint, const TCPEndPoint & toEndPoint, const PacketBuffer & data )
ToHex
char ToHex( const uint8_t data )
ToHexString
void ToHexString( const uint8_t *data, size_t dataLen, char *& outBuf, size_t & outBufSize )
WeaveEncryptionKeyToString
void WeaveEncryptionKeyToString( uint8_t encType, const WeaveEncryptionKey & key, char *buf, size_t bufSize )
WeaveFabricIdToIPv6GlobalId
uint64_t WeaveFabricIdToIPv6GlobalId( uint64_t fabricId )
Convert a Weave fabric identifier to an IPv6 ULA global identifier.
The ULA global identifier for a fabric address is the lower 40 bits of the fabric's 64-bit fabric ID.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
the mapped IPv6 global identifier.
|
WeaveMessageSourceToStr
void WeaveMessageSourceToStr( char *buf, uint32_t bufSize, const WeaveMessageInfo *msgInfo )
DEPRECATED Use WeaveMessageLayer::GetPeerDescription() instead.
WeaveNodeAddrToStr
void WeaveNodeAddrToStr( char *buf, uint32_t bufSize, uint64_t nodeId, const IPAddress *addr, uint16_t port, WeaveConnection *con )
DEPRECATED Use WeaveMessageLayer::GetPeerDescription() instead.
WeaveNodeIdToIPv6InterfaceId
uint64_t WeaveNodeIdToIPv6InterfaceId( uint64_t nodeId )
Convert a Weave node identifier to an IPv6 address interface identifier.
Weave node identifiers are Universal/Local EUI-64s, which per RFC-3513 are converted to interface identifiers by inverting the universal/local bit (bit 57 counting the LSB as 0).
As a convenience to testing, node identifiers less or equal than #kMaxAlwaysLocalWeaveNodeId (65535) are considered 'local', and have their universal/local bit is set to zero. This simplifies the string representation of the corresponding IPv6 addresses. For example a ULA for node identifier 10
would be FD00:0
:1:1::A.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
the IPv6 interface identifier.
|
max
const _T & max( const _T & a, const _T & b )
min
const _T & min( const _T & a, const _T & b )