Sebastien Roy wrote: > On Thu, 2006-08-17 at 10:47 -0400, Peter Memishian wrote: >> > I think that should change. Maybe not as part of UV, but eventually I >> > can see pressure to change it. >> >> I don't think it can be changed without breaking lots of DLPI consumers >> that have worked for decades. This is the same reason why we require DLPI >> link names to end in a digit. > > Embedding non-7bit-ascii characters in the interface name might > technically work by accident without altering any of the software. > After all, you can stuff anything you want in a "char *", and as long as > strcmp and printf do the right thing, the software is none the wiser
For some character sets (like UTF-8), I would expect strcmp and printf to do the right thing. 7 bit ASCII is a subset of UTF-8. My understanding is that UTF-8 was designed that way on purpose so that things like printf and strcmp would continue to work without modification. There are multibyte character set encodings out there (I can't think of them off the top of my head) where you need special routines to copy and print them because a NUL character (i.e. '\0') could be one byte of a multi-byte character. > about what octects are contained therein. I don't think dladm will have > any means of preventing me from stuffing a '?' in one of the link names > I pass it. It is certainly not going to go byte by byte making sure > that all of the 8th bits are clear in every string. > I've seen routines to detect character sets. The ones I remember were GNU utilities, so we couldn't use them in Solaris. It can be done, I just don't know how much work it would be. > This means very little, however, as regardless of what happens to > accidentally work, we probably can't document anything like this without > dedicating resources to investigate the implications on other software > that handle interface names (including standard APIs). > > -Seb > > True. I still think this is something that should be considered, probably in a future version. If we're going to allow an administrator to give an interface a meaningful arbitrary name, why not allow one in his/her native language? I still think there could be some wrapper or shim that would convert a name in UTF-8 or big5 or something else into the US ASCII characters required by DLPI. I don't think it would be easy, but I still think it's possible, and worthwhile. Dan > _______________________________________________ > clearview-discuss mailing list > clearview-discuss at opensolaris.org > http://opensolaris.org/mailman/listinfo/clearview-discuss
