Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Apr 2005 20:57:01 +0200
From:      gilles chehade <chehad_g@epitech.net>
To:        Matt <mhersant@comcast.net>
Cc:        misc@openbsd.org
Subject:   Re: C programming question
Message-ID:  <20050404185701.GA12867@rotten.epita.fr>
In-Reply-To: <42518AC9.5070208@comcast.net>
References:  <42518AC9.5070208@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 04, 2005 at 11:43:21AM -0700, Matt wrote:
> I need some help understanding some C code. 
> 
> int     (*if_ioctl)
>        (struct ifnet *, int, caddr_t);
> 
> int     (*if_watchdog)
>        (int);
> 
> Can someone break down these declarations (if that's what they are)?  Is 
> this a form of typecasting?  Thanks for your help.
> 

This is a bit off topic :)

int	(*if_ioctl)(struct ifnet *, int, caddr_t);

pointer to a function that returns an int and that takes a struct ifnet *, an
int and a caddr_t as parameters.

int	(*if_watchdog)(int);

pointer to a function that returns an int and takes an int as parameter.



-- 
veins (aka chaton) - Chehade Gilles - chehad_g@epitech.net - promo 2006 (ept4)
        Astek, assistant crypto, delegue ept4, chercheur en vie meilleure ;-)
	"..the good guys win primarily because criminals are just so supid."
	-- bruce schneier



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050404185701.GA12867>