Menu

#271 #162: IPv6 patch

TIP Implementation
closed-fixed
6
2012-08-27
2003-04-01
No

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.

Discussion

  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-04-01
    • assigned_to: nobody --> davygrvy
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-04-01

    Logged In: YES
    user_id=72656

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

     
  • Taguchi, Takeshi.

     
  • Taguchi, Takeshi.

    Logged In: YES
    user_id=357728

    Sorry, I forgot to attach patch ;-)

     
  • David Gravereaux

    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.

     
  • Donal K. Fellows

    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.)

     
  • Taguchi, Takeshi.

    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.

     
  • David Gravereaux

    • assigned_to: davygrvy --> patthoyts
     
  • Donal K. Fellows

    • summary: IPv6 patch --> #162: IPv6 patch
    • priority: 5 --> 6
    • labels: --> 25. Channel System
    • milestone: --> TIP Implementation
     
  • Donal K. Fellows

    • assigned_to: patthoyts --> rmax
    • status: open --> closed-fixed
     
  • Donal K. Fellows

    Tcl 8.6 now includes IPv6 support.

     
MongoDB Logo MongoDB