Skip to content
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

Merged
merged 1 commit into from
Mar 31, 2015

Conversation

BytesGalore
Copy link
Member

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

@BytesGalore BytesGalore added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer labels Mar 30, 2015
@BytesGalore BytesGalore force-pushed the rpl_udp_send_buffer branch from 0eab660 to b9e5c94 Compare March 31, 2015 05:55

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
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member

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 (:

Copy link
Member

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

Copy link
Member

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?

@cgundogan
Copy link
Member

kicked travis

@cgundogan
Copy link
Member

travis is happy. GO

cgundogan added a commit that referenced this pull request Mar 31, 2015
examples:rpl_udp removed the limit of 5 characters as payload size
@cgundogan cgundogan merged commit 1d9f189 into RIOT-OS:master Mar 31, 2015
@BytesGalore BytesGalore deleted the rpl_udp_send_buffer branch April 27, 2015 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants