lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 11 Apr 2007 00:33:45 -0400
From:	"Ritesh Kumar" <ritesh@...unc.edu>
To:	netdev@...r.kernel.org
Subject: accessing TCP port numbers of an skb in a qdisc

Hi,
    For some per-flow queue management work I need to access TCP port
numbers of an skb inside a qdisc (i.e. in qdisc enqueue and dequeue
functions). Can I assume that skb->data always points to the head of
the IP header of the packet? If that is the case will the following
statements do the trick?

if(skb->nh.iph->protocol == IPPROTO_TCP) {
    skb->h.raw = skb->data + (skb->nh.iph->ihl*4);
    /* read the tcp port numbers in
     * skb->h.th->source and skb->h.th->dest
     */
}

Thanks a lot for your help!

Ritesh
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ