gnrc_icmpv6_error: initial import#3184
Conversation
b153ed7 to
fbbf7cc
Compare
95bb856 to
e900705
Compare
|
Removed some code duplication. |
There was a problem hiding this comment.
I guess a macro would be fine for this.
|
addressed comments. |
6d77a49 to
10ac802
Compare
|
Rebased |
10ac802 to
44e466d
Compare
|
Rebased and adapted to current master |
There was a problem hiding this comment.
What's the purpose of these wrapper functions? Don't seem to shorten anything.
There was a problem hiding this comment.
They are the API functions.
There was a problem hiding this comment.
All other ICMPv6 messages have their own build functions, too. So it would be inconsistent to have only two (these three in one and the param_prob one) for the errors. Especially since the 4th parameter of _icmpv6_error_build() is for the most cases just used to set the reserved field.
There was a problem hiding this comment.
All other ICMPv6 messages have their own build functions, too
With #3693 not any more. ;)
I think providing _icmpv6_error_build() as an API function is sufficient.
There was a problem hiding this comment.
The case of gnrc_icmpv6_echo_build() is a totally different one as this one. A generic gnrc_icmpv6_error_build() would expose reserved fields (which have to be 0) to the user.
There was a problem hiding this comment.
Also how would you understandably document the fourth parameter?
Sets the x-th offseted word in the packet. Needs to be 0 for ICMPV6_DST_UNR and ICMPV6_TIME_EXC and the MTU of the interface for ICMPV6_PKT_TOO_BIG.
?
There was a problem hiding this comment.
Which "user" needs to send ICMPv6 echo packets?
There was a problem hiding this comment.
Me e.g. (and these are echo packages). Let's discuss this on Monday f2f.
There was a problem hiding this comment.
any result of this discussion?
There was a problem hiding this comment.
#3693 was merged, but I still argue that it doesn't make sense here. The different message types have different default values (some need code to be 0, some need the "value" field [which is not existent in any of the packet types] to be 0 [when it is the unused-field]) and param_prob even expects a pointer inside orig_pkt making it the odd one out and an API that would be like @OlegHahm proposed inconsistent.
c7e0096 to
32edf53
Compare
|
Rebased to #3691 and addressed comments |
|
needs a rebase to master, since #3691 is no more. |
|
Is this PR still waiting on anything? |
32edf53 to
fb97bb6
Compare
|
Nope, rebased to current master (the commit in master was still in here), squashed and adapted commit message |
|
Untested ACK. |
There was a problem hiding this comment.
Can GNRC_IPV6_NETIF_DEFAULT_MTU be greater than IPV6_MIN_MTU? RFC requires it must be less than IPV6_MIN_MTU https://tools.ietf.org/html/rfc4443#section-2.4
There was a problem hiding this comment.
The RFC refers to the minimum MTU as a minimum, so a packet MUST NOT be smaller than it. It is pretty common to have a bigger MTU: The MTU for Ethernet is typically 1500 (which is exactly the maximum packet size of Ethernet)
There was a problem hiding this comment.
It says "without making the error message packet exceed the minimum IPv6 MTU [IPv6]." Doesn't it means we should not exceed 1280 bytes?
There was a problem hiding this comment.
Sorry, my intent is that "it" in "RFC requires it must be less than ..." refers the return value of the _fit function. Very confusing sentence.
There was a problem hiding this comment.
Ah yes, the error message's size must not be greater than the minimum MTU. This implementation is older than the introduction of IPV6_MIN_MTU so it needs to be adapted, yes.
fb97bb6 to
d1cdee2
Compare
|
Generalized and centralized. |
d1cdee2 to
80198f1
Compare
|
I meant rebased and adapted to current master… |
c1e41eb to
27dc1b4
Compare
27dc1b4 to
70c3d29
Compare
|
Code was already acked, doesn't seem to break anything, and also should have no affects for other stuff. ACK and go! |
gnrc_icmpv6_error: initial import
Provides capabilities to build ICMPv6 error messages.