Is there a socket option to set the fwmark?

Is there a socket option to set the fwmark?

Post by Christophe Loh » Fri, 09 Jan 2009 01:58:00



Hi,

How an application can set the value of the fwmark on a socket?
(I mean the "fwmark" used by "ip rule add fwmark <MARK> table <TABLE_ID>")

Many thanks
Christophe.

 
 
 

1. Linux: setting socket option RCVLOWTR???

I'm trying to set the socket option RCVLOWTR mark with setsockopt() but
the compiler is telling me RCVLOWTR is undefined.  I have checked the
man pages and option is documented there (and as I understand it these
socket options are supposed to be universal across unix platforms).
I've compiled the same code under DEC unix and ultrix and it works fine.

        Also under Linux, select() won't return a socket readable even though I
know it is.  (Actually after about 50 tries under the same conditions,
it returned readable once.)  It does however return it writable, which I
suppose it should.  This question is related to my first one...I was
told that RCVLOWTR defaults to 1 byte but since its not defined in
Linux, who knows....

Please Help!

        Also I'm running kernel 2.0.18 from Red Hat Release 4.0

        Thanks,
                Kirk Metz

You can also email if you like.

2. LPU 0.9-26 - The Label Printing Utiliy (update)

3. IP option setting and increasing MAX sockets

4. RedHat 5.1 Newbie Questions CDROM, PRINTER, ETHERNET, etc...

5. generic socket options with unixdomain sockets?

6. SSLeay and PKCS7

7. Socket and socket options

8. Safty of internet linux machine???

9. 2.2.20 fwmark corruption?

10. ip rule with fwmark not working in 2.6.31?

11. Routing via fwmark

12. using fwmark routing rule on 2.2.x kernel

13. TOS/FWMARK routing