Re: typdef in iw_handler.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/11/1 Bond <jamesbond.2k.g@xxxxxxxxx>
>
> I have used typedef in my C programs previously many times.
> So it is not new to me
>
> For example consider following typedef
> struct var {
>    int data1;
>    int data2;
>    char data3;
> };
>
> typedef struct var newtype;
> then we can use newtype instead of struct var.
>
> Now see this
> typedef int (*iw_handler)(struct net_device *dev, struct iw_request_info *info,
>                          union iwreq_data *wrqu, char *extra);
>
> above is line number 314 in include/net/iw_handler.h
>
> I was not able to understand what is being typedef'd here?

A type of 'function pointer' with four args and a int return value is declared.
With the code you cited, you can use the following code to declare a
function pointer:
    iw_handler my_fun_ptr;

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux