Purpose
Extracts a tag (with its associated elements) from a buffer of collected
tag strings.
Library
The signaling interface library (libsl.a).
C syntax
#include <sltag.h>
...
SL_RET_CODE sl_get_tag (
char * buffer,
char * tag,
char * destination
int destination_len
);
Description
Searches buffer for the tag label tag. If found, the
tag, with its value and attributes, is extracted and appended to destination.
Parameters
- buffer
- A string containing one or more tag strings.
- tag
- A string containing a tag label
- destination
- A string variable to which the tag string is copied.
- destination_len
- The total length of destination (the string capacity in bytes).
Return values
- SLRC_OK
- Successful.
- SLRC_NOT_FOUND
- Could not find tag.
- SLRC_OVERFLOW
- Insufficient space in destination to store the tag string.
- SLRC_INVALID_TAG
- The tag string containing tag is syntactically incorrect, tag
value was not changed.
- SLRC_DUPLICATE
- The targetted tag label in buffer already exists in destination.
- SLRC_NULL_PTR
- buffer,tag or destination is a null pointer