DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

udi_buf_tag_get(3udi)


Gets one or more tags from a buffer

SYNOPSIS

#include <udi.h>

udi_ubit16_t udi_buf_tag_get (

	udi_buf_t *buf,

	udi_tagtype_t tag_type,

	udi_buf_tag_t *tag_array,

	udi_ubit16_t tag_array_length,

	udi_ubit16_t tag_start_idx );
 

ARGUMENTS buf is the buffer for which the tag information is to be returned

tag_type is a bitmask of tag types; only tags which correspond to bits set in this bitmask will be returned. For convenience, the tag category mask values may be used for this argument.

tag_array is a pointer to an array of udi_buf_tag_t structures that are to be filled in with the obtained tag information.

tag_array_length is the number of entries that may be written to tag_array.

tag_start_idx is the number of tags of the specified type to skip before returning tag information.

DESCRIPTION The udi_buf_tag_get operation is used to obtain information about tags which are attached to the buffer. Any available tags matching of of the requested tag_type bit values will be written into the tag_array (after skipping the first tag_start_idx tags) until either all tags of the target types or tag_array_length number of tags have been written.

return values This function returns the actual number of tags of the selected types, regardless of the input tag_start_idx. The tag_start_idx may be used to iterate through all tags if tag_array_length is less than the number of defined tags.

REFERENCES udi_buf_tag_t, udi_buf_tag_set

13.7.2 Buffer Tag Utilities

This section defines a set of utility routines that may be used to efficiently make use of buffer tags. The functionality provided by these utility routines could alternatively be implemented by discrete operations using udi_buf_tag_get and udi_buf_tag_set and other buffer management service calls. These utility routines are provided to assist in implementing and supporting the most common set of buffer tag operations, such as calculating network data checksums.


UDI Core Specification Contents