C programming question

Mike Meyer mwm at mired.org
Thu Jul 7 13:33:11 GMT 2005


On Mon, 04 Apr 2005 11:43:21 -0700
Matt <mhersant at comcast.net> wrote:
> I need some help understanding some C code. 

cdecl (devel/cdecl) is your friend.

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

explain int (*if_ioctl)(struct ifnet *, int, caddr_t)
declare if_ioctl as pointer to function (pointer to struct ifnet, int, caddr_t) returning int

> int     (*if_watchdog)
>         (int);

explain int (*if_watchdog)(int)
declare if_watchdog as pointer to function (int) returning int

The formatting on this one is strange.

	<mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list