[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about socket netlink
Hi all,
I've created a program using socket netlink, but error emerge
in the statement of "ipq_set_mode". Could you tell me the
reason behind that? I've already compiled the kernel with
netlink options.
Code :
.
if ((qh = ipq_create_handle(IPQ_FLAG_PROMISC, 0)) == NULL) {
ipq_perror("create_handle()");
exit(1);
}
if (ipq_set_mode(qh, IPQ_COPY_PACKET, MAX_PACKET_LEN) < 0) {
ipq_perror("set_mode()");
goto cleanup;
}
.
And it prompted me that
set_mode(): Failed to send netlink message: Connection refused
Is there anything I've missed?
Apart from that, is it possible to change the payload in the
packet? I mean probably the packet would be larger than the
original size.
Thanks so much
your sincerely,
marco.
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/