From: SourceForge.net <no...@so...> - 2004-03-24 18:03:04
|
Patches item #901434, was opened at 2004-02-20 17:42 Message generated for change (Comment added) made by slif You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=901434&group_id=12694 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Michael J. Slifcak (slif) Assigned to: Nobody/Anonymous (nobody) Summary: Support IPv6 on win32 Initial Comment: Problem: Net-SNMP uses winsock 1.x for Windows, which does not support IPv6 features of many Windows TCP/IP stacks. Winsock 2.2 is supported on all Windows NT4.x or later versions. Winsock 2.2 is not readily available on Windows 3.1 nor Windows 95. There may be issues with some versions of Windows 98 as well. Solution: Apply this patch to use winsock 2.2 in win32 builds This patch will use Winsock 2.2 headers and libraries throughout the Net-SNMP source tree. This patch works for MSVC builds (except Perl build dies using winsock2.h) mingw builds and runs most Perl tests (except conf), yet does not create AgentX sockets. Those are problems not atributedcd . to this patch. cygwin build is not tested. Required for mingw: must have w32api-2.5.tar.gz or later installed ---------------------------------------------------------------------- >Comment By: Michael J. Slifcak (slif) Date: 2004-03-24 10:57 Message: Logged In: YES user_id=88697 I've installed the original and the winsock 2 versions of V5-1-patches on Windows 2000, Windows NT, and Windows 98, and I see no change whatsoever in performance or behavior. The winsock2 version was created by applying the 'mkwsock2patch.sh' script from patch #901434 to the source base, then build and install. I've built and installed these flavors of win32 platforms MSVC - built using the MSVS IDE and 'install-net-snmp.BAT' MSVC - using Alex Burger's build.pl mingw - using GCC configure hints from Andy Smith cygwin - same as mingw All work no differently than their winsock 1.0 counterparts. Based on these experiments, and on input from you, dear readers, it would be nice to know if the project can move forward and adopt winsock 2.x for its baseline WOSA socket library. ---------------------------------------------------------------------- Comment By: Michael J. Slifcak (slif) Date: 2004-03-20 13:45 Message: Logged In: YES user_id=88697 useWinsock2.sh has been applied to the main branch March 5 as indicated. Investigating on Windows 98 continues. It the systems run there, it would be OK to move the 5.1.x branch to winsock 2.x. Given the problems building Perl using winsock2.h, I would suggest continuing to use the winsock2.h header sparingly, as Dave Shield as started to do with the IPv6 code he has introduced. winsock2.h is fully backward compatible with winsock.h, so there is no problem with this strategy. ---------------------------------------------------------------------- Comment By: Wes Hardaker (hardaker) Date: 2004-03-19 19:33 Message: Logged In: YES user_id=76242 I'm not clear what the status of this patch is. Has it been applied or not? ---------------------------------------------------------------------- Comment By: Michael J. Slifcak (slif) Date: 2004-03-12 14:43 Message: Logged In: YES user_id=88697 the attached script mkwsock2patch.sh can be used to easily upgrade the header files, once the problems with Perl compiles is solved. Just change the setting of CHANGEHEADERS then run the script. Note that this script was used to alter the files in the main branch that were included in the course of applying patch #912447. ---------------------------------------------------------------------- Comment By: Michael J. Slifcak (slif) Date: 2004-03-05 08:41 Message: Logged In: YES user_id=88697 useWinsock2.sh has been applied to the main branch. Apply useWinsock1.sh to reverse the effects of useWinsock2.sh. ---------------------------------------------------------------------- Comment By: Michael J. Slifcak (slif) Date: 2004-03-05 08:39 Message: Logged In: YES user_id=88697 1.0.1 As per the mix'n'-match question, I've compiled using winsock.h and linked using ws2_32 (the winsock2 library), without problems. 1.0.2 There are four source modules in snmplib that today include winsock2.h but are not included in the MSVC build. I don't know if they are used in other builds. They will not be disturbed. 2. MSVC-build does not use configure.in. This is why the *.dsp files must change. Will also add HAVE_WINSOCK2 to win32/.../net-snmp-config.h 3. The configure.in change affects cygwin and mingw builds only. 4. Provide patch to ifdef HAVE_WINSOCK2 the MAKEWORD used in snmplib/system.c. 5. Provide reverse patch of *.dsp files for Windows 95 users, but this patch will not be applied. This will save Windows 95 users time in reverting those *.dsp files. Most likely, this patch will be a shell script, as the *.dsp files are composed of long strings of compile/link options, which are not conducive to patching. 6. Patches to be applied only to main branch, not to be applied to 5.1.x. Dave Shield wrote: >>>>Winsock.h is included primarily to define 'struct sockaddr' and the >>>>prototypes for BSD-style networking: socket(), bind(), connect(), etc. > >> >> >> <nods> >> With you so far.... >> >> >> > >>>>Winsock2.h is mostly equivalent to Winsock.h. As far as this project >>>>is currently concerned, the libraries have equivalent functions defined. > >> >> >> So we need to include one or the other header file, >> but it doesn't really matter which? >> >> Can you mix-n-match? >> I.e. #include <winsock.h> but link (and winsock_startup) using winsock2 ? >> >> (Yes, I realise that's a gross thing to want to do! But would it work?) >> >> >> >> > >>>>In other words, there is but one object to change, just the >>>>initialization key that MAKEWORD creates during winsock_startup(). > >> >> >> Again, that could be handled using #ifdef's quite happily. >> >> >> > >>>>The smallest change would be editing one line in snmplib/system.c >>>>(search for the use of MAKEWORD), followed by the configure.in >>>>change [for mingw, cygwin], > >> >> >> Hmmm.... I'm less happy about having to fiddle with 'configure.in' >> (and then presumably regenerate the 'configure' script itself). >> Can you point me at the patch where this is described? >> >> >> > >>>> and finally, making this substitution >>>>in the MSVC project files: wsock32.lib --> ws2_32.lib > >> >> >> Ummmm.... >> That's what I was afraid of. >> There's probably no way to handle that automatically. >> (At least not without running some sort of patch script) >> >> >> >> >> > >>>>Here is an alternative approach for users building on Windows 95: >>>> >>>> Offer a reverse patch to restore the winsock 1.x usage, which >>>> would reverse the changes to the *.dsp files and the snmplib/system.c >>>> file. This would make net-snmp available to Windows 95 users. > >> >> >> I suspect that we could quite reasonably leave it up to individual >> Win95 users to handle manually. As long as the instructions are >> detailed and clear. >> But something like: >> >> Edit win32/net-snmp-config.h and comment out the line: >> #define USING_WINSOCK2 >> >> would be preferable to telling them to edit half-a-dozen code files >> (including 'configure.in') and re-run autoconf. >> >> Editing the VC++ libraries for each project separately is a pain >> (I've had to do it a few times recently!), but is simple enough. >> Though it would be nice if there was a way to define a set of >> "standard" libraries, used for all projects. >> >> But I agree with Robert - this is a CVS main branch thing, not 5.1.x >> [SNIP] >> >> Dave >> >> ---------------------------------------------------------------------- Comment By: Michael J. Slifcak (slif) Date: 2004-02-23 23:10 Message: Logged In: YES user_id=88697 The Net-SNMP documentation does not clearly state which Windows operating systems are supported. Except that running as a Windows service (equivalent to a unix daemon) is supported on NT 4.0 or 2000. NEWS *3.3* mentioned "- library and apps supported under 32bit windows systems." *4.2.4* mentioned: "- The snmpd demon can properly run as a windows service" *5.1* mentioned: "- more windows build fixes" README.win32 from v5.1 claims that the agent (built with Plaform SDK) provides SNMP-SET support, and lists Windows 95/98/ME as a requirement, or Windows NT SP4 or later. README.win32 from v5.1, in the section discussing cygwin: "This has been tested for Windows 98 and Windows NT 4.0." Exactly what was tested, was not mentioned. ---------------------------------------------------------------------- Comment By: Michael J. Slifcak (slif) Date: 2004-02-20 17:44 Message: Logged In: YES user_id=88697 The MSVC build failure occurred using MSVC++ 6.0 SP5 and ActiveState Perl 5.8.2 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=901434&group_id=12694 |