Tcl Source Code

View Ticket
Login
Ticket UUID: 713194
Title: #162: IPv6 patch
Type: Patch Version: TIP Implementation
Submitter: taguchiv6 Created on: 2003-04-01 08:59:39
Subsystem: 25. Channel System Assigned To: rmax
Priority: 6 Severity:
Status: Closed Last Modified: 2012-08-27 18:41:02
Resolution: Fixed Closed By: dkf
    Closed on: 2012-08-27 11:41:02
Description:
Here is a IPv6 patch for TCL.

ABSTRUCT:
1. socket command has new option "-family"
    such as:

    % socket -family IPv6 localhost 80
or
    % socket -family IPv4 localhost 80

    First one, socket will connect to [::1]:80.
    and Second one, socket will connect to
127.0.0.1:80.

   If -family option is not specified, then socket will
use
   PF_UNSPEC ;-)

2. new array element tcl_platform(families).
   This variable contains protocol families which
supported.
   On IPv6 ready tclsh, then it will contain "IPv4
IPv6".
   On traditional tclsh, then "IPv4".

REQUIREMENTS:
this IPv6 features requires basic socket API deacribed
RFC2553 (or POSIX 
1003.1g draft).
If your system does not support it, this patch will use
traditional codes.

SECURITY:
draft-cmetz-v6ops-v4mapped-api-harmful-00.txt describe
some security probrems. 
So this patch does not support IPv4 mapped address.
User Comments: dkf added on 2012-08-27 18:41:02:

allow_comments - 1

Tcl 8.6 now includes IPv6 support.

taguchiv6 added on 2004-03-02 11:29:44:
Logged In: YES 
user_id=357728

Sorry for my too slowly works.

I've update patche files and I've wrote up TIP documents.
(I'm not good at English, so I think it contain some syntax
 errors...)
Where should I post it?

By the way,
> It's a shame that the difference between IPv4 and IPv6 gets
> exposed to user scripts at all

I can not understand why difference is needed.
IPv4 socket and IPv6 socket are same tcp connection.
IPv4 channel and IPv6 channel must not have any differences.
So tradisional script (such as httpd, and so on) will be
able to use
 IPv6 without any edittings.

Ofcause, If you want to use only IPv4 socket,  -family
option may be
your friend.
If you want to know real peer address, fconfigure may be
good for you.
(I hope so)

Thanks.

dkf added on 2003-04-02 21:03:22:
Logged In: YES 
user_id=79902

It's a shame that the difference between IPv4 and IPv6 gets
exposed to user scripts at all (other than perhaps something
that can be extracted with [fconfigure] after the fact.) One
of the nicest things about Tcl sockets is that they Just
Work.

(This will need a TIP before it can go into the core in any
case.)

davygrvy added on 2003-04-02 15:21:45:
Logged In: YES 
user_id=7549

Thanks jeff, I do have some opinions on ipv6.

First, I feel the tuple (pardon the python borrowing) of address 
family, type, and protocol should be combined into a single 
option for the sake of user friendliness.  Having to know the 
three part combos for our users wouldn't be all that friendly 
unless they where already C programmers and used to socket
() as it is.

I'll have a look at the patch over the next few days.

taguchiv6 added on 2003-04-02 07:45:51:

File Added - 46534: tcl-ipv6ready.patchset.tar.gz

Logged In: YES 
user_id=357728

Sorry, I forgot to attach patch ;-)

hobbs added on 2003-04-02 02:03:46:
Logged In: YES 
user_id=72656

assigning to dave since he has recently taken an interest in 
IPv6.

Attachments: