Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!think.com!paperboy!hsdndev!husc6!encore!jmagee From: jmagee@encore.com (Jim Magee) Newsgroups: comp.sys.encore Subject: Re: SIOCSARP doesn't seem to work Summary: Different IOCTL mechanism Message-ID: <131041@puff.encore.com> Date: 16 Apr 91 18:08:13 GMT References: <5184@goanna.cs.rmit.oz.au> <1991Apr15.085509.11229@wimsey.bc.ca> <131038@puff.encore.com> Organization: Encore Computer Corp, Fort Lauderdale, FL Lines: 30 In article <131038@puff.encore.com>, jmagee@encore.com (Jim Magee) writes: > In article <5184@goanna.cs.rmit.oz.au>, dmh@goanna.cs.rmit.oz.au > (Darren Hosking) wrote: > >I can't get the set arp cache ioctl (SIOCSARP) to work under UMAXV 2.4. The > >code that requires this ioctl is bootpd which previously compiled and > >ran correctly (under UMAXV 2.2m). However, under UMAXV 2.4 the ioctl always > >produces SIOCSARP: Invalid argument. > > To issue IOCTLs to ARP (including SIOCSARP) you must open the appropriate > streams device (/dev/inet/arp) and then issue the IOCTL. I almost forgot, the method for issuing the ioctl is also slightly different. It has to be pushed as a streams message. Here's how: struct strioctl strioc; struct arpreq ar; int s; s = open("/dev/inet/arp",0); strioc.ic_cmd = SIOCSARP; strioc.ic_timout = -1; strioc.ic_len = sizeof(struct arpreq); strioc.ic_dp = &ar; result = ioctl(s, I_STR, &strioc); -- Jim Magee UMAX Development uunet!gould!jmagee Encore Computer Corporation jmagee@headroom.encore.com 6901 W. Sunrise Blvd. MS-407 (305) 587-2900 x5165 Plantation, FL 33313