From owner-freebsd-questions@FreeBSD.ORG Thu Jan 22 01:24:42 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 051A616A4CE for ; Thu, 22 Jan 2004 01:24:42 -0800 (PST) Received: from stellar.calm.wa.gov.au (stellar.calm.wa.gov.au [202.1.29.109]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BB3B43D3F for ; Thu, 22 Jan 2004 01:24:35 -0800 (PST) (envelope-from greglas@calm.wa.gov.au) Received: from calm-kens-2.calm.wa.gov.au (localhost [127.0.0.1]) i0M9OWF07016 for ; Thu, 22 Jan 2004 17:24:32 +0800 (WST) X-Authentication-Warning: stellar.calm.wa.gov.au: iscan owned process doing -bs Received: from calm-kens-10.calm.wa.gov.au ([192.147.114.42]) by calm-kens-2.calm.wa.gov.au with Microsoft SMTPSVC(5.0.2195.6713); Thu, 22 Jan 2004 17:24:31 +0800 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Thu, 22 Jan 2004 17:24:31 +0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Looking for C example of ARP lookup on FreeBSD Thread-Index: AcPgyYqHDquj6b+7QlalLPiWc3kUpQ== From: "Laslett, Greg" To: X-OriginalArrivalTime: 22 Jan 2004 09:24:31.0420 (UTC) FILETIME=[8A8F47C0:01C3E0C9] Subject: Looking for C example of ARP lookup on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2004 09:24:42 -0000 Hi, The code that is being ported uses the 'ioctl' method to request a MAC = address. eg: struct arpreq ReqARP; struct sockaddr_in *pAddr_in; SOCKET s; . . s =3D socket(AF_INET, SOCK_DGRAM, 0); ioctl(s, SIOCGARP, &ReqARP); . . This does not appear to be supported under FreeBSD. Presumably a sysctl = or other mechanism exists. Can anyone provide a code fragment showing IP4 to MAC address = translation. Thanks, Greg.