Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!spool.mu.edu!munnari.oz.au!goanna!dmh From: dmh@goanna.cs.rmit.oz.au (Darren Hosking) Newsgroups: comp.sys.encore Subject: SIOCSARP doesn't seem to work Message-ID: <5184@goanna.cs.rmit.oz.au> Date: 10 Apr 91 06:25:48 GMT Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 67 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. I have tried different flags etc but to no avail. I wrote a small test program that creates an arp cache entry that runs correctly under BSD 4.3 (on a VAX) but not under UMAXV 2.4. /* * Program to test the SIOCSARP ioctl. * * Creates a meaningless arp table entry. */ #include #include #include #ifdef UMAXV #include #include #include #else #include #include #endif struct arpreq arpreq; char ha[] = {255, 255, 255, 1, 2, 3}; int len = 6; main() { int s; struct sockaddr_in *sin; if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { perror("socket: "); exit(1); } bzero((caddr_t)&arpreq, sizeof(arpreq)); sin = (struct sockaddr_in *)&arpreq.arp_pa; sin->sin_family = AF_INET; sin->sin_addr.s_addr = inet_addr("131.170.24.123"); arpreq.arp_pa.sa_family = AF_INET; arpreq.arp_ha.sa_family = AF_UNSPEC; arpreq.arp_flags = ATF_INUSE | ATF_COM; bcopy(ha, arpreq.arp_ha.sa_data, len); if (ioctl(s, SIOCSARP, (caddr_t)&arpreq) < 0) { perror("SIOCSARP"); exit(1); } } What am I (and bootpd) doing wrong? Thanks, dmh Darren Hosking ACSnet: dmh@goanna.cs.rmit.oz Department Of Computer Science ARPA: dmh%goanna.cs.rmit.oz.au@uunet.uu.net RMIT CSNET: dmh%goanna.cs.rmit.oz.au@australia GPO Box 2476V UUCP: ...!uunet!goanna.cs.rmit.oz.au!dmh Melbourne Vic., Australia 3001 PH: +61 3 660 3299 FAX: +61 3 662 1617