[Ndn-interest] How to calculate max data bytes per packet?

ndn ndn ndn at sqh.me
Mon Aug 3 00:44:31 PDT 2015


Dear Junxiao,
After seen your email, I test my program again. I found I have something
wrong in my memory. The problem isn't crash, It just *gives me a exception
message*. I make a mistake. Sorry for that.

Limit the content payload in half of practical limit can not make
best efficient in transmission.Why not to set a function  to get the max
content payload? As a application programmer, We shoul

2015-08-03 10:34 GMT+08:00 Junxiao Shi <shijunxiao at email.arizona.edu>:

> Hi Qihan
>
>
>
> face.getMaxNdnPacketSize() gives the practical limit of NDN packet length.
>
> For a Data packet, this length not only includes the Content payload, but
> also includes the Name, MetaInfo, and Signature.
>
> There’s no general algorithm to compute the limit of payload size, because
> Signature is generated after Content is prepared, and theoretically its
> length can depend on the Content (although all defined signing algorithms
> don’t do that).
>
> In most cases, *it’s safe to limit your Content payload to be half of
> that practical limit*.
>
>
>
>
>
> On the other hand, I notice a problem in ndn-ccl-api description for
> getMaxNdnPacketSize:
>
> This is a static method to get the practical limit of the size of a
> network-layer packet. If a packet is larger than this, the library or
> application MAY drop it.
>
> This description permits the library to drop the packet when limit is
> exceeded instead of crashing, but you are observing a crash.
>
> You may file a bug on the Redmine site of the specific library you are
> using (eg. ndn-cpp).
>
>
>
> Yours, Junxiao
>
>
>
>
> *From: *ndn ndn
> *Sent: *Sunday, August 2, 2015 06:21
> *To: *ndn-interest at lists.cs.ucla.edu
> *Subject: *[Ndn-interest] How to calculate max data bytes per packet?
>
>
>
>
>
> Hello everyone,
>
> Recently,I want to send a large packet via NDN.When I using
> NDN-CCL,face.getMaxNdnPacketSize() can get the max packet size in NDN
> network.
>
> But I use data.setContent() to set face.getMaxNdnPacketSize() bytes
> data,the program crashed,it tells me the size of data is too large than max
> NDN packet size.
>
>
>
> So,How to get the max data size I can send?It make me confuse for a long
> time.
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndn-interest/attachments/20150803/d225411d/attachment.html>


More information about the Ndn-interest mailing list