Date: Tue, 09 Mar 2004 13:35:11 +0100 From: Hannes Persson <mda00hpe@student.bth.se> To: freebsd-net@freebsd.org Subject: sendto() problem using T/TCP over IPv6 Message-ID: <c2kddp$5s0$1@sea.gmane.org>
next in thread | raw e-mail | index | archive | help
Hi
I have a problem bothering me for days now. Hope some of you have an
proposal for a solution...
I have some code working over IP4 sending T/TCP transactions. But when
switching to IP6 the sendto() complains over "Socket is not connected". 
As i said it currently working witch the usual sin but when switching to
sin6 the error occurs. The OS i am using is FreeBSD4.8.
I paste a snippet from the code:
        struct sockaddr_in6     serv;
        
        if ( (sockfd = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
                printf("socket error");
        memset(&serv, sizeof(serv), 0);
        serv.sin6_family = AF_INET6;
        serv.sin6_port = htons(80);
        inet_pton(AF_INET6, argv[1], &serv.sin6_addr);
                        
        if (sendto(sockfd, request,strlen(request), MSG_EOF, (struct
sockaddr*)                                   
&serv, sizeof(serv)) != strlen(request))
        perror("SENDTO ERROR: ");
Thanks in advance
-Hannes
-----------------
Hannes Persson
Master student CS
Blekinge Institute of Technology
mda00hpe@student.bth.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c2kddp$5s0$1>
