mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
b106252c19
address on an interface. This basically allows you to do what my little setmac module/utility does via ifconfig. This involves the following changes: socket.h: define SIOCSIFLLADDR if.c: add support for SIOCSIFLLADDR, which resets the values in the arpcom struct and sockaddr_dl for the specified interface. Note that if the interface is already up, we need to down/up it in order to program the underlying hardware's receive filter. ifconfig.c: add lladdr command ifconfig.8: document lladdr command You can now force the MAC address on any ethernet interface to be whatever you want. (The change is not sticky across reboots of course: we don't actually reprogram the EEPROM or anything.) Actually, you can reprogram the MAC address on other kinds of interfaces too; this shouldn't be ethernet-specific (though at the moment it's limited to 6 bytes of address data). Nobody ran up to me and said "this is the politically correct way to do this!" so I don't want to hear any complaints from people who think I could have done it more elegantly. Consider yourselves lucky I didn't do it by having ifconfig tread all over /dev/kmem. |
||
---|---|---|
.. | ||
_posix.h | ||
_sigset.h | ||
acct.h | ||
acl.h | ||
agpio.h | ||
aio.h | ||
assym.h | ||
bio.h | ||
bitstring.h | ||
blist.h | ||
buf.h | ||
bus_dma.h | ||
bus_private.h | ||
bus.h | ||
callout.h | ||
capability.h | ||
ccdvar.h | ||
cdefs.h | ||
cdio.h | ||
cdrio.h | ||
chio.h | ||
clist.h | ||
conf.h | ||
cons.h | ||
consio.h | ||
copyright.h | ||
ctype.h | ||
dataacq.h | ||
devfsext.h | ||
devicestat.h | ||
dir.h | ||
dirent.h | ||
disk.h | ||
disklabel.h | ||
diskmbr.h | ||
diskpc98.h | ||
diskslice.h | ||
dkstat.h | ||
dmap.h | ||
domain.h | ||
dvdio.h | ||
elf32.h | ||
elf64.h | ||
elf_common.h | ||
elf_generic.h | ||
errno.h | ||
event.h | ||
eventhandler.h | ||
eventvar.h | ||
exec.h | ||
extattr.h | ||
fbio.h | ||
fcntl.h | ||
fdcio.h | ||
file.h | ||
filedesc.h | ||
filio.h | ||
gmon.h | ||
imgact_aout.h | ||
imgact_elf.h | ||
imgact.h | ||
inflate.h | ||
interrupt.h | ||
inttypes.h | ||
ioccom.h | ||
ioctl_bt848.h | ||
ioctl_compat.h | ||
ioctl_meteor.h | ||
ioctl.h | ||
ipc.h | ||
jail.h | ||
joystick.h | ||
kbio.h | ||
kernel.h | ||
kobj.h | ||
kthread.h | ||
ktrace.h | ||
libkern.h | ||
linedisc.h | ||
link_aout.h | ||
link_elf.h | ||
linker_set.h | ||
linker.h | ||
lock.h | ||
lockf.h | ||
lockmgr.h | ||
malloc.h | ||
mbuf.h | ||
md5.h | ||
mdioctl.h | ||
memrange.h | ||
mman.h | ||
module.h | ||
mount.h | ||
mouse.h | ||
msg.h | ||
msgbuf.h | ||
mtio.h | ||
namei.h | ||
nlist_aout.h | ||
param.h | ||
pciio.h | ||
pioctl.h | ||
pipe.h | ||
poll.h | ||
posix4.h | ||
proc.h | ||
procfs.h | ||
protosw.h | ||
ptio.h | ||
ptrace.h | ||
queue.h | ||
random.h | ||
reboot.h | ||
resource.h | ||
resourcevar.h | ||
rman.h | ||
rtprio.h | ||
select.h | ||
selinfo.h | ||
sem.h | ||
semaphore.h | ||
shm.h | ||
signal.h | ||
signalvar.h | ||
smp.h | ||
snoop.h | ||
socket.h | ||
socketvar.h | ||
sockio.h | ||
soundcard.h | ||
stat.h | ||
syscall-hide.h | ||
syscall.h | ||
syscall.mk | ||
sysctl.h | ||
sysent.h | ||
syslimits.h | ||
syslog.h | ||
sysproto.h | ||
systm.h | ||
taskqueue.h | ||
termios.h | ||
time.h | ||
timeb.h | ||
timepps.h | ||
timers.h | ||
times.h | ||
timetc.h | ||
timex.h | ||
tprintf.h | ||
tty.h | ||
ttychars.h | ||
ttycom.h | ||
ttydefaults.h | ||
ttydev.h | ||
types.h | ||
ucontext.h | ||
ucred.h | ||
uio.h | ||
un.h | ||
unistd.h | ||
unpcb.h | ||
user.h | ||
utsname.h | ||
vmmeter.h | ||
vnioctl.h | ||
vnode.h | ||
wait.h | ||
xrpuio.h |