Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, My query is: I need to set the IPv4 header fields(like TOS, TTL, Precedence and Flags) in the linux kernel using the system calls. I tried setting the fields ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    1

    Question Modifying IPv4 headers

    Hi,

    My query is:
    I need to set the IPv4 header fields(like TOS, TTL, Precedence and Flags) in the linux kernel using the system calls.
    I tried setting the fields using the setsockopt() call using sockets but it is not reflecting the actual IPv4 header fields. Is it possible to modify these fields? Please let me know the way of setting IPv4 header fields using the system calls.

    Also, I can set the TTL field using /proc interface - /proc/sys/net/ipv4/ip_default_ttl. Anyone knows how to set for other header fields?

    I tried googling but I couldn't find it. Please help me.

    Thanks in advance,
    Kiran.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Google for "raw sockets".
    Debian GNU/Linux -- You know you want it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...