Sponsored Content
Top Forums Programming SIOCGARP to display the entire ARP table. Post 302448198 by Corona688 on Wednesday 25th of August 2010 12:33:45 PM
Old 08-25-2010
The "-a" flag in Linux just changes the output format. I think you're thinking of the windows arp command, where the "/a" flag displays the whole table.

In any case, according to the strace command, linux ARP doesn't use ioctls to get the ARP table -- it slurps it in from the special file /proc/net/arp all in one big read. Try cat /proc/net/arp.

Last edited by Corona688; 08-25-2010 at 01:49 PM..
 

9 More Discussions You Might Find Interesting

1. Solaris

ARP Cache

Dear all, We are testing two of our servers for mq series connectivity. The scenario is, when one machine is shutting down it's services there are some scripts that do a dns update, which removes the ip address and relates it to the ip address of the other node on our dns server, and the update... (7 Replies)
Discussion started by: earlysame55
7 Replies

2. Red Hat

Arp Problem

Dear All i have a linux proxy server which has RHEL-5 64 bit, it has two interfaces, it has the following details eth0=10.200.14.42 eth3=10.201.14.42 default gateway=10.201.14.254 one static route=192.168.0.0/24 gw 10.200.14.254 i am facing a problem when i ping 10.201.14.42 from... (2 Replies)
Discussion started by: surfer24
2 Replies

3. Web Development

Display the contents of a table.

Dear Friends, Am an newbie to this domain. I have a table which is filled with contents which i need to be updated with,so am trying to design a flow which would read the data from the table and mail it to me at regular intervals. I could make out the flow using mailx command but want to... (3 Replies)
Discussion started by: gokulj
3 Replies

4. UNIX for Advanced & Expert Users

Monitoring the arp table

Man page of netlink says: --------------------------------- NETLINK_ARPD For managing the arp table in user space. ---------------------------------- Is it possible to monitor arp table using Netlink? or it's just for manipulating? (1 Reply)
Discussion started by: xyzt
1 Replies

5. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

6. UNIX for Advanced & Expert Users

arp questions

Can someone please explain this output to me. Why doesn't ifconfig show the same info? ~ $ arp -a ? (10.71.0.1) at 00:1b:21:2b:eb:0c on eth0 (4 Replies)
Discussion started by: cokedude
4 Replies

7. AIX

Problem using ioctl (SIOCGIFCONF and SIOCGARP)

I am writing some portable code to print Interface, its IP address, and its MAC (Hardware) address. It is working on three platforms (viz, Linux, Solaris and HP-UX). However, it is creating problems on AIX. The code is as follows: Now the problem is that when I try to execute the... (1 Reply)
Discussion started by: slash_blog
1 Replies

8. Shell Programming and Scripting

Bash script to display result in table

My script gives the following result. Is it possible to display the same in table format ? 1. rex_best Latest feeds are not avaialable. The last feed was generated on 2012-05-17 File Name = ekb_best_20120517_010949_665.tar.gz The Number of entry elements = 4209539 2. rex_genre Latest... (2 Replies)
Discussion started by: kishorekumar87
2 Replies

9. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file. Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
arp(8)							      System Manager's Manual							    arp(8)

NAME
arp - Displays and controls Address Resolution Protocol (ARP) tables SYNOPSIS
/usr/sbin/arp [-u] [-n] hostname arp -a [-u] [-n] [-i] [system] arp -d hostname arp -f filename arp -g hostname arp -s [-u] hostname hardware_addr [temp] [pub] [trail] FLAGS
Displays all of the current ARP entries. Deletes the entry for hostname if the user issuing the command has superuser authority. Reads entries from filename and adds those entries to the ARP tables. Use of this flag requires superuser privilege. Entries in the file have the following format: hostname hardware_addr [temp] [pub] [trail] Fields in this format are as follows: Specifies the remote host identified by the entry. Specifies the hardware address of the remote host. The address is given as 6 hexadecimal bytes separated by colons. Specifies that this ARP table entry is temporary. When this argument is not used, the table entry is permanent. Indicates that the table entry will be published and that the current system will act as an ARP server, responding to requests for hostname even though the host address is not its own. Indicates that the trailer encapsulation may be sent to this host. Sends a gratuitous ARP packet. The hostname can be a local host name, alias, or IP address. Displays the interface with which the ARP entry is associated. Displays numeric IP addresses and hardware addresses only. When this flag is not specified, arp displays hostnames, numeric IP addresses, and hardware addresses. Creates a single ARP entry for hostname. Use of this flag requires superuser privilege. The arguments are explained in the discussion of the -f flag. Displays the MAC address in noncanonical form with address bytes reversed and separated by a colon character (:). By default, all addresses are displayed in canonical form with address bytes separated by the hyphen character (-). When used with the -s flag, this indicates that the hardware_addr is in noncanonical form. DESCRIPTION
The arp command displays or modifies the current ARP entry for the host specified by hostname. The host may be specified by name or num- ber, using Internet dot notation. With no flags, the program displays the current ARP entry for hostname. The ARP tables can be displayed by any user, but only the superuser can modify them. EXAMPLES
To display the ARP address-mapping tables for the local host, enter: arp -a alpha1.dec.com (16.181.20.2) at 08-00-2b-2c-f5-31 alpha2.dec.com (16.100.21.20) at 08-00-2b-3c-2d-fd To display the ARP address-map- ping tables for the local host and the interface, enter: arp -a -i jupiter (192.45.20.2) at 08-00-2b-1a-f8-23 (tu0) sigma (204.126.98.16) at 08-00-2b-5f-1d-33 (tu1) To add a single entry for the remote host laszlo to the ARP mapping tables temporarily, enter: arp -s laszlo 08:00:2b:0f:44:23 temp The address is considered canonical even though the bytes are separated by colons. For input, the arp command does not use the colon (:) and hyphen (-) characters to indicate whether the address is canonical or noncanonical. Note that you must have superuser authority to execute this command. To add a single entry for the remote host laszlo to the ARP mapping tables temporarily, enter: arp -u -s laszlo 10:00:d4:f0:22:c4 temp The -u flag indicates the address is noncanonical. Note that you must have superuser authority to execute this command. To add mul- tiple entries to the ARP mapping tables from the file newentries, enter: arp -f newentries Note that you must have superuser authority to execute this command. FILES
Specifies the command path. RELATED INFORMATION
Commands: netstat(1), ifconfig(8) Protocols: arp(7) Specifications: RFC 826 delim off arp(8)
All times are GMT -4. The time now is 01:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy