Re: protocol handler problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> shyam jith <shyamjithonweb@hotmail.com> [2003-10-29 10:28]:
>
> hai all,
>
>
> I am new to kernel hacking. My problem is simple but its wasting my
> time.
>
> I wrote a  packet handler like this ,The objective was to swap an ip
> with another for a particular machine say 192.168.0.203 .  cde is as
>
> struct packet_type my_proto; my_proto.type=htons(ETH_P_ALL);
> my_proto.func = my_func; my_proto.data = NULL; my_proto.next = NULL;
> dev_add_pack(&my_proto);
>
> and registered it to the protocol list . Ok now the module was
> successfully loaded .
>
> when i checked the /var/log/messages/ it was listeming to eth0
> interface But after that i tried to telent to the victim machine
> .......but ther was no sign that my function did executed.Because no
> messages were logged in and connection to the machine was also
> success full.
>
> how could i know that my protocol handler is working or has some
> problem
>

printk'ng usually helps a lot.  Hence, at least you know if the
routine is called correctly.

wbr,
Lukas
-- 
Lukas Ruf           | Wanna know anything about raw |
<http://www.lpr.ch> | IP?  <http://www.rawip.org>   |
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux