-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples:rpl_udp removed the limit of 5 characters as payload size #2742
Conversation
0eab660
to
b9e5c94
Compare
|
||
if (argc != 3) { | ||
printf("usage: send <addr> <text>\n"); | ||
return 1; | ||
} | ||
|
||
address = atoi(argv[1]); | ||
/* max payload size = MTU - MAC - AES - IPV6_HDR_LEN - UDP_HDR_LEN | ||
* 33 = 127 - 25 - 21 - 40 - 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't your calculation based on the 802.15.4 MTU? Using this example e.g. via ethernet and ipv6 would yield room for a far bigger payload size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, but I thought that the minimal average is most suiting here since the example should be runnable on every supported hardware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can live with the minimal average (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The minimal average would be the cc1100 with 58, but since this is smaller than 0 with above calculation, I guess we are okay :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have fragmentation for that?
kicked travis |
travis is happy. GO |
examples:rpl_udp removed the limit of 5 characters as payload size
The buffer size for sending a text to a node via UDP was limited to 5.
This PR rises the limit to 33 bytes since it is the maximum payload we can offer to be sent without fragmenting packets:
MTU - MAC Header - Encryption Header - IPV6 Header - UDP Header