Subject: arpresolve: can't allocate llinfo
To: None <port-i386@NetBSD.ORG>
From: John Messenger <>
List: port-i386
Date: 05/04/1995 21:29:33
Dear Networking Experts,

(I sent this to tech-net but without response.)

I'm writing a NetBSD-1.0/i386 driver for a token ring card.  I fully
understand the card.  I don't understand all that much of the software
above the network driver.  So far, I have transmit code and no receive

The test setup is a machine with an Ethernet connection (ed1) and my
test network (pa0).

/etc/hostname.pa0 says: inet 0xffffffc0
/etc/hostname.ed1 says: inet 0xffffffc0

/etc/hosts: puma-pa cervil-pa

When I try to transmit a packet (which I do by pinging a host whose IP
address indicates it is on the same segment as my NIC), arpresolve is
called (presumably from token_output, my hacked equivalent of
ether_output).  Arpresolve complains:

  arpresolve:jlm: rt=0xf8723800
  arpresolve:jlm: la=0x0
  arpresolve: can't allocate llinfo

So it looks like there is a route, but no "link-level info cache".

Could someone fill me in as to what I need to do to enable arpresolve
to get the address it needs to send the packet?

To test my transmit code, I have hacked arpresolve to return a
broadcast address in this situation!  Then my ping packet makes it
onto the ring.

Here's a segment from arpresolve, as munged.
        printf("arpresolve:jlm: rt=0x%x\n", rt);
	if (rt)
		la = (struct llinfo_arp *)rt->rt_llinfo;
	else {
		if (la = arplookup(SIN(dst)->sin_addr.s_addr, 1, 0))
			rt = la->la_rt;

        printf("arpresolve:jlm: la=0x%x\n", la);
	if (la == 0 || rt == 0) {
		log(LOG_DEBUG, "arpresolve: can't allocate llinfo");

        -- John Messenger, Proteon International (
	   "Mind like parachute: only works when open" -- Charlie Chang
           I am not speaking for my employer