On Tue, 2006-10-24 at 17:52 +0200, Thomas Liebetraut wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Derek Atkins schrieb: > > Quoting Dan Williams <[EMAIL PROTECTED]>: > > > >> Yeah, sorry, we'll need a few more bits here. The current code (which I > >> just looked) just uses strings for the moment. > > > > Strings work, too.. And if you leave it as strings it gives you > > the flexibility to add IPv6 support down the road without changing > > your APIs. :) > I thought about an array of struct, but strings might be the more > flexible way for this.
Maybe. But we already have a nice split between IPv6 and IPv4 in the configuration information, because all the signals and/or objects have IP4 in the name. So, the signal for VPN configuration is "signalIP4Config", all the internal code prefixes stuff with "ip4_", and the config structure is NMIP4Config. I don't _want_ to use strings for routes, since then you have to validate them in NM. I'd rather use straight structures, because we _know_ that the format of IPv4 and IPv6 addresses isn't going to change. The length is going to stay the same. Strings are really only good as a mechanism for passing stuff across API boundaries when you want to be resistant to API breakage. In the end, we're going to have to deliver structures to netlink anyway, so we have to convert them away from strings. Better to do it earlier, rather than sooner. Dan > Regards, > Thomas > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.3 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFFPja4xVmZpTAq4IgRAs+EAJ4xtnBmu5xBnPtXo19p+b71pFNQ1ACgjV9O > MlSuS33VCaDxXdoP4p+dTqM= > =EaFp > -----END PGP SIGNATURE----- _______________________________________________ NetworkManager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
