ipt_entry_match and data field
Hi,
can anyone explain me the use of data as unsigned char in the structure ipt_entry_match? I mean, why are we using unsigned char?
----- snipped from ip_tables.h ------------------------
struct ipt_entry_match
{
union {
struct {
u_int16_t match_size;
/* Used by userspace */
char name[IPT_FUNCTION_MAXNAMELEN];
} user;
struct {
u_int16_t match_size;
/* Used inside the kernel */
struct ipt_match *match;
} kernel;
/* Total length */
u_int16_t match_size;
} u;
unsigned char data[0];
};------------ end ---------------------------
thanks,
Pablo
Quoted 2 lines · Pablo Neira
can anyone explain me the use of data as unsigned char in the structure
ipt_entry_match? I mean, why are we using unsigned char?
We are not. It is just a placeholder for the match extension. The actual data type and size differs depending on the match used.
Regards
Henrik