Re: Problem connecting to IPv4 in IPv6 format
On Thu, Nov 27, 2003 at 06:33:47PM -0500, David Dawes wrote: >On Wed, Nov 26, 2003 at 12:27:26PM -0500, David Dawes wrote: >>With the new IPv6 code, clients connect to IPv4 addresses using AF_INET6 >>with the compatibility address ':::a.b.c.d' where a.b.c.d is the IPv4 >>address. >> >>I noticed this while trying to figure out why connections from a >>FreeBSD 5.1 system to another system (via IPv4 addresses) weren't >>working. It turns out that FreeBSD 5.1 defaults to not allowing >>this method of connecting to IPv4 hosts. If I change the default >>with 'sysctl net.inet6.ip6.v6only=0' it then works. >> >>It looks like our xtrans code should be using AF_INET connections >>when connecting to IPv4 addresses. I believe we did the equivalent >>thing on the listening end already. > >Incidentally related to this is another problem I've run in to. Old >FreeBSD X apps, that use a version of libc without IPv6 support, crash >when run on a recent system when trying to connect to a remote display >when using our newly built X libraries. I have a patch that restores >compatibility to our X libraries by checking if the IPv6 libc support >is available at run-time, and falling back to the IPv4 code otherwise. >I think it is "complete enough", but I'd like some feedback before >committing it. > >This patch does not fix the original problem. The second patch below, in addition to the previous patch deals, with the original problem in my limited testing so far. David -- David Dawes developer/release engineer The XFree86 Project www.XFree86.org/~dawes --- /tmp/Xtranssock.c Thu Nov 27 18:44:58 2003 +++ ./Xtranssock.c Thu Nov 27 20:23:43 2003 @@ -206,6 +206,9 @@ #define NUMSOCKETFAMILIES (sizeof(Sockettrans2devtab)/sizeof(Sockettrans2dev)) +#ifdef TCPCONN +static int TRANS(SocketINETClose) (XtransConnInfo ciptr); +#endif #ifdef UNIXCONN @@ -397,7 +400,7 @@ #endif #if defined(IPv6) && defined(AF_INET6) -if (haveIPv6) +if (haveIPv6 && ciptr->family == AF_INET6) { namelen = sizeof(socknamev6); socknamePtr = &socknamev6; @@ -529,19 +532,18 @@ #ifdef TRANS_CLIENT static XtransConnInfo -TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, char *protocol, -char *host, char *port) - +TRANS(SocketOpenCOTSClientBase) (char *transname, char *protocol, + char *host, char *port, int previndex) { XtransConnInfo ciptr; -inti = -1; +inti = previndex; PRMSG (2, "SocketOpenCOTSClient(%s,%s,%s)\n", protocol, host, port); SocketInitOnce(); -while ((i = TRANS(SocketSelectFamily) (i, thistrans->TransName)) >= 0) { +while ((i = TRANS(SocketSelectFamily) (i, transname)) >= 0) { if ((ciptr = TRANS(SocketOpen) ( i, Sockettrans2devtab[i].devcotsname)) != NULL) break; @@ -549,10 +551,10 @@ if (i < 0) { if (i == -1) PRMSG (1,"SocketOpenCOTSClient: Unable to open socket for %s\n", - thistrans->TransName, 0, 0); + transname, 0, 0); else PRMSG (1,"SocketOpenCOTSClient: Unable to determine socket type for %s\n", - thistrans->TransName, 0, 0); + transname, 0, 0); return NULL; } @@ -563,6 +565,15 @@ return ciptr; } +static XtransConnInfo +TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, char *protocol, +char *host, char *port) +{ +return TRANS(SocketOpenCOTSClientBase)( + thistrans->TransName, protocol, host, port, -1); +} + + #endif /* TRANS_CLIENT */ @@ -1376,7 +1387,6 @@ #if defined(IPv6) && defined(AF_INET6) struct addrinfohints; char ntopbuf[INET6_ADDRSTRLEN]; -struct sockaddr_in6 tmpsin6; intresetonce = 0; #endif struct sockaddr_in sockname; @@ -1489,26 +1499,27 @@ ntohs(sin->sin_port), 0, 0); if (Sockettrans2devtab[ciptr->index].family == AF_INET6) { - /* We have IPv6 socket, need to map IPv4 address to IPv6 */ - char *v4addr = (char *) &sin->sin_addr.s_addr; - bzero(&tmpsin6, sizeof(tmpsin6)); -#ifdef SIN6_LEN - tmpsin6.sin6_len = sizeof(tmpsin6); -#endif - tmpsin6.sin6_family = AF_INET6; - tmpsin6.sin6_port = sin->sin_port; - tmpsin6.sin6_addr.s6_addr[10] = 0xff; - tmpsin6.sin6_addr.s6_addr[11] = 0xff; - tmpsin6.sin6_addr.s6_addr[12] = v4addr[0]; - tmpsin6.sin6_addr.s6_addr[13] = v4addr[1]; - tmpsin6.sin6_addr.s6_addr[14] = v4addr[2]; - tmpsin6.sin6_addr.s6_addr[15] = v4addr[3]; - - socketaddr = (struct sockaddr *) &tmpsin6; - socketaddrlen = sizeof(tmpsin6); - PRMSG (
:-)
Saven Inkjet Inks 20% OFF NOW!!! :-) > > Beijing Saven Times Digital Technology CO., Ltd is specialized in producing > Piezo Solvent based durable inks for super wide and grand format inkjet > printers > all around the world. We are the one of the largest manufacturer of > solvent-based inks in China market. We have over 12,000 sq meters factory, > more 100 staffs. > Our inks are compatible with these printers as following: > Vutek, Nur Salsa, Fresco, Salsa Ultima, Blueboard, Outboard, Scitex, Signtech, > Salsa, Infiniti, DGI , TSL ect? > Advantage: 1. Saven uses the best pigment & dye in the world. > 2.Compatible with wide range of grand format printers. > 3. Non-clogging formula to last nozzle performance much longer. > 4. 2 years or more outdoor warranty unlaminated. > 5.Consistency in color and quality, easy to calibrate and do not require > special color management. > Now Saven welcome all the end users and customers in the world to cooperate > with us. We will give the ?nbsp;Special Great Price?nbsp;to the special you. > > C128S 5L/Bottle > C128A 5L/Bottle > UV500 5L/Bottle > UV720 5L/Bottle > Cleaning Fluch 5L/Bottle > > Color: C ,M , Y, K, LC, LM, LY, LK > (CIF$19.99 YOUR COUNTRYSIDE!!! start) > > With best customers service > With best price > With Highest Quality > With A Full Rang of of Using. > You could stop your seeking now. All your require can be satisfied in SAVEN! > More information plese read: www.saven.com.cn > E-mail: [EMAIL PROTECTED] > Tel: 86-010-63979935 > Fax:86-010-63985136 > Contactor: Mr. Franky ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: Problem connecting to IPv4 in IPv6 format
On Wed, Nov 26, 2003 at 12:27:26PM -0500, David Dawes wrote: >With the new IPv6 code, clients connect to IPv4 addresses using AF_INET6 >with the compatibility address ':::a.b.c.d' where a.b.c.d is the IPv4 >address. > >I noticed this while trying to figure out why connections from a >FreeBSD 5.1 system to another system (via IPv4 addresses) weren't >working. It turns out that FreeBSD 5.1 defaults to not allowing >this method of connecting to IPv4 hosts. If I change the default >with 'sysctl net.inet6.ip6.v6only=0' it then works. > >It looks like our xtrans code should be using AF_INET connections >when connecting to IPv4 addresses. I believe we did the equivalent >thing on the listening end already. Incidentally related to this is another problem I've run in to. Old FreeBSD X apps, that use a version of libc without IPv6 support, crash when run on a recent system when trying to connect to a remote display when using our newly built X libraries. I have a patch that restores compatibility to our X libraries by checking if the IPv6 libc support is available at run-time, and falling back to the IPv4 code otherwise. I think it is "complete enough", but I'd like some feedback before committing it. This patch does not fix the original problem. David -- David Dawes developer/release engineer The XFree86 Project www.XFree86.org/~dawes Index: Xtranssock.c === RCS file: /home/x-cvs/xc/lib/xtrans/Xtranssock.c,v retrieving revision 3.65 diff -u -r3.65 Xtranssock.c --- Xtranssock.c20 Nov 2003 00:41:37 - 3.65 +++ Xtranssock.c27 Nov 2003 23:15:22 - @@ -278,6 +278,8 @@ #if defined(IPv6) && defined(AF_INET6) static const struct in6_addr local_in6addr_any = IN6ADDR_ANY_INIT; #pragma weak in6addr_any = local_in6addr_any +#pragma weak getaddrinfo +static int haveIPv6 = 1; #endif /* @@ -312,19 +314,32 @@ { #if defined(IPv6) && defined(AF_INET6) -struct sockaddr_storage sockname; -#else -struct sockaddr_in sockname; +struct sockaddr_storage socknamev6; #endif +struct sockaddr_in socknamev4; +void *socknamePtr; #if defined(SVR4) || defined(SCO325) -size_t namelen = sizeof sockname; +size_t namelen; #else -int namelen = sizeof sockname; +int namelen; #endif PRMSG (3,"SocketINETGetAddr(%p)\n", ciptr, 0, 0); -if (getsockname (ciptr->fd,(struct sockaddr *) &sockname, +#if defined(IPv6) && defined(AF_INET6) +if (haveIPv6) +{ + namelen = sizeof(socknamev6); + socknamePtr = &socknamev6; +} +else +#endif +{ + namelen = sizeof(socknamev4); + socknamePtr = &socknamev4; +} + +if (getsockname (ciptr->fd,(struct sockaddr *) socknamePtr, (void *)&namelen) < 0) { PRMSG (1,"SocketINETGetAddr: getsockname() failed: %d\n", @@ -345,12 +360,17 @@ } #if defined(IPv6) && defined(AF_INET6) -ciptr->family = ((struct sockaddr *)&sockname)->sa_family; -#else -ciptr->family = sockname.sin_family; +if (haveIPv6) +{ + ciptr->family = ((struct sockaddr *)socknamePtr)->sa_family; +} +else #endif +{ + ciptr->family = socknamev4.sin_family; +} ciptr->addrlen = namelen; -memcpy (ciptr->addr, &sockname, ciptr->addrlen); +memcpy (ciptr->addr, socknamePtr, ciptr->addrlen); return 0; } @@ -366,19 +386,32 @@ { #if defined(IPv6) && defined(AF_INET6) -struct sockaddr_storage sockname; -#else -struct sockaddr_in sockname; +struct sockaddr_storage socknamev6; #endif +struct sockaddr_in socknamev4; +void *socknamePtr; #if defined(SVR4) || defined(SCO325) -size_t namelen = sizeof sockname; +size_t namelen; #else -int namelen = sizeof sockname; +int namelen; #endif +#if defined(IPv6) && defined(AF_INET6) +if (haveIPv6) +{ + namelen = sizeof(socknamev6); + socknamePtr = &socknamev6; +} +else +#endif +{ + namelen = sizeof(socknamev4); + socknamePtr = &socknamev4; +} + PRMSG (3,"SocketINETGetPeerAddr(%p)\n", ciptr, 0, 0); -if (getpeername (ciptr->fd, (struct sockaddr *) &sockname, +if (getpeername (ciptr->fd, (struct sockaddr *) socknamePtr, (void *)&namelen) < 0) { PRMSG (1,"SocketINETGetPeerAddr: getpeername() failed: %d\n", @@ -399,7 +432,7 @@ } ciptr->peeraddrlen = namelen; -memcpy (ciptr->peeraddr, &sockname, ciptr->peeraddrlen); +memcpy (ciptr->peeraddr, socknamePtr, ciptr->peeraddrlen); return 0; } @@ -413,6 +446,14 @@ PRMSG (3,"SocketOpen(%d,%d)\n", i, type, 0); +#if defined(IPv6) && defined(AF_INET6) +if (getaddrinfo == NULL) + haveIPv6 = 0; + +if (!haveIPv6 && Sockettrans2devtab[i].family == AF_INET6) + return NULL; +#endif + if ((ciptr = (XtransConnInfo) xcalloc ( 1, sizeof(struct _XtransCo
epia and xv 4:2:2
I have a epia M1 with Gentoo, kernel 2.6.0-test9, xfree 3.99.16 and a DVB-S card. I can see tv with xawdecode using xv and surfaces 4:2:0 but if I try tvtime which uses 4:2:2 I see the image distorted: Seems like the two halves overlapped, combining in only half witdh of the screen. For detail see: http://sourceforge.net/tracker/?func=detail&atid=506987&aid=838867&group_id=64301 As suggested I tried xvtest (http://www.xfree86.org/~mvojkovi/) and there's the same problem with Bacall picture. TIA Uberto Barbini ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
(no subject)
Hi ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
Re: 4.3.99.16 aiptek problems
Kambo Lohan wrote: 1. aiptek not working in absolute mode I used evtest /dev/input/event2 and verified I am getting absolute x,y, and reset messages. (not sure what a reset message is) however the cursor is still relative in x (i.e. unusable) even though the Xserverlog says absolute, and it's configed absolute. I am using 2.6.0 test9 with its aiptek driver. If the driver believes the server is in relative mode, it'll convert the absolute coordinates into relative coordinate reports. Come over to aiptektablet.sf.net for Aiptek tablet support. -- .:. Bryan W. Headley - [EMAIL PROTECTED] ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel
4.3.99.16 aiptek problems
1. aiptek not working in absolute mode I used evtest /dev/input/event2 and verified I am getting absolute x,y, and reset messages. (not sure what a reset message is) however the cursor is still relative in x (i.e. unusable) even though the Xserverlog says absolute, and it's configed absolute. I am using 2.6.0 test9 with its aiptek driver. (II) xf86AiptekInit(): begins (**) xf86AiptekConfig: device not shared btw superstylus and superstylus (**) xf86AiptekConfig: device not shared btw superstylus and Mouse0 (**) Option "AlwaysCore" (**) superstylus: always reports core events (**) Option "Device" "/dev/input/event2" (==) HID Device name: "Aiptek 6000U/8000U" (==) HID Driver Version: 1.0.0 (==) HID Driver knows it has 1 devices configured (==) HID Driver is using 6 as the fd From ioctl() xCapacity=3000 From ioctl() yCapacity=2250 (**) superstylus device is /dev/input/event2 (**) Option "DebugLevel" "50" (**) Debug level set to 50 (**) superstylus is in absolute mode (**) Option "USB" "on" (**) superstylus: reading USB link (**) Option "KeepShape" "on" (**) superstylus: keeps shape (**) Option "BaudRate" "9600" (**) superstylus: BaudRate 9600 (**) superstylus: xf86AiptekInit() finished (II) Keyboard "Keyboard0" handled by legacy driver (II) XINPUT: Adding extended input device "superstylus" (type: Cursor) (II) XINPUT: Adding extended input device "Mouse0" (type: MOUSE) (EE) Couldn't load XKB keymap, falling back to pre-XKB keymap (II) Server_Terminate keybinding not found xf86AiptekProc() type=cursor flags=194 request=0 xf86AiptekProc request=INIT xf86AiptekControlProc In xf86AiptekOpenDevice, with fd=-1 (==) HID Device name: "Aiptek 6000U/8000U" (==) HID Driver Version: 1.0.0 (==) HID Driver knows it has 1 devices configured (==) HID Driver is using 6 as the fd From ioctl() xCapacity=3000 From ioctl() yCapacity=2250 (**) xTop invalid; adjusted to 0 (**) yTop invalid; adjusted to 0 (**) xBottom invalid; adjusted to 3000 (**) yBottom invalid; adjusted to 2250 (**) ScreenNo invalid; adjusted to 0 Screen 0: screenRatio = 1.33, tabletRatio = 1.33 Screen 0: 'X' Gap of 0 computed xf86AiptekProc Success request=0 (II) Mouse0: ps2EnableDataReporting: succeeded xf86AiptekProc() type=cursor flags=194 request=1 xf86AiptekProc request=ON Able to open aiptek device xf86AiptekProc Success request=1 2. aiptek not documented in changelog. also aiptek documentation, what is keepshape, what is puck, etc 3. radeon drm shows me dmesg errors. I have a radeon 9000 AIW [drm] Initialized radeon 1.9.0 20020828 on minor 0 [drm:radeon_cp_init] *ERROR* radeon_cp_init called without lock held [drm:radeon_unlock] *ERROR* Process 5140 using kernel context 0 my 3d is not accelerated although don't know if it's an install or RTFM error, too busy messing with tablet right now :( _ online games and music with a high-speed Internet connection! Prices start at less than $1 a day average. https://broadband.msn.com (Prices may vary by service area.) ___ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel