Passing IP options data to kernel from userspace
I need to put some IP options data as part of each IP packet. Browsing through some sources, it looks like setsockopt() can be used to pass the data to be put into thte IP options header to the kernel from user application.
I then tried a sending a single IP packet after doing socket(2) call by doing
setsockopt(sockfd, IPPROTO_IP, IP_OPTIONS, &data, sizeof(data)) and captured the packet at the receiver end using ethereal but there was no IP otions header at the packet received.
Can somebody help me out with how to send the IP options data from userland to kernel so that kernel creates the IP options header and puts the data in there ?