From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 4 18:49:19 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D74D116A4CE for ; Mon, 4 Apr 2005 18:49:19 +0000 (GMT) Received: from smp500.sitetronics.com (sitetronics.com [82.192.77.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C21443D5C for ; Mon, 4 Apr 2005 18:49:19 +0000 (GMT) (envelope-from dodell@offmyserver.com) Received: from localhost.sitetronics.com ([127.0.0.1] helo=smp500.sitetronics.com) by smp500.sitetronics.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.50 (FreeBSD)) id 1DIWbf-000D5B-Vi for freebsd-hackers@freebsd.org; Mon, 04 Apr 2005 20:47:28 +0200 Received: (from dodell@localhost) by smp500.sitetronics.com (8.12.11/8.12.11/Submit) id j34IlRok050290 for freebsd-hackers@freebsd.org; Mon, 4 Apr 2005 20:47:27 +0200 (CEST) (envelope-from dodell@offmyserver.com) X-Authentication-Warning: smp500.sitetronics.com: dodell set sender to dodell@offmyserver.com using -f Date: Mon, 4 Apr 2005 20:47:27 +0200 From: "Devon H. O'Dell " To: freebsd-hackers@freebsd.org Message-ID: <20050404184727.GF43436@smp500.sitetronics.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: <42518AC9.5070208@comcast.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Zs/RYxT/hKAHzkfQ" Content-Disposition: inline In-Reply-To: <42518AC9.5070208@comcast.net> User-Agent: Mutt/1.5.8i Subject: Re: C programming question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2005 18:49:19 -0000 --Zs/RYxT/hKAHzkfQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 04, 2005 at 11:43:21AM -0700, Matt wrote: > I need some help understanding some C code.=20 >=20 > int (*if_ioctl) > (struct ifnet *, int, caddr_t); >=20 > int (*if_watchdog) > (int); >=20 > Can someone break down these declarations (if that's what they are)? Is= =20 > this a form of typecasting? Thanks for your help. These are pointers to functions accepting arguments of type: struct ifnet *, int, caddr_t and int both returning type integer. In the structure in which they are defined, they can be called with=20 structure.if_ioctl(ifnet, int, caddr_t) Kind regards, Devon H. O'Dell --Zs/RYxT/hKAHzkfQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCUYu/Skf3jVXOdl0RAn/zAJ9kmnpbj1B9IdJnDIeory9cjYf1HQCeKlA/ KWHd53K7oQHT7O4ij8AVpxg= =1RcZ -----END PGP SIGNATURE----- --Zs/RYxT/hKAHzkfQ--