ng_net: header building facilities#2575
Conversation
There was a problem hiding this comment.
s/network interface/network layer/ ? But what does "generic" mean in this context?
There was a problem hiding this comment.
No this is correct. This module (ng_netif_hdr) defines the "generic network interface header". This name was introduced after @OlegHahm was not happy with the name "generic link layer header" ;-)
There was a problem hiding this comment.
I'm confused. I thought this was meant to implement (in a IMO weird way) IPv6 upper layer checksum calculation. Why do one need to build a generic network interface header?
There was a problem hiding this comment.
No that's in #2553. This just offers netif_hdr_init() and pktbuf_add() in one go.
|
Sorry, I guess I asked this a 100 times before, but I'm confused again why an upper layer wants to build a lower layer's header? |
|
Use-case: IPv6 wants to send packet.
|
|
Why not just the address? Because in the rest of the model we use the header for exactly the same reason as I sketched out previously: The upper-layer might want to set additional information (hop-limit, traffic class, etc. you name it). |
But this would require an additional function, right? Why can I do this not just with a set_opt command? |
|
Because this requires additional context switches. And no it would not need additional functions. Once you've build the header, you know the type of the header anyways, so if you need to, you can just change the fields after the creation. This functions are primarily for service functions for layers that DON'T need to know the build-up of a lower-layer header. |
6881f2e to
d6b7e38
Compare
|
Rebased to current master |
sys/include/net/ng_netreg.h
Outdated
There was a problem hiding this comment.
nitpick: I find this sentence a bit hard to parse. Maybe the “for sending” could be left out?
There was a problem hiding this comment.
No, since a receiving packet would store the payload differently.
There was a problem hiding this comment.
Oh. Then maybe we could split it up into two sentences or something?
There was a problem hiding this comment.
"Builds a header for sending and adds it to the packet buffer" would also work, I think. That the protocol is defined through type is apparent through the type parameter I think.
|
Simplified doc a little. |
3dad5a1 to
c547d93
Compare
|
Needed to add #2706 as a depenency since Travis is taking forever -.- |
c547d93 to
9674697
Compare
|
Awww come on Travis! |
|
The last successful Travis run is two and a half days old. I think we've killed that poor fellow. |
|
I'll sponsor a dedicated server if anyone fancies setting up Janky (or Jenkins) on it! Travis is a nighmare |
|
@saurabh984 we're (or rather @phiros is) working on a solution. We had Jenkins in the past. This was also no solution, since someone(TM) needs to manage that machine and nobody got time for that. |
|
It's probably gonna be build bot. |
|
But thanks for the offer |
|
Fixed thingie |
|
Moved author tag. |
|
Apart from the squash and PR dependency warning and an aborted (and now restarted) build in the msp430 group travis seems to be fine. Squash? |
|
Yes please! |
44e0eb1 to
5ae0325
Compare
|
Done |
|
👍 Okay... Let's do this! ACK & Go. |
|
Correction: ACK, wait for Travis & go. I'll keep this tab open. |
5ae0325 to
1ea70be
Compare
|
Ahhh sorry… I needed to change something for constistency: |
|
:D good catch! Tab is still open, will merge as soon as Travis is happy. |
|
I would like to put this topic on the list for the next NSTF meeting. I'm not nacking this, but am still not convinced of this approach. |
|
@OlegHahm can you point me to the problem with this approach? |
ng_net: header building facilities
|
No, I just still don't like upper layers building lower layers' headers. But it's so far more like a gut feeling. |
This was taken out of #2553
The idea is that an upper-layer can build a header for the layer it wants to send data over without knowledge about the actual structure of the header. I also added a convinience function of similar format to
ng_netif_hdr.Depends on #2706(merged)