The named data streams API uses a combination of standard system calls and VxFS API calls to utilize its functionality.
The following is an example of pseudo code to query named data streams:
if ((fd = open("named_stream_file", O_RDWR | O_CREAT | O_TRUNC,
sprintf(error_buf, "%s, Error Opening File %s ", argv[0],
/* Write to the regular file as usual */
/* Create several named data streams for file
sprintf(attrname, "%s%d", "stream", i);
nfd = vxfs_nattr_open(fd, attrname, O_WRONLY | O_CREAT,
"%s, Error Opening Attribute file %s/./%s ",
/* Write some data to the stream file */