[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] Question regarding getting packet information
Hi, ns guru:
I intend to get packet flowid or src address in distinguish between
them.
I use the following methed in enque routine in drop-tail.cc
void DropTail::enque(Packet* p)
{
if(DEBUG){
hdr_ip* iph = (hdr_ip*) p->access(off_ip_);
printf(" flowid=%d, src=%d.%d \n", iph->flowid(),
iph->src()>>8,
iph->src()&0xff);
}
However, I get the following information when I compiling drop-tail
of my modified version.drop-tail.cc: In method `void
DropTail::enque(class Packet *)':
drop-tail.cc:78: `off_ip_' undeclared (first use this function)
Could anyobe tell me how to solve this problem ?
The infmation of how to get packet information is appreciated.
Thanks
Xudong
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
Return-Path: <[email protected]>
Received: (qmail 37973 invoked by uid 0); 9 Jun 2000 20:52:03 -0000
Message-ID: <[email protected]>
Received: from 129.128.4.88 by www.hotmail.com with HTTP;
Fri, 09 Jun 2000 13:52:03 PDT
X-Originating-IP: [129.128.4.88]
From: "XuDong Wu" <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: How to get packet's src, dst and flowid ?
Date: Fri, 09 Jun 2000 13:52:03 PDT
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
Hi, ns guru:
I intend to get packet flowid or src address in distinguish between them.
I use the following methed in enque routine in drop-tail.cc
void DropTail::enque(Packet* p)
{
if(DEBUG){
hdr_ip* iph = (hdr_ip*) p->access(off_ip_);
printf(" flowid=%d, src=%d.%d \n", iph->flowid(), iph->src()>>8,
iph->src()&0xff);
}
However, I get the following information when I compiling drop-tail
of my modified version.drop-tail.cc: In method `void
DropTail::enque(class Packet *)':
drop-tail.cc:78: `off_ip_' undeclared (first use this function)
Could anyobe tell me how to solve this problem ?
The infmation of how to get packet information is appreciated.
Thanks
Xudong
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com