---
name: "dpm_getreqsummary"
section: "3"
platform: "linux"
package: "libdpm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dpm_getreqsummary"
---

# dpm\_getreqsummary(3)

get summary for a set of requests

## NAME

dpm\_getreqsummary - get summary for a set of requests

## SYNOPSIS

**#include \<sys/types.h\>**\
 **#include "dpm\_api.h"**

**int dpm\_getreqsummary (int** *nbtokens***,** **char \*\****r\_tokens***,** **int \****nbreplies***,** **struct dpm\_reqsummary \*\****summaries***)**

## DESCRIPTION

**dpm\_getreqsummary** gets summary for a set of requests.

The input arguments are:

- *nbtokens*

  specifies the number of tokens in the request.

- *r\_tokens*

  specifies an array of tokens returned by previous get/put/copy requests.

The output arguments are:

- *nbreplies*

  will be set to the number of replies in the array of request summaries.

- *summaries*

  will be set to the address of an array of dpm\_reqsummary structures allocated by the API. The client application is responsible for freeing the array when not needed anymore.

```
struct dpm_reqsummary {
	char		r_token[CA_MAXDPMTOKENLEN+1];
	char		r_type;
	int		nb_reqfiles;
	int		nb_queued;
	int		nb_finished;
	int		nb_progress;
};
```

## RETURN VALUE

This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, **serrno** is set appropriately.

## ERRORS

- **EFAULT**

  *r\_tokens ,* *nbreplies* or *summaries* is a NULL pointer.

- **ENOMEM**

  Memory could not be allocated for storing the reply.

- **EINVAL**

  *nbtokens* is not strictly positive or the specified tokens are invalid/unknown.

- **SENOSHOST**

  Host unknown.

- **SEINTERNAL**

  Database error.

- **SECOMERR**

  Communication error.
