AF_UNIX_CCSID address family

The AF_UNIX_CCSID family is compatible with the AF_UNIX address family and has the same limitations.

They both can be either connectionless or connection-oriented, and no external communication functions connect the two processes. The difference is that sockets with the address family AF_UNIX_CCSID use the sockaddr_unc address structure. This address structure is similar to sockaddr_un, but it allows path names in UNICODE or any CCSID by using the Qlg_Path_Name_T format.

However, because an AF_UNIX socket may return the path name from an AF_UNIX_CCSID socket in an AF_UNIX address structure, path size is limited. AF_UNIX only supports 126 characters so AF_UNIX_CCSID is also limited to 126 characters.

A user cannot exchange AF_UNIX and AF_UNIX_CCSID addresses on a single socket. When AF_UNIX_CCSID is specified on the socket() call, all addresses must be sockaddr_unc on later API calls.
struct sockaddr_unc {
     short             sunc_family;
     short             sunc_format;
     char              sunc_zero[12];
     Qlg_Path_Name_T   sunc_qlg;
     union {
     char              unix[126];
     wchar_t           wide[126];
     char*             p_unix;
     wchar_t*          p_wide;
    }                  sunc_path;
    } ;
Table 1. AF_UNIX_CCSID address structure
Address structure field Definition
sunc_family This field contains the address family, which is always AF_UNIX_CCSID.
sunc_format This field contains two defined values for the format of the path name:
  • SO_UNC_DEFAULT indicates a wide path name using the current default CCSID for integrated file system path names. The sunc_qlg field is ignored.
  • SO_UNC_USE_QLG indicates that the sunc_qlg field defines the format and CCSID of the path name.
sunc_zero This field is reserved. Set this field to hexadecimal zeros.
sunc_qlg This field specifies the path name format.
sunc_path This field contains the path name. It is a maximum of 126 characters and may be single byte or double byte. It may be contained within the sunc_path field or allocated separately and pointed to by sunc_path. The format is determined by sunc_format and sunc_qlg.
Related reference
Use AF_UNIX_CCSID address family
AF_UNIX address family
Related information
Path name format