thanks for you help! 2008-05-05 发件人: James Carlson 发送时间: 2008-05-05 19:41:21 收件人: cyx_mail@xxxxxxxxxxx 抄送: linux-ppp 主题: Re: about option_t 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. -- __________ NOD32 3072 (20080503) Information __________ This message was checked by NOD32 antivirus system. http://www.nod32cn.com ?韬{.n?????%??檩??w?{.n???{炳???骅w*jg????????G??⒏⒎?:+v????????????"??????