| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
| |
This allows you to set ether addresses with 'ifconfig ether'. Also, use
some saner socket address families that allow several special case tests
to be removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Approved by: jkh
|
|
|
|
|
|
|
|
|
| |
Improve compatibility with BSD/OS, and also more accurately reflect that
IP aliases aren't really any different than the primary IP address on an
interface.
Reviewed by: dcs
Approved by: jkh
|
|
|
|
|
|
|
|
|
| |
IPv6 scoped addr display is not yet supported by ifconfig
and route. Now almost of IPv6 apps support it, so its support
in ifconfig and route is important to keep consisetncy, and
to avoid user confusion.
Approved by: jkh
|
|
|
|
|
|
| |
- minor sanity.
PR: 15318
|
| |
|
|
|
|
|
|
|
|
|
|
| |
packet divert at kernel for IPv6/IPv4 translater daemon
This includes queue related patch submitted by jburkhol@home.com.
Submitted by: queue related patch from jburkhol@home.com
Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
we're about to operate on, try to load one. Don't complain if the
load fails, and always press on regardless (there may not be a module
suitable or required).
With the renaming of the PCI ethernet driver modules and the addition
of appropriate miibus dependancies on those modules that need it, it is
now no longer necessary to compile many ethernet drivers into the kernel;
they will be loaded on demand the first time they are ifconfig'ed.
Inspiration from: mount
Reviewed by: obrien
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is inteded for to allow ifconfig to print various unstructured
information from an interface.
The data is returned from the kernel in ASCII form, see the comment in
if.h for some technicalities.
Canonical cut&paste example to be found in if_tun.c
Initial use:
Now tun* interfaces tell the PID of the process which opened them.
Future uses could be (volounteers welcome!):
Have ppp/slip interfaces tell which tty they use.
Make sync interfaces return their media state: red/yellow/blue
alarm, timeslot assignment and so on.
Make ethernets warn about missing heartbeats and/or cables
|
|
|
|
|
|
|
|
| |
This means that the driver will add/delete routes when it knows it is
up/down, rather than have the generic code belive it is up if configured.
This is probably most useful for serial lines, although many PHY chips
could probably tell us if we're connected to the cable/hub as well.
|
|
|
|
| |
take two.
|
|
|
|
| |
Inspired by bdes comment to PR: 7419
|
|
|
|
|
|
| |
them as ints. Among other bugs, doing so at best caused benign
overflow followed by fatal sign extension on machines with 32-bit
ints and 64-bit longs.
|
|
|
|
|
| |
for now). Correct use of .Nm. Short usage string (see man page for full list).
Spelling. Use err(3).
|
|
|
|
|
| |
useful, intuitive, and match the old comments in the source.
Previously, 'ifconfig -l ether' and 'ifconfig -l' were equal.
|
|
|
|
| |
Submitted by: bde
|
|
|
|
|
| |
gethostbyaddr.
Submitted by: Julian Assange
|
|
|
|
|
| |
PR: bin/4861
Submitted by: Alex <garbanzo@hooked.net>
|
|
|
|
|
|
| |
The -m switch is now accepted for backwards compatability.
Suggested by: davidg
|
|
|
|
|
|
| |
place rather than updating the main loop's index variables from within
a subroutine and other revolting things like that. Move some more
globals into local variables.
|
|
|
|
|
|
|
| |
program and it's use of global variables. Somehow, I managed to miss the
most obvious case.. "ifconfig ed0 10.0.0.1" failed (no "inet")
Submitted by: dfr
|
|
|
|
|
|
|
| |
family inet if not specified. (eg: "ifconfig ed0" down would fail because
no family was specified, even though the up/down status is not per family)
Pointed out by: Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
|
|
|
|
| |
can be trivially disabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- parse command options using getopt for consistancy
- sanitise the command parsing so that it's less like spaghetti
- implement a "-l" option (idea from NetBSD - just list names)
- attempt to clean up the sysctl parsing loop some more. It still needs
to be taken out the back and shot though.
- cut down on global usage, but there's a lot more scope for this.
- make usage string a bit closer to reality (it was missing lots of things)
Unfortunately, I did this for the second time but with the memory of
the NetBSD version still recently in my mind. It's hard to redo simple
changes or getopt stuff without making it look like what you've been
working with a few hours ago.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
|
| |
|
|
|
|
|
|
| |
do it themselves. (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!) Also fix up some
other #include messes while we're at it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Don't link against libkvm and don't uselessly include <kvm.h>.
- Declare constant objects as const.
- Declare functions with the correct types.
- Call functions with the correct parameters.
Not fixed:
- The sysctl parsing remains ugly (but it may be the best we can do).
- atnetrange() should use strtoul() rather than sscanf() for better
error checking.
|
|
|
|
|
|
|
|
|
|
| |
it stopped us from removing or setting loopback address
on lo0:
also make use of the fact the athe sockaddre_at struct now has a "netrange"
field.
CVS ----------------------------------------------------------------------
|
|
|
|
| |
appletalk cleanups
|
| |
|
|
|
|
|
| |
Obtained from: Whistle Communications
patches to allow ifconfig to work with appletalk addresses etc.
|
| |
|
|
|
|
|
| |
in preparation for its removal from the kernel source tree. NB: because
a function was deleted, libc is now at version 3.0 (was 2.2 previously).
|
| |
|
|
|
|
|
|
|
|
|
| |
I discovered that when asking for the IFLIST via sysctl(), if you
specify only AF_INET address, it actually gives you only AF_INET..
(suprise, suprise..!)
Now, it should "do the right thing" in just about all cases... The only
problem, is that "the right thing" isn't exactly clear in all cases.
|
|
|
|
|
|
|
|
| |
ifconfig would segfault on "ifconfig ed0 ether up" and the like).
The main reason for this commit was that an "ifconfig -a" would also show
the AF_INET addresses in AF_IPX form (if the kernel was configured for IPX)
due to insufficient AF checking in my "new way" of doing it.
|
|
|
|
|
|
|
|
|
| |
and the ethernet address for non-root users.
I apologise to the world for propagating the ugliness of some of the code
constructs within ifconfig... Fixing them would just abou mean rewriting
most of the function call interfaces, something I didn't have the stomach
for. :-)
|
|
|
|
|
|
|
|
| |
actually retrieves all the information no matter how many interfaces
there are. (Probably there are other utilities which need similar
modification.)
Submitted by: Andrew Webster <awebster@dataradio.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Submitted by: Mike Mitchell, supervisor@alb.asctmd.com
This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..
Mikes been using it for a year or so
but on 2.0
more changes and stuff will be merged in from other developers now that this is in.
Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
|
| |
|
|
|
|
| |
netmasks and broadcast addresses of 255.255.255.255.
|