summaryrefslogtreecommitdiffstats
path: root/usr.sbin/arp/arp.c
Commit message (Collapse)AuthorAgeFilesLines
* add reject+blackhole keywords to install entries with RTF_BLACKHOLEsam2008-03-181-4/+7
| | | | | | | | and RTF_REJECT, respectively PR: bin/79228 Submitted by: Dan Lukes <dan@obluda.cz> MFC after: 2 weeks
* quiet compiler complaint about comparing &v against NULLsam2008-01-101-2/+2
|
* Use sizeof() for calculating the buffer size instead of hard-coded values.kevlo2007-03-061-1/+1
|
* - Before doing ioctl(SIOCGIFNETMASK) put the proper IP address into the ifreq,glebius2006-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>
* Sync utility's usage() with manpage's SYNOPSIS.ru2006-09-291-2/+2
|
* Refuse to install invalid ARP entries.glebius2006-02-091-2/+3
| | | | Submitted by: Vitaliy Ovsyannikov <V.Ovsyannikov kr.ru>
* Update usage to reflect the fact that the -d -a now accepts -i <interface>.brooks2006-01-101-1/+1
| | | | | Reminded by: ru Pointy hat: brooks
* Allow the -i <interface> option with -d -a to allow all arp entries forbrooks2006-01-101-1/+1
| | | | a given interface to be removed.
* List IFT_BRIDGE as a valid type so that arp entries can be properly deleted.thompsa2005-11-031-1/+6
| | | | Submitted by: Michal Mertl <mime^traveller.cz>
* Commit some cosmetic fixes I developed some time ago, mostly style butru2005-06-091-26/+31
| | | | one functional change (fixed exit status from the "get" operation).
* Fix exit status. In rev. 1.48 return logic of rtmsg() was confused. Thisglebius2005-06-091-1/+1
| | | | | | | made arp(8) command exit status reversed for -s and -S. Reported by: sem MFC after: 2 weeks
* o Reorganize the previous delta to make it more style(9) compliant.maxim2005-01-241-3/+5
| | | | | | Submitted by: ru o Reduce an amount of memory we ask in advance.
* o Try hard to guess a buffer size for a fast growing routing table.maxim2005-01-241-5/+15
| | | | | | | | An approach taken from killall/killall.c. PR: bin/76075 Submitted by: Dmitrij Tejblum MFC after: 3 weeks
* For VLAN interfaces, print MAC addresses properly.ru2004-12-241-1/+2
| | | | | | | | (Broken in rev. 1.52.) PR: 75471 Submitted by: Jon Simola MFC after: 3 days
* Per letter dated July 22, 1999, delete clause 3 from code directlyimp2004-08-071-4/+0
| | | | from Berkeley.
* Be smarter about printing non-ethernet link-level addresses.dfr2004-06-131-3/+13
|
* Avoid assignments to cast expressions.stefanf2004-06-081-1/+1
| | | | | Reviewed by: md5 Approved by: das (mentor)
* Massive cleanup of the code removing global variables toluigi2004-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.
* Replace ROUNDUP/ADVANCE with SA_SIZEluigi2004-04-131-7/+5
|
* Make functions and variables static.luigi2004-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.
* - Change several errx() calls that should have been err() calls.mux2004-04-091-12/+14
| | | | | | - Handle empty ARP tables properly. - Remove register keyword. - arp(8) is WARNS?=4 clean, so mark it as such to avoid regressions.
* Implement a new option: -i, which will allow to limityar2003-07-181-4/+25
| | | | | | | | | | | 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
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+4
|
* Further fix the syntax by ignoring empty and whitespace-only lines.ru2003-03-051-1/+1
| | | | Prompted by: Eugene Grosbein <eugen@kuzbass.ru>
* Don't hide global `s'.ru2003-01-171-6/+6
|
* POLA dictates that in the file designated with the -f optionru2002-12-271-2/+8
| | | | | | | | argument, leading whitespace and empty lines be ignored, and the `#' character marks the rest of the line as a comment. PR: bin/45958 MFC after: 3 days
* Change 'int pid' to 'pid_t pid'jmallett2002-07-251-1/+1
| | | | Submitted by: Bruce "Allah" Dang <bruce@research.teamxor.org>
* Unbreak this file after the last drive-by committing. We have towpaul2002-05-091-2/+2
| | | | | | | | | | | #include route.h before iso88025.h, and we have to dereference the trld_route array correctly. (NOTE: I'm not altogether sure that this is really the correct way to traverse this array. This just eliminates the build warning/error. It may not work right at runtime, and I have no way to test it since I lack the necessary hardware.) Broken by: kbyanc, who gets to wear the pointy hat
* Update ARP to access token-ring source routing information at it's newkbyanc2002-05-081-5/+10
| | | | | | | location. Not tested by: me (sorry!) Sponsored by: NTT Multimedia Communications Labs
* GCC 3.1 cleanup - add a break after default: at the end of a switchmurray2002-04-071-0/+1
| | | | statement.
* Don't reinvent the wheel now that ether_ntoa(3) has been fixedru2002-04-061-25/+13
| | | | | | to print leading zeros in libc_net/ether_addr.c,v 1.13. MFC after: 3 days
* Include <string.h> for some prototypes, rather than depending onmike2002-04-011-0/+1
| | | | pollution from <strings.h>.
* Fix bugs from previous commit: initialize the correct field and usemikeh2002-03-201-5/+5
| | | | | | | the correct local variable. Caught by: Joachim Isaksson <Joachim.Isaksson@algitech.com> Pointy hat to: mikeh
* WARNS=2 cleanup.mikeh2001-12-101-58/+68
| | | | | Submitted by: Maxime Henrion <mux@qualys.com> MFC after: 2 weeks
* Print [fddi] or [atm] tags for ARP addresses on interfaces of that type.mdodd2001-10-191-0/+6
|
* Print interface name for each ARP entry.ru2001-10-081-0/+3
| | | | | Prodded by: Igor Podlesny <poige@morning.ru> MFC after: 1 week
* - Renamed the ``proxy'' modifier of the -d flag to ``pub'',ru2001-06-071-19/+26
| | | | | | | | | | | | | to be consistent with the -s flag. Updated documentation on what this modifier does. - Added the ``only'' keyword to the -s and -S flags, that could be used to created "proxy-only" published entries. Previously, arp(8) created an entry of this type only in the absence of the route to a destination. PR: bin/12357 MFC after: 1 week
* Add a missing free(3).yar2001-05-021-0/+1
| | | | | | PR: bin/27001 Submitted by: alex <ml-freebsd-net@phobgate.de>, Matthew Emmerton <matt@gsicomp.on.ca>
* Add the VLAN interface type to the list of ARP-capable interface types.yar2001-04-041-2/+5
|
* zeropad mac address ouputbillf2001-03-081-1/+2
| | | | | | PR: bin/25584 Submitted by: David Xu <davidx@viasoft.com.cn> Reviewed by: wollman, billf
* h_errno is declared in netdb.h.imp2001-03-011-2/+0
|
* Print a diagnostic message if no interface could be determinedru2001-02-271-0/+2
| | | | | | | | | when attempting to create a published ARP entry. For example: # arp -s 1.1.1.1 auto pub PR: bin/7753 Submitted by: Jonathan Hanna <pangolin@home.com>
* Make the ``arp -d hostname proxy'' really do something useful.ru2001-02-051-2/+2
| | | | | | Specifically, ``proxy'' modifier tells the code to delete only Proxy ARP entry for the ``hostname''; the usual ARP entry will be unaffected by this operation.
* Revert previous checkin ("proxy" is required in some instances).archie2001-02-011-1/+1
| | | | Add a note to that effect to the man page.
* Fix documentation: "proxy" is not a keyword for the arp(8) command line.archie2001-01-311-1/+1
|
* Change type of vars which hold in_addr.s_addr from u_long to u_int32_t,shin2000-03-031-3/+3
| | | | | | for more safety on alpha. Approved by: jkh
* Fix syntax error in previous commit.jkh2000-01-171-1/+1
|
* Don't overflow buffers.kris2000-01-161-2/+2
| | | | Reviewed by: audit@freebsd.org
* Yet another align.ru1999-09-201-1/+1
| | | | | | It will be required if sizeof(struct sockaddr_in) changes in the future. Not objected to by: wollman
* Align sockaddrs passed to/from the routing socket as supposed by kernel.ru1999-09-131-5/+7
| | | | | | PR: 12847 Spotted by: Key Teck Sin <ktsin@acm.org> Reviewed by: wollman
OpenPOWER on IntegriCloud