Subject: Re: Hardware Address for the Interface
To: Rajnish Madan <rajnishm@delhi.tcs.co.in>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 02/13/2001 19:06:28
On Tue, Feb 13, 2001 at 04:32:53PM +0530, Rajnish Madan wrote:
> Hi,
> 
> I am using NetBSD1.4.1, it doesn't seem to have ioctls in ether_ioctl().

Ha yes, in this version all ioctls are handled in NIC drivers.

> Anyway, I checked up the ifconfig.c code and got how can i get the Hardware
> address.
> 
> I have one more question:-).  I have build up an ethernet frame(Ethernet
> Header+IP header+Data)
> , I need to send it onto the Network. I have put some XYZ hardware address
> as the Source MAC address.
> I don't want to follow some channel, in which it cross ether_output()
> function as it
> will put its physical Hardware Address in the Source MAC address (I used
> libnet api
> they seem to do this way)
> 
> Can i use sockets for this purpose. If yes, what are the various options
> should i set.

Well, for this I don't know, but I suspect you'll need to change a few things
in the kernel. However I suspect you can do this with bpf.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--