[Nut-upsdev] Default NUT PORT (errrr...)

Arjen de Korte nut+devel at de-korte.org
Tue Jan 16 13:08:47 CET 2007


[ getaddrinfo ]

> Ah, right. I didn't know it was in POSIX.

The Open Group is your friend:

http://www.opengroup.org/cgi-bin/kman2?value=getaddrinfo

There even is a nice FireFox search bar plugin:

http://mycroft.mozdev.org/download.html?name=unix.org&submitform=Search

>> I do think however, that the upscli_splitname() doesn't really belong in
>> the API. How a client addresses parsing a upsname / hostname /
>> portnumber triplet is up to the client, not of the API. Also, setting
>> defaults in absence of some required values (hostname, portnumber), is
>> something a client should handle, not the API.
> I like the idea that NUT defines some standard string notation for a
> ups-address, and that this is made available to clients. Some
> specialized clients may want to handle their own parsing, but in
> general it is less confusing if all clients use the same notation, not
> to mention it's easier to extend the notation in the future.

Point taken. Handling these things in the API will provide consistency
throughout the clients. I'll add the things mentioned (like making
'localhost' the default when no hostname is specified and an
upscli_splithost() function) later today.

Best regards, Arjen




More information about the Nut-upsdev mailing list