D
Daniel Rudy
Hello Group,
Please consider the following code:
static const mod_cmdft_t cmd_func_tab[] = {
{MODSEC_CMD_SETPARAM, sizeof(mod_param_t), &mod_setparam},
{MODSEC_CMD_GETPARAM, sizeof(mod_param_t), &mod_getparam}
};
These types are defined as follows:
/* aux param: get/set parameter */
typedef struct mod_param_tag__ mod_param_t;
struct mod_param_tag__
{
int param; /* parameter id */
int value; /* parameter value */
};
/* internal: function call table (do not use) */
typedef struct mod_cmdft_tag__ mod_cmdft_t;
struct mod_cmdft_tag__
{
int command; /* command id */
unsigned long psize; /* parameter block size */
int (*fp)(void *pargs); /* pointer to handler function */
};
What is the proper way of setting the address in the function pointer?
To use & or not to use &?
--
Daniel Rudy
Email address has been base64 encoded to reduce spam
Decode email address using b64decode or uudecode -m
Why geeks like computers: look chat date touch grep make unzip
strip view finger mount fcsk more fcsk yes spray umount sleep
Please consider the following code:
static const mod_cmdft_t cmd_func_tab[] = {
{MODSEC_CMD_SETPARAM, sizeof(mod_param_t), &mod_setparam},
{MODSEC_CMD_GETPARAM, sizeof(mod_param_t), &mod_getparam}
};
These types are defined as follows:
/* aux param: get/set parameter */
typedef struct mod_param_tag__ mod_param_t;
struct mod_param_tag__
{
int param; /* parameter id */
int value; /* parameter value */
};
/* internal: function call table (do not use) */
typedef struct mod_cmdft_tag__ mod_cmdft_t;
struct mod_cmdft_tag__
{
int command; /* command id */
unsigned long psize; /* parameter block size */
int (*fp)(void *pargs); /* pointer to handler function */
};
What is the proper way of setting the address in the function pointer?
To use & or not to use &?
--
Daniel Rudy
Email address has been base64 encoded to reduce spam
Decode email address using b64decode or uudecode -m
Why geeks like computers: look chat date touch grep make unzip
strip view finger mount fcsk more fcsk yes spray umount sleep