--7ZAtKRhVyVSsbBD2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Mauricio Fern?ndez (batsman.geo / yahoo.com) wrote:

> On Mon, Jan 27, 2003 at 07:37:38AM +0900, Eric Hodel wrote:
> >=20
> > ifconfig should be virtually the same everywhere, so parsing should be
> > something like this: (works on FreeBSD)
> > http://segment7.net/ruby-code/snippits/get_ip.rb
>=20
> Great! I have been reading ifconfig's (net-tools's) sources, and
> apparently that info is taken from /proc/net/ (under Linux at least) and
> using ioctl, and I guess parsing is more portable than trying ioctl
> magic...=20

Remember, UNIX is about processing text, don't worry about all the messy
internals unless you need to :)

--=20
Eric Hodel - drbrain / segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04


--7ZAtKRhVyVSsbBD2
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)

iD8DBQE+NN8yMypVHHlsnwQRAmeCAJ9FAVnaYy71KT+UxFGTV8ag19MECwCgs2Rp
STeRRqDslrD9axausVc4xBM=
=tMDM
-----END PGP SIGNATURE-----

--7ZAtKRhVyVSsbBD2--

Mauricio Fern?ndez (batsman.geo / yahoo.com) wrote:

> On Mon, Jan 27, 2003 at 07:37:38AM +0900, Eric Hodel wrote:
> >=20
> > ifconfig should be virtually the same everywhere, so parsing should be
> > something like this: (works on FreeBSD)
> > http://segment7.net/ruby-code/snippits/get_ip.rb
>=20
> Great! I have been reading ifconfig's (net-tools's) sources, and
> apparently that info is taken from /proc/net/ (under Linux at least) and
> using ioctl, and I guess parsing is more portable than trying ioctl
> magic...=20

Remember, UNIX is about processing text, don't worry about all the messy
internals unless you need to :)

--=20
Eric Hodel - drbrain / segment7.net - http://segment7.net
All messages signed with fingerprint:
FEC2 57F1 D465 EB15 5D6E  7C11 332A 551C 796C 9F04

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)

iD8DBQE+NN8yMypVHHlsnwQRAmeCAJ9FAVnaYy71KT+UxFGTV8ag19MECwCgs2Rp
STeRRqDslrD9axausVc4xBM=
=tMDM
-----END PGP SIGNATURE-----