Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 1998 09:37:33 +0200 (CEST)
From:      Andrzej Bialecki <abial@nask.pl>
To:        bryan collins <bryan@coombs.anu.edu.au>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: /usr/sbin/arp: actual retrieval of routing table
Message-ID:  <Pine.BSF.4.02A.9810150930550.11086-100000@korin.warman.org.pl>
In-Reply-To: <199810150116.SAA03564@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 15 Oct 1998, bryan collins wrote:

> occasionaly I get the error message in the subject
> 
> /usr/sbin/arp: actual retrieval of routing table
>  
> and doesnt print the arp table.
> 
> the command is '/usr/sbin/arp -an' which runs every 60 seconds.
> the arp table has around 300-400 entries all the time.
> 
> have i come across some limitation for the table?

If your machine is quite busy adding/deleteing routes, I can understand
this. When you retrieve a bigger chunk of data from the kernel, you first
do the "sizing" of the memory needed, then you actually retrieve the data
- 'arp' does exactly this. If the actual routing table grows between these
two sysctl(3) calls, the data wouldn't fit and sysctl(3) refuses to
transfer them to your buffer.

Perhaps the programs which use this double sysctl(3) calls should allocate
somewhat bigger buffer than that calculated on basis of previous call,
anticipating for unexpected change in data size...

Andrzej Bialecki

--------------------   ++-------++  -------------------------------------
 <abial@nask.pl>       ||PicoBSD||   FreeBSD in your pocket? Go and see:
 Research & Academic   |+-------+|       "Small & Embedded FreeBSD"
 Network in Poland     | |TT~~~| |    http://www.freebsd.org/~picobsd/
--------------------   ~-+==---+-+  -------------------------------------


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9810150930550.11086-100000>