Tue Jan 26 15:14:17 2010PHILIPP [...] cpan.org - Ticket created
CC:
philipp [...] cpan.org
The method hwaddress() is documented but not implemented.
Tue Jan 26 15:54:51 2010PHILIPP [...] cpan.org - Correspondence added
On Tue Jan 26 15:14:17 2010, PHILIPP wrote:
Show quoted text
> The method hwaddress() is documented but not implemented.
Use $if->info()->{mac} as a workaround (for getting it anyway... you
still can't set it).
Tue Jan 26 15:54:52 2010PHILIPP [...] cpan.org - Status changed from 'new' to 'open'
Tue Jan 26 15:55:42 2010michael [...] bizsystems.com - Correspondence added5 min
Subject:
hwaddress() is documented but not implemented
RT-Send-CC:
philipp [...] cpan.org
On Tue Jan 26 15:14:17 2010, PHILIPP wrote:
Show quoted text
> The method hwaddress() is documented but not implemented.
hwaddress is implemented on systems where the libxxx.h files were
available for development. If you can provide some development support,
perhaps yours can be supported as well.
For starters, what OS?
Tue Jan 26 15:55:47 2010michael [...] bizsystems.com - Given to MIKER
Tue Jan 26 15:56:01 2010PHILIPP [...] cpan.org - Subject changed from (no value) to 'hwaddress() method missing'
Tue Jan 26 15:56:01 2010PHILIPP [...] cpan.org - TimeWorked changed from '5' to ''
Tue Jan 26 15:58:48 2010PHILIPP [...] cpan.org - Correspondence added
On Tue Jan 26 15:55:42 2010, MIKER wrote:
Show quoted text
> On Tue Jan 26 15:14:17 2010, PHILIPP wrote:
> > The method hwaddress() is documented but not implemented.
>
>
> hwaddress is implemented on systems where the libxxx.h files were
> available for development. If you can provide some development support,
> perhaps yours can be supported as well.
>
> For starters, what OS?
Linux 2.6.
Tue Jan 26 16:48:07 2010michael [...] insulin-pumpers.org - Correspondence added
> > The method hwaddress() is documented but not implemented.
>
> Use $if->info()->{mac} as a workaround (for getting it anyway... you
> still can't set it).
>
ni_fallbackhwaddr.c is the source file that handles hwaddr and it is
basically a collection of work-arounds to try the various ways to get
the MAC address. This turns out to be a difficult problem because
there is no standardization whatever across platforms on how it is
done IF AT ALL. Setting it is even more poorly supported in the
various OS api's.
Probably the only way to do it is with the "netlink" interface which
is now present in most modern OS's. Net interface does not use this
interface as it is fairly complex to implement on the Net::Interface
end and is still not present any many OS's in use today while most of
the older methods are supported instead. The development effort for
that is probably on the order of that already expended in creating
and re-writing Net::Interface... What's needed is a volunteer
familiar with network internals and netlink to do this.
Michael
Wed Jan 27 12:25:43 2010PHILIPP [...] cpan.org - Correspondence added
On Tue Jan 26 16:48:07 2010, michael@insulin-pumpers.org wrote:
Show quoted text
> > > The method hwaddress() is documented but not implemented.
> >
> > Use $if->info()->{mac} as a workaround (for getting it anyway... you
> > still can't set it).
> >
>
> ni_fallbackhwaddr.c is the source file that handles hwaddr and it is
> basically a collection of work-arounds to try the various ways to get
> the MAC address. This turns out to be a difficult problem because
> there is no standardization whatever across platforms on how it is
> done IF AT ALL. Setting it is even more poorly supported in the
> various OS api's.
>
> Probably the only way to do it is with the "netlink" interface which
> is now present in most modern OS's. Net interface does not use this
> interface as it is fairly complex to implement on the Net::Interface
> end and is still not present any many OS's in use today while most of
> the older methods are supported instead. The development effort for
> that is probably on the order of that already expended in creating
> and re-writing Net::Interface... What's needed is a volunteer
> familiar with network internals and netlink to do this.
>
> Michael
We seem to agree that the difficulty is in setting the MAC address.
So on platforms where this support hasn't yet been done, why not provide
the "getting" functionality of this at a minimum? This could be done by
making the default method do:
sub hwaddress($;$)
{
my $self = shift;
croak "hwaddress: setting hwaddr not supported" if (@_ != 0);
$self->{args}->{maci};
}