udi_buf_tag_t(3udi)
Buffer tag structure
SYNOPSIS
#include <udi.h>
typedef struct {
udi_tagtype_t tag_type;
udi_ubit32_t tag_value;
udi_size_t tag_off;
udi_size_t tag_len;
} udi_buf_tag_t;
MEMBERS tag_type is the type of tag represented by this tag structure. Although udi_tagtype_t is a bitmask type only one tag type may be specified in the udi_buf_tag_t structure (i.e. only one bit may be set).
tag_value is the value associated with this tag.
tag_off is the starting buffer data offset for which the tag applies.
tag_len is the length of data (in bytes) for which the tag applies. The tag_len value must not be zero.
DESCRIPTION The udi_buf_tag_t structure is used to describe a buffer tag. The range of data to which the tag applies is specified by the tag_off and tag_len fields; the tag_type specifies which type of tag is being described. The tag_value is the associated value for this tag (if any) as defined by the tag_type.
Table 13-2 Tag structure field usage
tag_typeUDI_BUFTAG_xxx |
tag_value |
tag_off |
tag_len |
BE16_CHECKSUM |
16-bit checksum |
start of region checksummed as big-endian 16-bit values |
number of bytes to checksum (if odd, an extra byte value of 0 is assumed: 16-bit array length = (tag_len+1)/2) |
SET_iBE16_CHECKSUM |
buffer offset at which to write the 16-bit big-endian checksum of the buffer data |
start of region to generate a 16-bit big-endian checksum over |
number of bytes to checksum |
SET_TCP_CHECKSUM |
unused |
start of IP header (including options) followed by TCP header and TCP data |
total byte length of IP header (including options), TCP header, and TCP data |
SET_UDP_CHECKSUM |
unused |
start of IP header (including options) followed by UDP header and UDP data |
total byte length of IP header (including options), UDP header, and UDP data |
TCP_CKSUM_GOOD |
checksum value (if known, otherwise zero) |
start of TCP header |
total byte length of TCP header and TCP data |
UDP_CKSUM_GOOD |
checksum value (if known, otherwise zero) |
start of UDP header |
total byte length of UDP header and UDP data |
IP_CKSUM_GOOD |
checksum value (if known, otherwise zero) |
start of IP header |
total byte length of IP header including options |
TCP_CKSUM_BAD |
unused |
start of TCP header |
total byte length of TCP header and TCP data |
UDP_CKSUM_BAD |
unused |
start of UDP header |
total byte length of UDP header and UDP data |
IP_CKSUM_BAD |
unused |
start of IP header |
total byte length of IP header including options |
DRIVER1...DRIVER8 |
driver-defined |
driver-defined |
driver-defined |
REFERENCES udi_buf_tag_set, udi_buf_tag_get