On 11/10/2015 04:09 PM, K Rahul wrote:
Thank you for the reply Alfredo. I am trying to use
pfring_add_filtering_rule as you suggested.
I want to receive all UDP with multicast IP 236.66.66.66 and dst_port
= 6663 and src_ip = 172.16.0.5 for which I am using the following code
sample:
filtering_rule rule;
memset(&rule, 0, sizeof(rule));
rule.rule_id = 1;
rule.rule_action = forward_packet_and_stop_rule_evaluation;
rule.core_fields.proto = 17 /* UDP */;
rule.core_fields.shost.v4 =
ntohl(inet_addr("172.16.0.5")),rule.core_fields.shost_mask.v4 =
0xFFFFFFFF;
rule.core_fields.dhost.v4 = ntohl(inet_addr("236.66.66.66")),
rule.core_fields.dhost_mask.v4 = 0xFFFFFFFF;
rule.core_fields.dport_low = rule.core_fields.dport_high = 6663;
rule.extended_fields.tunnel.tunnel_id = NO_TUNNEL_ID; /*
Ignore the tunnel */
When I execute the code, I am getting packets from multiple sources
other than the given source. I think the filter is not set properly.
Is there anything that is wrong in this code snippet? Are there any
compiler flags that are needed to be turned on for using the above
filtering rule.
Regards,
K Rahul
Hello Alfredo,
Just a reminder. Any advice would be appreciated.
Regards,
K Rahul
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc