I made some more progress with the fix but I'm not fully sure how it works. I checked the freebsd source code to figure out how it works. Compared to the linux source the code was very complicated as in linux there's a special ipx setsockopt option and so on. We have to pass SO_DEFAULT_HEADERS to setsockopt with as option SOPT_GET/SOPT_SET when we want go get/set the packet type. The structure to use is "struct ipx".
Perhaps you can try to build a fix as I don't have access to any FreeBSD box and can't test the patch. Note that in the function ws2_send we don't need to retrieve the ipx packet type as that won't be needed for freebsd as the linux/freebsd ipx sockaddr structure is different.
Regards, Roderick
On Thursday 09 September 2004 15:20, you wrote:
Hi,
The problem is like this. In case of the ipx protocol you can select different ipx types of ipx packets. On linux there's an entry in the sockaddr_ipx struct in which you can change and further you can change it at the ipx socket level using that SOL_IPX stuff. I wasn't aware that this stuff doesn't exist on freebsd. Unfortunately I don't have any freebsd experience, so I don't know about the way to do it on your OS. I will try to find a solution, if none can be found I'm affraight we need some #ifdef stuff.
Thanks,
Roderick
On Thursday 09 September 2004 14:55, you wrote:
The following change
revision 1.155 date: 2004/09/07 20:47:03; author: julliard; state: Exp; lines: +113 -0 Roderick Colenbrander thunderbird2k@gmx.net
- set ipx packet type
- add support for retrieving some ipx info
breaks FreeBSD 4.10 quite a bit:
/sw/gcc-3.3.4/bin/gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -DUSE_WS_PREFIX -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith -g -O2 -o socket.o socket.c socket.c: In function `WS2_send': socket.c:1120: error: `SOL_IPX' undeclared (first use in this function) socket.c:1120: error: (Each undeclared identifier is reported only once socket.c:1120: error: for each function it appears in.) socket.c:1120: error: `IPX_TYPE' undeclared (first use in this function) socket.c:1123: error: structure has no member named `sipx_type' socket.c: In function `WS_getsockopt': socket.c:1585: error: `SOL_IPX' undeclared (first use in this function) socket.c:1585: error: `IPX_TYPE' undeclared (first use in this function) socket.c: In function `WS_setsockopt': socket.c:2312: error: `SOL_IPX' undeclared (first use in this function) socket.c:2312: error: `IPX_TYPE' undeclared (first use in this function) gmake: *** [socket.o] Error 1
Concerning the error in socket.c, line 1120, SOL_IPX is not defined on FreeBSD 4.10, but there is a constant SOL_SOCKET which is supposed to be passed as the second parameter of getsockopt with the following description: "To manipulate options at the socket level, level is specified as SOL_SOCKET". Would that do the job?
Concerning the error in socket.c, line 1123, struct sockaddr_ipx looks as follows on FreeBSD 4.10:
struct sockaddr_ipx { u_char sipx_len; u_char sipx_family; struct ipx_addr sipx_addr; char sipx_zero[2]; };
Finally, I could not find anything remotely similiar to IPX_TYPE.
I hope this will allow you to fix this breakage? (To check for FreeBSD, you can use #ifdef __FreeBSD_...)
Thanks, Gerald