libiptc entry_match
Is there any other way of getting the CORRECT data from match structures apart from match->print(...)
ie
char * list_label(const struct ipt_entry_match *m,const struct ipt_ip *ip) {
struct iptables_match *match = find_match(m->u.user.name, TRY_LOAD, NULL); struct ipt_label_info *info=(struct ipt_label_info *)m->data; match->print(ip, m, 1)
}
i only require the m->data data but if i do a rule like
iptables -I INPUT -m label --label "smtp" -p tcp --dport 25
i can read label fine, if i do
iptables -I INPUT -p tcp --dport 25 -m label --label "smtp"
label becomes blank unless i call match->print(...), which i dont want because the data i want is not intended for stdout... any ideas??