[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: address/port separator



On Fri, 29 Mar 2002, Vineet Kumar wrote:
> Is there a convention used to separate an ipv6 address and port?

There is (at least one) IETF RFC on the topic. ;)

> Specifically, I'm talking about when giving an address/port
> combination to a program that makes a tcp connection. I'm converting a
> program written for ipv4 to use ipv6 as well, and it can take
> arguments like this:
> 
> hostname:http
> hostname:80
> 1.2.3.4:80
> 1.2.3.4:http

[...]

> So far I've left it that way, so it will work as before for ipv4
> hostnames and ip adresses, but will only work with ipv6 if the host is
> specified as a name, not a colon-delimited ipv6 address.

IIRC, the current recommendation is to use the syntax:

hostname:port   (IPv6 lookup. :)
[2001::1]:port  (IPv6 literal between '[]')

> My intuition is that the Right Way to do this is to split them up into
> 2 arguments, so instead of something like "-r host:port" it would look
> like "-r hostname -p port", but I wonder if others have seen any
> useful convention for this situation. I believe mozilla accepts ipv6
> addresses enclosed in brackets, is this behavior common to other
> programs as well?

*nod*  If you google for the RFC you should be able to locate the
details of the recommendation.

        Daniel

-- 
Despite all my rage I am still just a rat in a cage.
Now I'm naked, nothing but an animal.
        -- The Smashing Pumpkins, _Bullet With Butterfly Wings_
           (Mellon Collie And The Infinite Sadness)


-- 
To UNSUBSCRIBE, email to debian-ipv6-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: