Solstice X.25 9.2 Developer's Guide

12.7.2.11 Network User Identification

This is set as follows (in the example below, NUI is an ASCII string):

char   nui_str[] = "sunhost";
 f.type = T_NUI;
 f.f_nui.nui_len = strlen(nui_str);
 bcopy(nui_str, f.f_nui.nui_data, strlen(nui_str));
 error = ioctl(s, X25_SET_FACILITY, &f); 

Solstice X.25 permits a maximum length of 64 (MAX_NUI) for Network User Identification facility.

To read this facility:

f.type = T_NUI;
 error = ioctl(s, X25_GET_FACILITY, &f);
 nui_str = f.f_nui.nui_data;