On Fri, 2003-11-21 at 22:42, Johannes Berg wrote: > Works as far as I can determine from making a connection with my local > ftp server running on ipv6 and sending/reading data.
See attached test program, very crude and you need a ftp server running on a ipv6 capable machine at ::1. > Sock2Text doesn't seem to work though, not sure why. However, using API > calls with my structures works -- would you consider to apply it > (knocking another local patch off my list)? Or is anything wrong with it > that I should fix first? Fixed, please apply patch, see bug 2800. johannes -- http://www.sipsolutions.de/ GnuPG key: http://www.sipsolutions.de/keys/JohannesBerg.asc Key-ID: 9AB78CA5 Johannes Berg <[EMAIL PROTECTED]> Fingerprint = AD02 0176 4E29 C137 1DF6 08D2 FC44 CF86 9AB7 8CA5
program ip6test;
uses
sockets,
unix,
errors,
baseunix;
var
dest: TInetSockAddr6;
sock: LongInt;
s: shortstring;
i: integer;
t1,t2:text;
begin
with dest do begin
sin6_family := PF_INET6;
sin6_port := 5376; // = htons(21)
sin6_addr.s6_addr32[0] := 0;
sin6_addr.s6_addr32[1] := 0;
sin6_addr.s6_addr32[2] := 0;
sin6_addr.s6_addr32[3] := 0;
sin6_addr.s6_addr[15] := 1;
end;
sock := socket(PF_INET6, SOCK_STREAM, 6 {TCP});
sock2text(sock,t1,t2);
if Connect(sock, dest, sizeof(dest)) then begin
readln(t1, s);
writeln(s);
writeln(t2, 'QUIT');
readln(t1, s);
writeln(s);
end else begin
writeln('not connected: ',getlasterror, ': ', StrError(getlasterror));
end;
closesocket(sock);
end.
signature.asc
Description: This is a digitally signed message part
