[pso] HELP cum se obtin numerele porturilor??

Octavian Purdila pso@cursuri.cs.pub.ro
Mon, 14 Jun 2004 18:42:12 +0300


On Monday 14 June 2004 16:46, George Ombas wrote:
> Eu folosesc pt  tema  2 masini virtuale folosind
> bridged connection
> Am vrut sa obtin numerele porturilor astfel:
>
> struct sk_buff *sb = *skb;
>  struct iphdr *ip = sb->nh.iph;
>  struct tcphdr *tcp = (struct
> tcphdr*)((__u32*)(ip+ip->ihl));
>

struct tcphdr *th=(struct tcphdr*)((char*)ih+sizeof(struct iphdr));

tavi