> > 2.5 MAXLINKNAMELEN > > > > The MAXLINKNAMELEN constant has been added to <sys/param.h>, and it > > defines the longest possible permitted datalink name (including the > > terminating NULL character.) Its stability level is Committed. > > > > Note that the existing DLPI_LINKNAME_MAX constant remains, but it only > > intended for use by libdlpi consumers, whereas MAXLINKNAMELEN is > > appropriate for more general use. > > What relation does this have, if any, to the other #define'd > constants such as LIFNAMSIZ, that are used by networking > in, for example, struct lifreq?
The LIFNAMSIZ constant represents the maximum length of an IP interface and should only be used for that purpose. The MAXLINKNAMELEN constant represents the maximum length of a datalink name and should only be used for that purpose. Since the IP physical interface name often comes from the datalink name, they are related, but they are neither the same namespace nor syntactically identical -- e.g., an IP interface may include a trailing logical interface identifier such as `:2', whereas a datalink name may not (further, `:' is an invalid character in a datalink name). -- meem
