Re: Help Regarding Sockt in Linux 2.6

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

 



Since protinfo is a private data area (a void pointer). u can use it according to ur convenience (declare a structure of ur interest which will be pointed to by protinfo).

if u r using KERNEL_VERSION <= 2.6.10 inet_opt structure is ur friend. For KERNEL_VERSION > 2.6.10 use inet_sock.






On 6/10/06, Sandeep Mailk <malik.mca@xxxxxxxxx> wrote:
Hi...


I am having a code written to set the TOS field for linux 2.4 kernel.
Now I have to port the same code on Linux 2.6 kernel. Now since all of
you might be knowing that the socket structure has undergone a
complete revamp in linux 2.6. The code snippet which i used in 2.4 was
sock->sk->protinfo.af_inet.tos = 0xb8 ;

Now the sock structure is not having the protinfo and is replaced by
sk_protinfo field which prviously used to be a union. Now it has been
changed to a void *. So can anyone help me to set the tos value????


\Malik

--
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