-void sr_datastore_put(struct sr_datastore *ds, void *data, unsigned int length,
- int in_unitsize, int *probelist)
+/**
+ * Append some data to the specified datastore.
+ *
+ * @todo More elaborate function description.
+ * @todo This function should use the (not yet available) 'chunksize' field
+ * of struct sr_datastore (instead of hardcoding DATASTORE_CHUNKSIZE).
+ * @todo in_unitsize and probelist are unused?
+ * @todo A few of the parameters can be const.
+ * @todo Ideally, 'ds' should be unmodified upon errors.
+ * @todo Should 0 be allowed as length?
+ * @todo Specify/document the data format of the 'data' parameter.
+ *
+ * @param ds Pointer to the datastore which shall receive the data.
+ * Must not be NULL.
+ * @param data Pointer to the memory buffer containing the data to add.
+ * Must not be NULL.
+ * @param length Length of the data to add (in number of bytes).
+ * @param in_unitsize The unit size (>= 1) of the input data.
+ * @param probelist Pointer to a list of integers (probe numbers). The probe
+ * numbers in this list are 1-based, i.e. the first probe
+ * is expected to be numbered 1 (not 0!). Must not be NULL.
+ *
+ * @return SR_OK upon success, SR_ERR_MALLOC upon memory allocation errors,
+ * or SR_ERR_ARG upon invalid arguments. If something other than SR_OK
+ * is returned, the value/state of 'ds' is undefined.
+ */
+SR_API int sr_datastore_put(struct sr_datastore *ds, void *data,
+ unsigned int length, int in_unitsize, const int *probelist)