This example shows three ways to create an attribute mask in addition to instantiating a mask structure and or'ing the desired enumerated fields.
#include <tsix/t6attrs.h> #include <tsol/label.h> main() { t6mask_t suppmask, allocmask, presentmask; t6mask_t getmask, recvmask; t6attr_t attrs, getattrs, recvattrs; recvmask = T6M_ALL_ATTRS; recvattrs = t6alloc_blk(recvmask); getmask = T6M_CLEARANCE; getattrs = t6alloc_blk(getmask); /* Get mask of system-supported attributes */ suppmask = t6supported_attrs(); /* Get mask of attributes for which space is */ /* allocated in rcvattrs (T6M_ALL_ATTRS)*/ allocmask = t6allocated_attrs(rcvattrs); /* Get mask of attributes present in getattrs */ presentmask = t6present_attrs(getattrs); }