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.
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; } ;
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:
|
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. |