Re: [Squid-cvs] nt-2_5 squid/port/win32/include squid-mswin.h,1.1.2.32,1.1.2.33

From: Andrey Shorin <tolsty@dont-contact.us>
Date: Tue, 11 Oct 2005 21:46:46 +0400

Hello Serassio,

Tuesday, October 11, 2005, 21:07:39, Serassio Guido wrote:

>>>>Index: squid-mswin.h
>>>> #if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
>>>
>>>>+/* No param.h on Windows */
>>>>+#define MAXHOSTNAMELEN 256
>>>>+

> But I don't like at all your solution.
> We must set MAXHOSTNAMELEN to the real maximum value supported from
> Winsocks2 interface.
> So MAXHOSTNAMELEN should be set to a value specified from a Windows include.
> I don't know if 256 is safe for Windows function calls.
Acording to RFC 2181 (section 11) a value of 255 octecs, including
separators, must (should?) be used as restriction to full host name
length.

WinDNS.h in Platform SDK:
//
// DNS Names limited to 255, 63 in any one label
//

#define DNS_MAX_NAME_LENGTH (255)
#define DNS_MAX_LABEL_LENGTH (63)

#define DNS_MAX_NAME_BUFFER_LENGTH (256)
#define DNS_MAX_LABEL_BUFFER_LENGTH (64)

> nt-2_5 can be build in "native" mode using MinGW or MS VisualStudio
> 6, and in "emulation" mode with Cygwin.

> The MinGW build process is exactly like Cygwin.
Thank you.

-- 
Best regards,
 Andrey Shorin
Received on Tue Oct 11 2005 - 11:46:53 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Nov 01 2005 - 12:00:07 MST