it was suggested that i forward this question here instead of linux-net: i'd like to modify apache so that it sets some sort of hint on TCP sockets associated with particular domains/directories, and have the hint used to do traffic shaping in the kernel. IPTOS doesn't provide enough resolution for my needs. i've been digging around the 2.4 source, and it seems like the struct sk_buff nfmark field might be something i could use to do this. but it doesn't appear that a userland app can control this field on a per-socket basis. i was thinking of doing this: - add default_nfmark field to struct sock - add SO_NFMARK and setsockopt() support in net/core/sock.c - add support to tcp_output.c et al to copy the default_nfmark into the skbs (probably use default_nfmark == 0 to indiciate no change) i recognize this isn't exactly a perfect solution... and i'd welcome some input. thanks -dean p.s. i'm not on netfilter, so please cc me.