ns-allinone-2.35/ns-2.35/common/agent.cc
Packet*
Agent::allocpkt(int n) const
{
        Packet* p = allocpkt();

	if (n > 0)
	        p->allocdata(n);

	return(p);
}
/* allocate a packet and fill in all the generic fields and allocate
 * a buffer of n bytes for data
 */
allocate a packet and fill in all the generic fields and allocate
a buffer of n bytes for data
allocate a packet and fill in all the generic fields and allocate a buffer of n bytes for data
Packet*
Agent::allocpkt(int n) const
{
        Packet* p = allocpkt();
	if (n > 0)
	        p->allocdata(n);
	return(p);
}
Packet * Agent :: allocpkt ( int n ) const { Packet * p = allocpkt ( ) ; if ( n > 0 ) p -> allocdata ( n ) ; return ( p ) ; }
allocate a packet and fill in all the generic fields and allocate
 a buffer of n bytes for data
allocate a packet and fill in all the generic fields and allocate a buffer of n bytes for data