[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdenetwork/wifi
From:       Stefan Winter <mail () stefan-winter ! de>
Date:       2005-12-22 16:28:47
Message-ID: 200512221828.20399.mail () stefan-winter ! de
[Download RAW message or body]

Hi,

> The %4 is the nifty thing about IPv6 and what makes QHostAddress buggy in
> my point of view: it's the scope id.
>
> That's in fact the interface number. Every link-local address (fe80::/64)
> must also indicate which interface to send on. That's represented by a %
> followed by either the interface index or its name.

Well, I'm aware that link-local addresses are bound to a specific interface. 
But the %4 looked so much like a missing QString::arg(), it was hard to 
imagine it really should be there. And IMO, it shouldn't: maybe 4 is my 
kernel's internal interface number for eth1. But this internal numbering 
should NEVER reach the end user (or even leave the kernel, even for /proc it 
is beautified). If at all possible, such output should either read 
address%eth1 or contain no scope at all (given that you supply the interface 
name in the constructor of the KNetworkInterface it is implicitly clear that 
any fe80 address returned is bound to that interface, no need to mention 
this. Thinking of it, there may be multihoming scenarios where an explicit 
mention of the scope is necessary, but still then it shouldn't be the 
interface's integer kernel number, but pretty-print. Is it possible to make 
scope_id a QString instead of an integer, or at least convert it for string 
output?  I believe I've seen stubs in #ifdefs for something like that.

Greetings,

Stefan Winter

-- 
This mail is guaranteed to be virus free because it was sent from a computer 
running Linux.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic