[Click] click Digest, Vol 95, Issue 4

shimin sun shimin.sun at keywie.com
Sun May 8 04:27:16 EDT 2011


Packet *p_in = p->clone();
WritablePacket *p_in = p->uniqueify();
Anyway you can change the content and header.

I'm a beginner.



2011/5/5 <click-request at pdos.csail.mit.edu>

> Send click mailing list submissions to
>        click at amsterdam.lcs.mit.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> or, via email, send a message with subject or body 'help' to
>        click-request at amsterdam.lcs.mit.edu
>
> You can reach the person managing the list at
>        click-owner at amsterdam.lcs.mit.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of click digest..."
>
>
> Today's Topics:
>
>   1. changing both data and header (Jessica Shahper)
>   2. changing both data and header (Jessica Shahper)
>   3. Re: changing both data and header (Eddie Kohler)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 4 May 2011 12:50:45 +0100 (BST)
> From: Jessica Shahper <jessica_shahper at yahoo.com>
> Subject: [Click] changing both data and header
> To: click at pdos.csail.mit.edu
> Cc: click at pdos.csail.mit.edu
> Message-ID: <68124.62238.qm at web26902.mail.ukl.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
>
> Hi all!
>
> I want to change the packet data and place some indication about that
> change in
> the header data, but click does not allow simultaneous change in the packet
> data
> and the packet header since it has to be either Packet or WritablePacket?,
> would
> it be a good way if I declare the packets as writable packets first and
> encode
> the contents?and then change them to Packets before embedding the
> information in
> the header??
>
> Regards,
> Jessica
>
> ------------------------------
>
> Message: 2
> Date: Wed, 4 May 2011 12:50:45 +0100 (BST)
> From: Jessica Shahper <jessica_shahper at yahoo.com>
> Subject: [Click] changing both data and header
> To: click at pdos.csail.mit.edu
> Cc: click at pdos.csail.mit.edu
> Message-ID: <68124.62238.qm at web26902.mail.ukl.yahoo.com>
> Content-Type: text/plain; charset=iso-8859-1
>
> Hi all!
>
> I want to change the packet data and place some indication about that
> change in
> the header data, but click does not allow simultaneous change in the packet
> data
> and the packet header since it has to be either Packet or WritablePacket?,
> would
> it be a good way if I declare the packets as writable packets first and
> encode
> the contents?and then change them to Packets before embedding the
> information in
> the header??
>
> Regards,
> Jessica
>
> ------------------------------
>
> Message: 3
> Date: Wed, 04 May 2011 06:02:01 -0700
> From: Eddie Kohler <kohler at cs.ucla.edu>
> Subject: Re: [Click] changing both data and header
> To: click at pdos.csail.mit.edu
> Message-ID: <4DC14E49.7060607 at cs.ucla.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Jessica,
>
> That's a misunderstanding: a WritablePacket is a type of Packet, so all the
> header changes you want can be made to the WritablePacket (which you get by
> calling uniqueify()).
>
> Eddie
>
>
> On 05/04/2011 04:50 AM, Jessica Shahper wrote:
> > Hi all!
> >
> > I want to change the packet data and place some indication about that
> change in
> > the header data, but click does not allow simultaneous change in the
> packet data
> > and the packet header since it has to be either Packet or WritablePacket
> , would
> > it be a good way if I declare the packets as writable packets first and
> encode
> > the contents and then change them to Packets before embedding the
> information in
> > the header?
> >
> > Regards,
> > Jessica
> > _______________________________________________
> > click mailing list
> > click at amsterdam.lcs.mit.edu
> > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
>
> ------------------------------
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
>
> End of click Digest, Vol 95, Issue 4
> ************************************
>



-- 
---------------------
孙士民


More information about the click mailing list