Sponsored Content
Top Forums Programming SIOCGARP to display the entire ARP table. Post 302448262 by semash! on Wednesday 25th of August 2010 03:04:31 PM
Old 08-25-2010
Hey Corona688,

Again, you were right, it sounds like a fair solution.

I can use sscanf() reading /proc/net/arp and get the same results as with 'arp -an'. While i was looking for a solution, i saw a program which did it with a complex function, reading from devices called '/dev/kmem' and '/dev/vmunix'. Never understood that.

Well, thank you, man!

Last edited by semash!; 08-25-2010 at 05:16 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)							    BSD System Manager's Manual 						    ARP(8)

NAME
arp -- address resolution display and control SYNOPSIS
arp [-n] [-i interface] hostname arp [-n] [-i interface] [-l] -a arp -d hostname [pub] [ifscope interface] arp -d [-i interface] -a arp -s hostname ether_addr [temp] [reject] [blackhole] [pub [only]] [ifscope interface] arp -S hostname ether_addr [temp] [reject] [blackhole] [pub [only]] [ifscope interface] arp -f filename DESCRIPTION
The arp utility displays and modifies the Internet-to-Ethernet address translation tables used by the address resolution protocol (arp(4)). With no flags, the program displays the current ARP entry for hostname. The host may be specified by name or by number, using Internet dot notation. Available options: -a The program displays or deletes all of the current ARP entries. -d A super-user may delete an entry for the host called hostname with the -d flag. If the pub keyword is specified, only the ``published'' ARP entry for this host will be deleted. If the ifscope keyword is specified, the entry specific to the interface will be deleted. Alternatively, the -d flag may be combined with the -a flag to delete all entries. -i interface Limit the operation scope to the ARP entries on interface. Applicable only to the following operations: display one, display all, delete all. -l Show link-layer reachability information. -n Show network addresses as numbers (normally arp attempts to display addresses symbolically). -s hostname ether_addr Create an ARP entry for the host called hostname with the Ethernet address ether_addr. The Ethernet address is given as six hex bytes separated by colons. The entry will be permanent unless the word temp is given in the command. If the word pub is given, the entry will be ``published''; i.e., this system will act as an ARP server, responding to requests for hostname even though the host address is not its own. In this case the ether_addr can be given as auto in which case the interfaces on this host will be examined, and if one of them is found to occupy the same subnet, its Ethernet address will be used. If the only keyword is also specified, this will create a ``published (proxy only)'' entry. This type of entry is created automatically if arp detects that a routing table entry for hostname already exists. If the reject keyword is specified the entry will be marked so that traffic to the host will be discarded and the sender will be notified the host is unreachable. The blackhole keyword is similar in that traffic is discarded but the sender is not notified. These can be used to block external traffic to a host without using a firewall. If the ifscope keyword is specified, the entry will set with an additional property that strictly associate the entry to the inter- face. This allows for the presence of mutiple entries with the same destination on different interfaces. -S hostname ether_addr Is just like -s except any existing ARP entry for this host will be deleted first. -f filename Cause the file filename to be read and multiple entries to be set in the ARP tables. Entries in the file should be of the form hostname ether_addr [temp] [pub [only]] [ifscope interface] with argument meanings as given above. Leading whitespace and empty lines are ignored. A '#' character will mark the rest of the line as a comment. -x Show extended link-layer reachability information in addition to that shown by the -l flag. SEE ALSO
inet(3), arp(4), ifconfig(8), ndp(8) HISTORY
The arp utility appeared in 4.3BSD. BSD
March 18, 2008 BSD
All times are GMT -4. The time now is 03:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy