Skip Menu |

This queue is for tickets about the Net-Interface CPAN distribution.

Report information
The Basics
Id: 54013
Status: open
Priority: 0/
Queue: Net-Interface

People
Owner: michael [...] bizsystems.com
Requestors: PHILIPP [...] cpan.org
Cc: PHILIPP [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 1.011
Fixed in: (no value)



CC: philipp [...] cpan.org
The method hwaddress() is documented but not implemented.
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).
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?
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.
Subject: Re: [rt.cpan.org #54013]
Date: Tue, 26 Jan 2010 13:48:01 -0800
To: bug-Net-Interface [...] rt.cpan.org
From: michael [...] insulin-pumpers.org
Show quoted text
> Queue: Net-Interface > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=54013 > > > On Tue Jan 26 15:14:17 2010, PHILIPP wrote:
> > 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
On Tue Jan 26 16:48:07 2010, michael@insulin-pumpers.org wrote: Show quoted text
> > Queue: Net-Interface > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=54013 > > > > > On Tue Jan 26 15:14:17 2010, PHILIPP wrote:
> > > 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}; }