Distributed Publish & Subscribe for IoT
dps.h
Go to the documentation of this file.
1 
6 /*
7  *******************************************************************
8  *
9  * Copyright 2016 Intel Corporation All rights reserved.
10  *
11  *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
12  *
13  * Licensed under the Apache License, Version 2.0 (the "License");
14  * you may not use this file except in compliance with the License.
15  * You may obtain a copy of the License at
16  *
17  * http://www.apache.org/licenses/LICENSE-2.0
18  *
19  * Unless required by applicable law or agreed to in writing, software
20  * distributed under the License is distributed on an "AS IS" BASIS,
21  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22  * See the License for the specific language governing permissions and
23  * limitations under the License.
24  *
25  *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
26  */
27 
28 #ifndef _DPS_H
29 #define _DPS_H
30 
31 #include <stdint.h>
32 #include <stddef.h>
33 #ifdef _WIN32
34 #include <winsock2.h>
35 #else
36 #include <sys/socket.h>
37 #endif
38 #include <dps/err.h>
39 #include <dps/uuid.h>
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 #define DPS_TRUE 1
46 #define DPS_FALSE 0
57 typedef struct _DPS_NodeAddress DPS_NodeAddress;
58 
68 const char* DPS_NodeAddrToString(const DPS_NodeAddress* addr);
69 
76 
85 DPS_NodeAddress* DPS_SetAddress(DPS_NodeAddress* addr, const char* addrText);
86 
93 void DPS_CopyAddress(DPS_NodeAddress* dest, const DPS_NodeAddress* src);
94 
101  /* end of nodeaddress group */
103 
120 typedef enum {
124 } DPS_KeyType;
125 
131 typedef struct _DPS_KeySymmetric {
132  const uint8_t* key;
133  size_t len;
135 
136 #define DPS_AES_256_KEY_LEN 32
141 typedef enum {
142  DPS_EC_CURVE_RESERVED = 0,
145 } DPS_ECCurve;
146 
155 typedef struct _DPS_KeyEC {
157  const uint8_t* x;
158  const uint8_t* y;
159  const uint8_t* d;
160 } DPS_KeyEC;
161 
167 typedef struct _DPS_KeyCert {
168  const char *cert;
169  const char *privateKey;
170  const char *password;
171 } DPS_KeyCert;
172 
176 typedef struct _DPS_Key {
179  union {
183  };
184 } DPS_Key;
185 
189 typedef struct _DPS_KeyId {
190  const uint8_t* id;
191  size_t len;
192 } DPS_KeyId;
193 
197 typedef struct _DPS_KeyStore DPS_KeyStore;
198 
202 typedef struct _DPS_KeyStoreRequest DPS_KeyStoreRequest;
203 
220 
236 typedef DPS_Status (*DPS_KeyHandler)(DPS_KeyStoreRequest* request, const DPS_KeyId* keyId);
237 
255 
271 
281 DPS_Status DPS_SetKeyAndId(DPS_KeyStoreRequest* request, const DPS_Key* key, const DPS_KeyId* keyId);
282 
291 DPS_Status DPS_SetKey(DPS_KeyStoreRequest* request, const DPS_Key* key);
292 
301 DPS_Status DPS_SetCA(DPS_KeyStoreRequest* request, const char* ca);
302 
311 
325  DPS_EphemeralKeyHandler ephemeralKeyHandler, DPS_CAHandler caHandler);
326 
332 void DPS_DestroyKeyStore(DPS_KeyStore* keyStore);
333 
342 DPS_Status DPS_SetKeyStoreData(DPS_KeyStore* keyStore, void* data);
343 
351 void* DPS_GetKeyStoreData(const DPS_KeyStore* keyStore);
352  /* end of KeyStore subgroup */
354 
364 typedef struct _DPS_MemoryKeyStore DPS_MemoryKeyStore;
365 
372 
379 
391 DPS_Status DPS_SetContentKey(DPS_MemoryKeyStore* keyStore, const DPS_KeyId* keyId, const DPS_Key* key);
392 
402 DPS_Status DPS_SetNetworkKey(DPS_MemoryKeyStore* keyStore, const DPS_KeyId* keyId, const DPS_Key* key);
403 
412 DPS_Status DPS_SetTrustedCA(DPS_MemoryKeyStore* mks, const char* ca);
413 
425 DPS_Status DPS_SetCertificate(DPS_MemoryKeyStore* mks, const char* cert, const char* key,
426  const char* password);
427 
436  /* end of MemoryKeyStore subgroup */
438  /* end of keystore group */
440 
450 typedef struct _DPS_Node DPS_Node;
451 
461 DPS_Node* DPS_CreateNode(const char* separators, DPS_KeyStore* keyStore, const DPS_KeyId* keyId);
462 
471 DPS_Status DPS_SetNodeData(DPS_Node* node, void* data);
472 
480 void* DPS_GetNodeData(const DPS_Node* node);
481 
485 #define DPS_MCAST_PUB_DISABLED 0
486 
490 #define DPS_MCAST_PUB_ENABLE_SEND 1
491 
495 #define DPS_MCAST_PUB_ENABLE_RECV 2
496 
506 DPS_Status DPS_StartNode(DPS_Node* node, int mcastPub, DPS_NodeAddress* listenAddr);
507 
519 typedef void (*DPS_OnNodeShutdown)(DPS_Node* node, void* data);
520 
534 
543 typedef void (*DPS_OnNodeDestroyed)(DPS_Node* node, void* data);
544 
558 
567 #define DPS_SUBSCRIPTION_UPDATE_RATE 2000
568 
575 #define DPS_LINK_LOSS_TIMEOUT 30000
576 
583 void DPS_SetNodeSubscriptionUpdateDelay(DPS_Node* node, uint32_t subsRateMsecs);
584 
591 void DPS_SetNodeLinkLossTimeout(DPS_Node* node, uint32_t linkLossMsecs);
592 
601 
610 const char* DPS_GetListenAddressString(DPS_Node* node);
611 
622 typedef void (*DPS_OnLinkComplete)(DPS_Node* node, const DPS_NodeAddress* addr, DPS_Status status, void* data);
623 
634 DPS_Status DPS_Link(DPS_Node* node, const char* addrText, DPS_OnLinkComplete cb, void* data);
635 
643 typedef void (*DPS_OnUnlinkComplete)(DPS_Node* node, const DPS_NodeAddress* addr, void* data);
644 
655 DPS_Status DPS_Unlink(DPS_Node* node, const DPS_NodeAddress* addr, DPS_OnUnlinkComplete cb, void* data);
656 
664 typedef void (*DPS_OnLinkLoss)(DPS_Node* node, const DPS_NodeAddress* addr, void* data);
665 
678 
686 typedef void (*DPS_OnResolveAddressComplete)(DPS_Node* node, const DPS_NodeAddress* addr, void* data);
687 
699 DPS_Status DPS_ResolveAddress(DPS_Node* node, const char* host, const char* service, DPS_OnResolveAddressComplete cb, void* data);
700  /* end of node group */
702 
712 typedef struct _DPS_Publication DPS_Publication;
713 
722 
731 
739 int16_t DPS_PublicationGetTTL(const DPS_Publication* pub);
740 
749 const char* DPS_PublicationGetTopic(const DPS_Publication* pub, size_t index);
750 
759 
768 
777 
786 
795 
808 
818 
826 void* DPS_GetPublicationData(const DPS_Publication* pub);
827 
838 typedef void (*DPS_AcknowledgementHandler)(DPS_Publication* pub, uint8_t* payload, size_t len);
839 
859  const char** topics,
860  size_t numTopics,
861  int noWildCard,
862  const DPS_KeyId* keyId,
864 
874 
881 void DPS_PublicationRemoveSubId(DPS_Publication* pub, const DPS_KeyId* keyId);
882 
899 DPS_Status DPS_Publish(DPS_Publication* pub, const uint8_t* pubPayload, size_t len, int16_t ttl);
900 
904 typedef struct _DPS_Buffer {
905  uint8_t* base;
906  size_t len;
907 } DPS_Buffer;
908 
918 typedef void (*DPS_PublishBufsComplete)(DPS_Publication* pub, const DPS_Buffer* bufs, size_t numBufs,
919  DPS_Status status, void* data);
920 
944 DPS_Status DPS_PublishBufs(DPS_Publication* pub, const DPS_Buffer* bufs, size_t numBufs, int16_t ttl,
945  DPS_PublishBufsComplete cb, void* data);
946 
954 
968 
981 DPS_Status DPS_AckPublication(const DPS_Publication* pub, const uint8_t* ackPayload, size_t len);
982 
992 typedef void (*DPS_AckPublicationBufsComplete)(DPS_Publication* pub, const DPS_Buffer* bufs, size_t numBufs,
993  DPS_Status status, void* data);
994 
1010 DPS_Status DPS_AckPublicationBufs(const DPS_Publication* pub, const DPS_Buffer* bufs, size_t numBufs,
1011  DPS_AckPublicationBufsComplete cb, void* data);
1012 
1021 uint32_t DPS_AckGetSequenceNum(const DPS_Publication* pub);
1022 
1032  /* end of publication group */
1034 
1044 typedef struct _DPS_Subscription DPS_Subscription;
1045 
1054 const char* DPS_SubscriptionGetTopic(const DPS_Subscription* sub, size_t index);
1055 
1064 
1075 DPS_Subscription* DPS_CreateSubscription(DPS_Node* node, const char** topics, size_t numTopics);
1076 
1086 
1095 
1104 
1117 
1137 typedef void (*DPS_PublicationHandler)(DPS_Subscription* sub, const DPS_Publication* pub, uint8_t* payload, size_t len);
1138 
1148 
1156 
1166  /* end of subscription group */
1168 
1169 #ifdef __cplusplus
1170 }
1171 #endif
1172 
1173 #endif
DPS_Subscription * DPS_CreateSubscription(DPS_Node *node, const char **topics, size_t numTopics)
Allocate memory for a subscription and initialize topics.
DPS_KeyStore * DPS_MemoryKeyStoreHandle(DPS_MemoryKeyStore *keyStore)
Returns the DPS_KeyStore* of an in-memory key store.
void DPS_CopyAddress(DPS_NodeAddress *dest, const DPS_NodeAddress *src)
Copy a node address.
DPS_Status DPS_Publish(DPS_Publication *pub, const uint8_t *pubPayload, size_t len, int16_t ttl)
Publish a set of topics along with an optional payload.
DPS_KeySymmetric.
Definition: dps.h:121
DPS_Status DPS_SetSubscriptionData(DPS_Subscription *sub, void *data)
Store a pointer to application data in a subscription.
Type definition for a UUID.
Definition: uuid.h:47
struct _DPS_Key DPS_Key
Union of supported key types.
DPS_Status DPS_DestroySubscription(DPS_Subscription *sub, DPS_OnSubscriptionDestroyed cb)
Stop subscribing to the subscription topic and free resources allocated for the subscription.
void DPS_SetNodeLinkLossTimeout(DPS_Node *node, uint32_t linkLossMsecs)
Override the default link-loss detection timeout (in msecs)
void DPS_SetNodeSubscriptionUpdateDelay(DPS_Node *node, uint32_t subsRateMsecs)
Override the default time delay (in msecs) between subscription updates.
DPS_Status DPS_SetCertificate(DPS_MemoryKeyStore *mks, const char *cert, const char *key, const char *password)
Create or replace a certificate in the key store.
DPS_KeyEC.
Definition: dps.h:122
struct _DPS_KeyId DPS_KeyId
An identifier of a key in a key store.
struct _DPS_MemoryKeyStore DPS_MemoryKeyStore
Opaque type for an in-memory key store.
Definition: dps.h:364
void(* DPS_OnNodeDestroyed)(DPS_Node *node, void *data)
Function prototype for callback function called when a node is destroyed.
Definition: dps.h:543
DPS_Status DPS_PublishBufs(DPS_Publication *pub, const DPS_Buffer *bufs, size_t numBufs, int16_t ttl, DPS_PublishBufsComplete cb, void *data)
Publish a set of topics along with an optional payload.
DPS_Status DPS_SetLinkLossCallback(DPS_Node *node, DPS_OnLinkLoss cb, void *data)
Set a callback function to called when a link explicily established by this node was lost...
DPS_MemoryKeyStore * DPS_CreateMemoryKeyStore(void)
Creates an in-memory key store.
void DPS_DestroyKeyStore(DPS_KeyStore *keyStore)
Destroys a previously created key store.
struct _DPS_KeyStore DPS_KeyStore
Opaque type for a key store.
Definition: dps.h:197
struct _DPS_KeySymmetric DPS_KeySymmetric
Symmetric key data.
uint8_t * base
Pointer to the base of the buffer.
Definition: dps.h:905
DPS_KeyType
A DPS key type.
Definition: dps.h:120
NIST P-521 also known as secp521r1.
Definition: dps.h:144
Create and compare UUIDs.
size_t len
Length of the buffer.
Definition: dps.h:906
DPS_Status DPS_SubscribeExpired(DPS_Subscription *sub, int enable)
Call the publication handler when a matching retained publication expires.
DPS_KeyEC ec
DPS_KEY_EC.
Definition: dps.h:181
const char * DPS_GetListenAddressString(DPS_Node *node)
Get text representation of the address this node is listening for connections on. ...
const char * DPS_NodeAddrToString(const DPS_NodeAddress *addr)
Get text representation of an address.
DPS_Node * DPS_SubscriptionGetNode(const DPS_Subscription *sub)
Get the local node associated with a subscription.
void(* DPS_OnLinkComplete)(DPS_Node *node, const DPS_NodeAddress *addr, DPS_Status status, void *data)
Function prototype for function called when a DPS_Link() completes.
Definition: dps.h:622
DPS_Status(* DPS_EphemeralKeyHandler)(DPS_KeyStoreRequest *request, const DPS_Key *key)
Function prototype for a key store handler called when an ephemeral key with the provided type is req...
Definition: dps.h:254
struct _DPS_NodeAddress DPS_NodeAddress
Opaque type for a remote node address.
Definition: dps.h:57
struct _DPS_Buffer DPS_Buffer
A buffer.
DPS_Status DPS_InitPublication(DPS_Publication *pub, const char **topics, size_t numTopics, int noWildCard, const DPS_KeyId *keyId, DPS_AcknowledgementHandler handler)
Initializes a newly created publication with a set of topics.
struct _DPS_Subscription DPS_Subscription
Opaque type for a subscription.
Definition: dps.h:1044
const char * password
The optional password protecting the key.
Definition: dps.h:170
struct _DPS_KeyCert DPS_KeyCert
Certificate key data.
Union of supported key types.
Definition: dps.h:176
struct _DPS_Publication DPS_Publication
Opaque type for a publication.
Definition: dps.h:712
void(* DPS_OnPublicationDestroyed)(DPS_Publication *pub)
Function prototype for callback function called when a publication is destroyed.
Definition: dps.h:953
DPS_Status DPS_AckPublicationBufs(const DPS_Publication *pub, const DPS_Buffer *bufs, size_t numBufs, DPS_AckPublicationBufsComplete cb, void *data)
Acknowledge a publication.
DPS_KeyType type
Type of key.
Definition: dps.h:177
DPS_Status DPS_StartNode(DPS_Node *node, int mcastPub, DPS_NodeAddress *listenAddr)
Initialized and starts running a local node.
DPS_Status DPS_SetKey(DPS_KeyStoreRequest *request, const DPS_Key *key)
Provide a key to a key store request.
void * DPS_GetNodeData(const DPS_Node *node)
Get application data pointer previously set by DPS_SetNodeData()
DPS_Status DPS_SetPublicationData(DPS_Publication *pub, void *data)
Store a pointer to application data in a publication.
DPS_KeyCert.
Definition: dps.h:123
Elliptic curve key data.
Definition: dps.h:155
DPS_Status DPS_SetKeyAndId(DPS_KeyStoreRequest *request, const DPS_Key *key, const DPS_KeyId *keyId)
Provide a key and key identifier to a key store request.
DPS_Status DPS_Subscribe(DPS_Subscription *sub, DPS_PublicationHandler handler)
Start subscribing to a set of topics.
const uint8_t * x
X coordinate.
Definition: dps.h:157
int DPS_Status
The status code type.
Definition: err.h:41
const char * cert
The certificate in PEM format.
Definition: dps.h:168
DPS_Status DPS_ShutdownNode(DPS_Node *node, DPS_OnNodeShutdown cb, void *data)
Shutdowns a node.
A buffer.
Definition: dps.h:904
void DPS_DestroyAddress(DPS_NodeAddress *addr)
Frees resources associated with an address.
DPS_Status DPS_SetCA(DPS_KeyStoreRequest *request, const char *ca)
Provide a trusted CA chain to a key store request.
DPS_Publication * DPS_CreatePublication(DPS_Node *node)
Allocates storage for a publication.
DPS_KeyStore * DPS_CreateKeyStore(DPS_KeyAndIdHandler keyAndIdHandler, DPS_KeyHandler keyHandler, DPS_EphemeralKeyHandler ephemeralKeyHandler, DPS_CAHandler caHandler)
Creates a key store.
DPS_Status DPS_SetTrustedCA(DPS_MemoryKeyStore *mks, const char *ca)
Create or replace the trusted CA(s) in the key store.
DPS_Status DPS_SetNodeData(DPS_Node *node, void *data)
Store a pointer to application data in a node.
Certificate key data.
Definition: dps.h:167
NIST P-384 also known as secp384r1.
Definition: dps.h:143
void(* DPS_PublicationHandler)(DPS_Subscription *sub, const DPS_Publication *pub, uint8_t *payload, size_t len)
Function prototype for a publication handler called when a publication is received that matches a sub...
Definition: dps.h:1137
DPS_Status DPS_DestroyPublication(DPS_Publication *pub, DPS_OnPublicationDestroyed cb)
Delete a publication and frees any resources allocated.
DPS_NodeAddress * DPS_CreateAddress(void)
Creates a node address.
DPS_KeySymmetric symmetric
DPS_KEY_SYMMETRIC.
Definition: dps.h:180
DPS_Status(* DPS_KeyHandler)(DPS_KeyStoreRequest *request, const DPS_KeyId *keyId)
Function prototype for a key store handler called when a key with the provided key identifier is requ...
Definition: dps.h:236
uint32_t DPS_AckGetSequenceNum(const DPS_Publication *pub)
Get the sequence number being acknowledged, only valid with the body of the DPS_AcknowledgementHandle...
size_t DPS_PublicationGetNumTopics(const DPS_Publication *pub)
Get the number of topics in a publication.
const char * DPS_SubscriptionGetTopic(const DPS_Subscription *sub, size_t index)
Get a topic for an active subscription.
DPS_ECCurve curve
The named curve.
Definition: dps.h:156
void(* DPS_OnSubscriptionDestroyed)(DPS_Subscription *sub)
Function prototype for callback function called when a subscription is destroyed. ...
Definition: dps.h:1155
Status codes.
void DPS_PublicationRemoveSubId(DPS_Publication *pub, const DPS_KeyId *keyId)
Removes a key identifier to use for encrypted publications.
const uint8_t * id
the identifier of the key
Definition: dps.h:190
DPS_Status DPS_DestroyNode(DPS_Node *node, DPS_OnNodeDestroyed cb, void *data)
Destroys a node and free any resources.
const DPS_UUID * DPS_PublicationGetUUID(const DPS_Publication *pub)
Get the UUID for a publication.
void(* DPS_OnUnlinkComplete)(DPS_Node *node, const DPS_NodeAddress *addr, void *data)
Function prototype for function called when a DPS_Unlink() completes.
Definition: dps.h:643
DPS_KeyCert cert
DPS_KEY_EC_CERT.
Definition: dps.h:182
const uint8_t * key
Key data.
Definition: dps.h:132
void * DPS_GetKeyStoreData(const DPS_KeyStore *keyStore)
Get application data pointer previously set by DPS_SetKeyStoreData().
const char * DPS_PublicationGetTopic(const DPS_Publication *pub, size_t index)
Get a topic for a publication.
DPS_Node * DPS_PublicationGetNode(const DPS_Publication *pub)
Get the local node associated with a publication.
uint32_t DPS_PublicationGetSequenceNum(const DPS_Publication *pub)
Get the sequence number for a publication.
struct _DPS_KeyEC DPS_KeyEC
Elliptic curve key data.
const DPS_NodeAddress * DPS_GetListenAddress(DPS_Node *node)
Get the address this node is listening for connections on.
DPS_Status DPS_Link(DPS_Node *node, const char *addrText, DPS_OnLinkComplete cb, void *data)
Link the local node to a remote node.
DPS_Status DPS_AckPublication(const DPS_Publication *pub, const uint8_t *ackPayload, size_t len)
Acknowledge a publication.
DPS_Status(* DPS_KeyAndIdHandler)(DPS_KeyStoreRequest *request)
Function prototype for a key store handler called when a key and key identifier is requested...
Definition: dps.h:219
void * DPS_GetSubscriptionData(DPS_Subscription *sub)
Get application data pointer previously set by DPS_SetSubscriptionData()
DPS_Status DPS_ResolveAddress(DPS_Node *node, const char *host, const char *service, DPS_OnResolveAddressComplete cb, void *data)
Resolve a host name or IP address and service name or port number.
size_t len
Size of key data.
Definition: dps.h:133
size_t len
the length of the identifier, in bytes
Definition: dps.h:191
void(* DPS_OnLinkLoss)(DPS_Node *node, const DPS_NodeAddress *addr, void *data)
Function prototype for function called when a link is lossed.
Definition: dps.h:664
void(* DPS_OnNodeShutdown)(DPS_Node *node, void *data)
Function prototype for callback function called when a node is shutdown.
Definition: dps.h:519
int DPS_PublicationIsAckRequested(const DPS_Publication *pub)
Check if an acknowledgement was requested for a publication.
void * DPS_GetPublicationData(const DPS_Publication *pub)
Get application data pointer previously set by DPS_SetPublicationData()
const char * privateKey
The optional private key in PEM format.
Definition: dps.h:169
DPS_Status DPS_PublicationAddSubId(DPS_Publication *pub, const DPS_KeyId *keyId)
Adds a key identifier to use for encrypted publications.
const DPS_KeyId * DPS_PublicationGetSenderKeyId(const DPS_Publication *pub)
Get the key identifier of a publication.
DPS_Status DPS_SetContentKey(DPS_MemoryKeyStore *keyStore, const DPS_KeyId *keyId, const DPS_Key *key)
Create or replace a key with the specified key identifier in the key store.
DPS_Status DPS_SetNetworkKey(DPS_MemoryKeyStore *keyStore, const DPS_KeyId *keyId, const DPS_Key *key)
Create or replace the network key in the key store.
DPS_Node * DPS_CreateNode(const char *separators, DPS_KeyStore *keyStore, const DPS_KeyId *keyId)
Allocates space for a local DPS node.
const DPS_KeyId * DPS_AckGetSenderKeyId(const DPS_Publication *pub)
Get the key identifier of an acknowledgement, only valid with the body of the DPS_AcknowledgementHand...
void DPS_DestroyMemoryKeyStore(DPS_MemoryKeyStore *keyStore)
Destroys a previously created in-memory key store.
void(* DPS_AcknowledgementHandler)(DPS_Publication *pub, uint8_t *payload, size_t len)
Function prototype for a publication acknowledgement handler called when an acknowledgement for a pub...
Definition: dps.h:838
DPS_Status(* DPS_CAHandler)(DPS_KeyStoreRequest *request)
Function prototype for a key store handler called when the trusted CA chain is requested.
Definition: dps.h:270
size_t DPS_SubscriptionGetNumTopics(const DPS_Subscription *sub)
Get the number of topics registered with an active subscription.
Symmetric key data.
Definition: dps.h:131
int16_t DPS_PublicationGetTTL(const DPS_Publication *pub)
Get the TTL for a publication.
DPS_Status DPS_SetKeyStoreData(DPS_KeyStore *keyStore, void *data)
Store a pointer to application data in a key store.
An identifier of a key in a key store.
Definition: dps.h:189
DPS_NodeAddress * DPS_SetAddress(DPS_NodeAddress *addr, const char *addrText)
Set a node address.
DPS_Status DPS_Unlink(DPS_Node *node, const DPS_NodeAddress *addr, DPS_OnUnlinkComplete cb, void *data)
Unlink a local node from a remote node.
void(* DPS_AckPublicationBufsComplete)(DPS_Publication *pub, const DPS_Buffer *bufs, size_t numBufs, DPS_Status status, void *data)
Called when DPS_AckPublicationBufs() completes.
Definition: dps.h:992
DPS_Publication * DPS_CopyPublication(const DPS_Publication *pub)
Creates a partial copy of a publication that can be used to acknowledge the publication.
DPS_ECCurve
Allowed elliptic curves.
Definition: dps.h:141
struct _DPS_KeyStoreRequest DPS_KeyStoreRequest
Opaque type for a key store request.
Definition: dps.h:202
void(* DPS_OnResolveAddressComplete)(DPS_Node *node, const DPS_NodeAddress *addr, void *data)
Function prototype for function called when a DPS_ResolveAddress() completes.
Definition: dps.h:686
DPS_KeyStore * DPS_KeyStoreHandle(DPS_KeyStoreRequest *request)
Returns the DPS_KeyStore* of a key store request.
struct _DPS_Node DPS_Node
Opaque type for a node.
Definition: dps.h:450
const uint8_t * d
D coordinate.
Definition: dps.h:159
const uint8_t * y
Y coordinate.
Definition: dps.h:158
void(* DPS_PublishBufsComplete)(DPS_Publication *pub, const DPS_Buffer *bufs, size_t numBufs, DPS_Status status, void *data)
Called when DPS_PublishBufs() completes.
Definition: dps.h:918