---
name: "xpacmdadd"
section: "3"
platform: "linux"
package: "libxpa-dev"
version: "2.1.20-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/xpacmdadd"
---

# xpacmdadd(3)

add a command to an XPA command public access point

## NAME

**XPACmdAdd - add a command to an XPA command public access point**

## SYNOPSIS

```
  #include <xpa.h>
  XPACmd XPACmdAdd(XPA xpa, char *name, char *help,
                   int (*send_callback)(),
                   void *send_data, char *send_mode,
                   int (*rec_callback)(),
                   void *rec_data,  char *rec_mode);
```

## DESCRIPTION

Add a command to an XPA command access point. The XPA argument specifies the XPA struct returned by a call to *XPANewCmd()*. The name argument is the name of the command. The other arguments function identically to the arguments in the *XPANew()* command, i.e., the send\_callback and rec\_callback routines have identical calling sequences to their *XPANew()* counterparts, with the exceptions noted below.

When help is requested for a command access point using:

```
  xpaget -h class:name
```

all of the command help strings are listed.  To get help for a given command, use:

```
  xpaget -h class:name cmd
```

Also, the acl keyword in the send\_mode and receive\_mode strings is global to the access point, not local to the command.  Thus, the value for the acl mode should be the same in all send\_mode (or receive\_mode) strings for each command in a command access point. (The acl for send\_mode need not be the same as the acl for receive\_mode, though).

## SEE ALSO

See xpa(n) for a list of XPA help pages
