Re: about option_t

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

 



cyx_mail@xxxxxxxxxxx writes:
> Which piece of code call the void *addr.

'addr' is a type-dependent value.  It's not necessarily called as a
function -- that only happens if the type is o_special,
o_special_noarg, or o_wild.

> some plugins uses this pointer to call functions when the plugin loads. BTW, what is the exactly meaning of each value of enum opt_type struct? Thanks a lot!

The values should be relatively self-explanatory, if you read the code
in options.c or examine any of the code that uses the options.

  o_special_noarg - option is processed by a function call and
  consumes no other arguments.

  o_special - option processed by function call and consumes one more
  argument.

  o_bool - option address is a 'bool' to be set to the lower 8 bits of
  'flags'.  If 'addr2' is set, use the OPT_A2{COPY,CLR,CLRB,OR) to
  determine what is done to that value.

  o_int - parse an integer, offset by low 8 bits of 'flags', and store
  in 'addr'.

  o_wild - special self-identifying option (no keyword; parsed by
  appearance).  Used only for IPv4 addresses, device name, and tty
  speed.

-- 
James Carlson         42.703N 71.076W         <carlsonj@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux