aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/arp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove bogus char cast.Remko Lodder2009-08-141-1/+1
| | | | | | | | | | PR: 118014 Submitted by: Gardner Bell <gbell72 at rogers dot com> Approved by: re (rwatson), imp (mentor, implicit) MFC after: immediate Notes: svn path=/head/; revision=196216
* Lower WARNS due to alignment issues on sparc64.Dag-Erling Smørgrav2009-06-111-1/+1
| | | | Notes: svn path=/head/; revision=193984
* As of sam's r175206, arp builds cleanly at WARNS level 6, but the MakefileDag-Erling Smørgrav2009-06-112-4/+8
| | | | | | | | was never updated. Also, clean up the macro that caused the warning in the first place (no functional changes, just wrapped and reindented). Notes: svn path=/head/; revision=193976
* - xref ndp(8)Daniel Gerzo2009-04-281-1/+2
| | | | | | | | | PR: docs/134053 Submitted by: Bob Van Zant <bob@veznat.com> MFC after: 1 week Notes: svn path=/head/; revision=191635
* This checkin addresses a couple of issues:Qing Li2008-12-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The "route" command allows route insertion through the interface-direct option "-iface". During if_attach(), an sockaddr_dl{} entry is created for the interface and is part of the interface address list. This sockaddr_dl{} entry describes the interface in detail. The "route" command selects this entry as the "gateway" object when the "-iface" option is present. The "arp" and "ndp" commands also interact with the kernel through the routing socket when adding and removing static L2 entries. The static L2 information is also provided through the "gateway" object with an AF_LINK family type, similar to what is provided by the "route" command. In order to differentiate between these two types of operations, a RTF_LLDATA flag is introduced. This flag is set by the "arp" and "ndp" commands when issuing the add and delete commands. This flag is also set in each L2 entry returned by the kernel. The "arp" and "ndp" command follows a convention where a RTM_GET is issued first followed by a RTM_ADD/DELETE. This RTM_GET request fills in the fields for a "rtm" object, which is reinjected into the kernel by a subsequent RTM_ADD/DELETE command. The entry returend from RTM_GET is a prefix route, so the RTF_LLDATA flag must be specified when issuing the RTM_ADD/DELETE messages. 2. Enforce the convention that NET_RT_FLAGS with a 0 w_arg is the specification for retrieving L2 information. Also optimized the code logic. Reviewed by: julian Notes: svn path=/head/; revision=186500
* Print a warning when blackhole and reject are used together.Tom Rhodes2008-12-252-8/+13
| | | | | | | | | | | Update arp.8 manual page syntax. PR: 125896 Submitted by: Marc Olzheim <marcolz@stack.nl> Approved by: sam Notes: svn path=/head/; revision=186485
* This main goals of this project are:Qing Li2008-12-151-16/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. separating L2 tables (ARP, NDP) from the L3 routing tables 2. removing as much locking dependencies among these layers as possible to allow for some parallelism in the search operations 3. simplify the logic in the routing code, The most notable end result is the obsolescent of the route cloning (RTF_CLONING) concept, which translated into code reduction in both IPv4 ARP and IPv6 NDP related modules, and size reduction in struct rtentry{}. The change in design obsoletes the semantics of RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications such as "arp" and "ndp" have been modified to reflect those changes. The output from "netstat -r" shows only the routing entries. Quite a few developers have contributed to this project in the past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and Andre Oppermann. And most recently: - Kip Macy revised the locking code completely, thus completing the last piece of the puzzle, Kip has also been conducting active functional testing - Sam Leffler has helped me improving/refactoring the code, and provided valuable reviews - Julian Elischer setup the perforce tree for me and has helped me maintaining that branch before the svn conversion Notes: svn path=/head/; revision=186119
* Spell "blackhole" correctly and fix one grammar nit.Ruslan Ermilov2008-03-241-4/+4
| | | | Notes: svn path=/head/; revision=177588
* add reject+blackhole keywords to install entries with RTF_BLACKHOLESam Leffler2008-03-182-4/+23
| | | | | | | | | | | and RTF_REJECT, respectively PR: bin/79228 Submitted by: Dan Lukes <dan@obluda.cz> MFC after: 2 weeks Notes: svn path=/head/; revision=177362
* quiet compiler complaint about comparing &v against NULLSam Leffler2008-01-101-2/+2
| | | | Notes: svn path=/head/; revision=175206
* Reduce the WARNS levels in a couple of places so that we can enableJohn Birrell2007-11-181-1/+1
| | | | | | | -Werror at higher WARNS levels like we did before gcc4 was imported. Notes: svn path=/head/; revision=173716
* net.link.ether.inet.prune_intvl no longer exists.Gleb Smirnoff2007-03-281-3/+1
| | | | Notes: svn path=/head/; revision=167988
* Use sizeof() for calculating the buffer size instead of hard-coded values.Kevin Lo2007-03-061-1/+1
| | | | Notes: svn path=/head/; revision=167260
* - Before doing ioctl(SIOCGIFNETMASK) put the proper IP address into the ifreq,Gleb Smirnoff2006-10-131-1/+1
| | | | | | | | | | | to obtain correct netmask in case of interface with multiple aliases. - While here, remove a comment with a bad idea. PR: bin/42120 Submitted by: Dmitry Frolov <frolov riss-telecom.ru> Notes: svn path=/head/; revision=163305
* Markup fixes.Ruslan Ermilov2006-09-291-13/+10
| | | | Notes: svn path=/head/; revision=162806
* Sync utility's usage() with manpage's SYNOPSIS.Ruslan Ermilov2006-09-291-2/+2
| | | | Notes: svn path=/head/; revision=162795
* Enumerate all cases where -i is applicable.Yaroslav Tykhiy2006-08-171-2/+3
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=161395
* Refuse to install invalid ARP entries.Gleb Smirnoff2006-02-091-2/+3
| | | | | | | Submitted by: Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru> Notes: svn path=/head/; revision=155471
* Update usage to reflect the fact that the -d -a now accepts -i <interface>.Brooks Davis2006-01-101-1/+1
| | | | | | | | Reminded by: ru Pointy hat: brooks Notes: svn path=/head/; revision=154191
* Allow the -i <interface> option with -d -a to allow all arp entries forBrooks Davis2006-01-102-1/+2
| | | | | | | a given interface to be removed. Notes: svn path=/head/; revision=154162
* Add a knob to suppress logging of attempts to modifyGleb Smirnoff2005-12-181-1/+8
| | | | | | | | | permanent ARP entries. Submitted by: Andrew Alcheyev <buddy telenet.ru> Notes: svn path=/head/; revision=153513
* Improve the documentation of "proxyall" knob, somewhat: we do notRuslan Ermilov2005-11-241-2/+3
| | | | | | | | | proxy for hosts that are reachable through the same interface the request came in from. This feature is mainly for hosts reachable through some P2P link, e.g. the gif(4) tunnel. Notes: svn path=/head/; revision=152765
* Some fixes for last commit.Gleb Smirnoff2005-11-111-8/+7
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=152303
* - Document last change to ARP behavior.Gleb Smirnoff2005-11-101-11/+28
| | | | | | | | - Document several undocumented sysctl variables. - Fix spelling of few diagnostics. Notes: svn path=/head/; revision=152274
* List IFT_BRIDGE as a valid type so that arp entries can be properly deleted.Andrew Thompson2005-11-031-1/+6
| | | | | | | Submitted by: Michal Mertl <mime^traveller.cz> Notes: svn path=/head/; revision=151989
* Commit some cosmetic fixes I developed some time ago, mostly style butRuslan Ermilov2005-06-091-26/+31
| | | | | | | one functional change (fixed exit status from the "get" operation). Notes: svn path=/head/; revision=147172
* Fix exit status. In rev. 1.48 return logic of rtmsg() was confused. ThisGleb Smirnoff2005-06-091-1/+1
| | | | | | | | | | made arp(8) command exit status reversed for -s and -S. Reported by: sem MFC after: 2 weeks Notes: svn path=/head/; revision=147170
* o Reorganize the previous delta to make it more style(9) compliant.Maxim Konovalov2005-01-241-3/+5
| | | | | | | | | Submitted by: ru o Reduce an amount of memory we ask in advance. Notes: svn path=/head/; revision=140748
* o Try hard to guess a buffer size for a fast growing routing table.Maxim Konovalov2005-01-241-5/+15
| | | | | | | | | | | An approach taken from killall/killall.c. PR: bin/76075 Submitted by: Dmitrij Tejblum MFC after: 3 weeks Notes: svn path=/head/; revision=140735
* For VLAN interfaces, print MAC addresses properly.Ruslan Ermilov2004-12-241-1/+2
| | | | | | | | | | | (Broken in rev. 1.52.) PR: 75471 Submitted by: Jon Simola MFC after: 3 days Notes: svn path=/head/; revision=139270
* Per letter dated July 22, 1999, delete clause 3 from code directlyWarner Losh2004-08-073-12/+0
| | | | | | | from Berkeley. Notes: svn path=/head/; revision=133248
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-022-2/+3
| | | | Notes: svn path=/head/; revision=131500
* mdoc(7) policeBruce M Simpson2004-06-161-2/+2
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=130574
* Document the behaviour of the net.link.ether.inet.proxyall sysctl MIBBruce M Simpson2004-06-161-0/+19
| | | | | | | | | | | variable. PR: docs/21826 Reviewed by: ru Requested by: Bernd Luevelsmeyer Notes: svn path=/head/; revision=130568
* Be smarter about printing non-ethernet link-level addresses.Doug Rabson2004-06-131-3/+13
| | | | Notes: svn path=/head/; revision=130408
* Avoid assignments to cast expressions.Stefan Farfeleder2004-06-081-1/+1
| | | | | | | | Reviewed by: md5 Approved by: das (mentor) Notes: svn path=/head/; revision=130246
* Massive cleanup of the code removing global variables toLuigi Rizzo2004-04-131-206/+199
| | | | | | | | | | | pass function arguments and results. Hopefully no functional changes except fixing a couple of bugs which could cause endless loops if an ioctl() on an interface would fail. Notes: svn path=/head/; revision=128192
* Back out previous commit, it was unintentional.Luigi Rizzo2004-04-131-1/+1
| | | | | | | | | Keep WARNS at 3 though the code does compile with WARNS=5 at least on i386 Noticed by: ru Notes: svn path=/head/; revision=128187
* Replace ROUNDUP/ADVANCE with SA_SIZELuigi Rizzo2004-04-132-8/+6
| | | | Notes: svn path=/head/; revision=128186
* Make functions and variables static.Luigi Rizzo2004-04-131-88/+96
| | | | | | | | | | | Remove global variables in favour of local ones. Fix indentation of a couple of switch statements. Overall, this program badly need cleaning up, as it relies on information passed around through global variables. Notes: svn path=/head/; revision=128181
* - Change several errx() calls that should have been err() calls.Maxime Henrion2004-04-092-13/+15
| | | | | | | | | - Handle empty ARP tables properly. - Remove register keyword. - arp(8) is WARNS?=4 clean, so mark it as such to avoid regressions. Notes: svn path=/head/; revision=128054
* mdoc(7) cleanups (use .Va, not .Dv, for sysctls.)Bruce M Simpson2003-10-031-2/+2
| | | | | | | Reviewed by: ru Notes: svn path=/head/; revision=120684
* mdoc(7) cleanup: Break up sentences so that they start on new lines.Bruce M Simpson2003-10-031-6/+7
| | | | Notes: svn path=/head/; revision=120681
* Point out the existence of net.link.ether.inet.log_arp_movements.Bruce M Simpson2003-10-031-1/+5
| | | | | | | Add sysctl(8) to the list of cross-referenced manual pages. Notes: svn path=/head/; revision=120680
* Update arp(4) to document the 'arp: foo is on if0 but got reply fromBruce M Simpson2003-10-031-0/+9
| | | | | | | | | | bar on if1' message. PR: bin/48489 Requested by: ru Notes: svn path=/head/; revision=120679
* Implement a new option: -i, which will allow to limitYaroslav Tykhiy2003-07-182-4/+33
| | | | | | | | | | | | | | the scope of operation to the ARP entries on a particular interface. It should be useful on machines with numerous network interfaces, e.g., on inter-VLAN routers. PR: bin/54151 Submitted by: Dmitry Morozovsky <marck at rinet.ru> Discussed on: -net MFC after: 2 weeks Notes: svn path=/head/; revision=117729
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.David E. O'Brien2003-05-031-4/+4
| | | | Notes: svn path=/head/; revision=114601
* style.Makefile(5)David E. O'Brien2003-04-041-1/+2
| | | | Notes: svn path=/head/; revision=113091
* Further fix the syntax by ignoring empty and whitespace-only lines.Ruslan Ermilov2003-03-051-1/+1
| | | | | | | Prompted by: Eugene Grosbein <eugen@kuzbass.ru> Notes: svn path=/head/; revision=111910
* Don't hide global `s'.Ruslan Ermilov2003-01-171-6/+6
| | | | Notes: svn path=/head/; revision=109413