ToS Marking

From: Daniel Draper <boxen@dont-contact.us>
Date: 26 Mar 2003 15:48:33 +1030

Hi Everyone,

I have added the following code to mark packets with some arbitrary ToS
mark (in this case 4) inside the method
ClientSocketContext::sendStartOfMessage(...)

        int tos = 4;
        int ok = setsockopt(HttpSockets[NHttpSockets-1], IPPROTO_IP, IP_TOS,
(char *) &tos, sizeof(int));
        debug(50, 1) ("Attempting to mark packet... Status: %d\n", ok);

The problem is when I analyse outgoing packets from the squid port
(3128) using iptables the packets are not marked. Is there anywhere in
the client response process after this point that could modify or reset
the packet ToS market (eg; another call to setsockopt()) ? Or have I
made a mistake in my code?

Cheers,

Daniel
Received on Tue Mar 25 2003 - 22:15:35 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:35 MST