On Wed, 3 May 2006 13:58:06 -0300 (ART) Rui Cristo <rui_alisson@xxxxxxxxxxxx> wrote: > How can I set the field skb->priority? Some function, ioctl? > I need this to configure the egress mapping (vconfig) and tell > which priority my frames are to egress depending on skb->priority. > I don't think this question is specific to vlans, but I'll try to answer anyway. It looks to me like in general the kernel just uses IPV4 TOS flags to set the skb->priority flag. The system call you give below should override this mechanism, and I'm not sure why this doesn't work. If you're feeling adventurous you could create your own iptables kernel module (see http://www.linuxjournal.com/node/7184/print) which could peek at skbuffs at the NF_IP_POST_ROUTING step and set skb->priority based on absolutely any parameter you choose. On the other hand it may be that the default TOS based skb->priority setting is good enough for your purposes.... Alex > I'm trying to use this: > > int val = 2; > setsockopt(sockfd, SOL_SOCKET, SO_PRIORITY, (char*) &val, > sizeof(val)); > > It doesnt work. I`m afraid that this approach doesnt change the > skb->priority field. Can Anyone Help? > > > ---------------------------------