Thanks a lot for responding. The key was " ntohs()" which i didn't have and you mentioned. It works properly now. > >You have to use > >else { > char buf[16]; > inet_ntop(AF_INET, &dst_addr.sin_addr, dst, sizeof(dst)); ^ buf, not dst > printf("%s:%hu\n", buf, ntohs(dst_addr.sin_port)); >} -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html