Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] macaddr-0.0.1

52 views
Skip to first unread message

ara.t.howard

unread,
Sep 8, 2007, 1:38:50 PM9/8/07
to
NAME

macaddr

DESCRIPTION

cross platform mac address determination for ruby

URI

http://codeforpeople.com/lib/ruby
http://rubyforg.org/projects/codeforpeople

INSTALL

gem install macaddr

SYNOPSIS

require 'macaddr'

Mac.addr #=> first mac addr on your system
Mac.addr.list #=> all mac addrs on your system


enjoy.

a @ http://drawohara.com/
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama


darren kirby

unread,
Sep 8, 2007, 2:48:56 PM9/8/07
to
quoth the ara.t.howard:

> NAME
>
> macaddr
>
> DESCRIPTION
>
> cross platform mac address determination for ruby

This is too perfect, I was just going to start looking for some code to find
MAC addresses for a project I plan to start. Thanks!

-d
--
darren kirby :: Part of the problem since 1976 :: http://badcomputer.org
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972

ara.t.howard

unread,
Sep 8, 2007, 3:19:05 PM9/8/07
to

On Sep 8, 2007, at 12:48 PM, darren kirby wrote:

> quoth the ara.t.howard:

funny ;-)

>> NAME
>>
>> macaddr
>>
>> DESCRIPTION
>>
>> cross platform mac address determination for ruby
>
> This is too perfect, I was just going to start looking for some
> code to find
> MAC addresses for a project I plan to start. Thanks!
>

great. it's pretty simply code, but known to work on osx, linux, and
windoze. patches for other oses appreciated.

kind regards.

X1

unread,
Sep 8, 2007, 7:29:00 PM9/8/07
to
Thanks Ara..

Quick question, what does first mean?

Do you look at interface metrics or weights, or just the first
alphabetic interface? Thx

On Sep 8, 2007, at 1:38 PM, "ara.t.howard" <ara.t....@gmail.com>
wrote:

ara.t.howard

unread,
Sep 8, 2007, 8:12:10 PM9/8/07
to

On Sep 8, 2007, at 5:29 PM, X1 wrote:

> Quick question, what does first mean?
>
> Do you look at interface metrics or weights, or just the first
> alphabetic interface? Thx

programs like 'ifconfig' dump out mac addrs in some order - i have no
idea what that order is nor have made any effort to do so, esp on
other platforms.

basically the 'macaddr' gem just knows how to shell out and parse the
output of the appropriate networking status command on various
platforms and scrapes the output for macaddr looking tokens.

so

Mac.addr #=> the first address seen in the output
Mac.addr.list #=> all mac addrs seen in the output (Array)
Mac.addr.list.first #=> the first one, same as Mac.addr

so far my uses of determining mac addr have simply been to get a
unique id for things like encryption so i haven't cared *which* mac
addr i found, only that i found *an* address.

answer your question?

kind regards.

Peña, Botp

unread,
Sep 9, 2007, 10:24:46 PM9/9/07
to
From: ara.t.howard [mailto:ara.t....@gmail.com]
# Mac.addr #=> the first address seen in the output
# Mac.addr.list #=> all mac addrs seen in the output (Array)
# Mac.addr.list.first #=> the first one, same as Mac.addr

do you have plans to get macaddr on remote pc?

kind regards -botp

0 new messages