[ndnSIM] How to create new interest from existing one
Mudasir Qazi
mudasirqazi00 at gmail.com
Thu Mar 29 09:51:58 PDT 2018
Thank you. It works.
On 29 March 2018 at 21:17, Spyridon (Spyros) Mastorakis <
mastorakis at cs.ucla.edu> wrote:
> Hi,
>
> use the Interest constructor that accepts a Block and pass the wire format
> of the existing Interest using the wireEncode method.
>
> Then, use the setName method to set the name of the new Interest.
>
> Thanks,
>
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
> On Mar 29, 2018, at 7:37 AM, Mudasir Qazi <mudasirqazi00 at gmail.com> wrote:
>
> Hi,
>
> I'm trying to create new Interest packet from an existing one. The
> function will be passed existing Interest in parameter e.g.,
>
> Interest& createTemporaryInterest(const Interest& interest){
> shared_ptr<Interest> tempInterest = Interest(interest);
> const Name& tempName = "...";
> tempInterest->setName(tempName);
> return tempInterest;
> }
>
> Basically I need all properties of an Interest copied to another interest.
> Then I'll set custom name of newly created Interest. So, In short, the
> newly created Interest will have all properties of existing one but the
> name.
>
> How can I achieve this? Please help.
>
> --
> Regards,
> Mudasir Qazi
>
>
>
--
Regards,
Mudasir Qazi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180329/bf540137/attachment.html>
More information about the ndnSIM
mailing list