Hello,
I want to add my own protocol in kernel network
stack. so i analyze the kernel code and i found that new protocols are
added with dev_add_pack() function. But i am confuse about how to
declare my own protocol in instance of packet_type like one defined
for IP packet
static struct packet_type ip_packet_type =
{
__constant_htons(ETH_P_IP),
NULL, /* All devices */
ip_rcv,
(void*)1,
NULL,
};
How/where to get/write own protocol ID like ETP_P_IP nad what should
be its protocol number? and can i define other fields NULL in my
packet type same as in IP packet type structure?
regards,
cranium.2003
|