Skip to content

Conversation

@miri64
Copy link
Member

@miri64 miri64 commented Feb 8, 2014

I think we don't need that ZEP implementation ;-)

@miri64
Copy link
Member Author

miri64 commented Feb 8, 2014

Discussion: maybe a next_header field in struct nativenet_header would be a good idea now.

@mehlis
Copy link
Contributor

mehlis commented Feb 8, 2014

I still prefer #163 but let's discuss this

@miri64
Copy link
Member Author

miri64 commented Feb 8, 2014

Do we want to add for every protocol we want to support in the future an extra native RIOT layer, then? I think an extra field in the nativenet_header is a lot simpler (in riot.lua this would just be a number of if-statements depending on that new field) + nativenet can identify the next header itself and marshal it to the corresponding layer accordingly.

@LudwigKnuepfer
Copy link
Member

I also think there is something to be gained from the zep implementation. That's a different matter though. I'm looking forward to merging this PR if it does what I think it does =)

@mehlis
Copy link
Contributor

mehlis commented Feb 8, 2014

@LudwigOrtmann with the zep header we get rid of any "native net header", right? so we don't need to have any changes on wireshar/tcpdump?

@LudwigKnuepfer
Copy link
Member

zep is intended to be an option for nativenet, not a replacement for the current implementation. It does not only change the header format but also other properties of the network layer (maximum size).

@mehlis
Copy link
Contributor

mehlis commented Feb 9, 2014

@LudwigOrtmann I see, so we will need both, a parser for "native net packets" and the zep encapsulation. they go hand in hand.

@OlegHahm
Copy link
Member

OlegHahm commented Feb 9, 2014

One advantage of providing ZEP headers would be that one could just use Wireshark as is without installing an additional dissector. However, that could be additive.

@mehlis
Copy link
Contributor

mehlis commented Feb 9, 2014

could install the dissector, with sixlowpan as next header I get "Malformed Packet: IPv6" with lua Error in line 37.

RIOT, 6lowpan are dissected correctly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of them is source

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@miri64
Copy link
Member Author

miri64 commented Feb 9, 2014

could install the dissector, with sixlowpan as next header I get "Malformed Packet: IPv6" with lua Error in line 37.

@mehlis It's just a parser. If you don't provide 6LoWPAN content directly after the RIOT header (I guess you did not change much of the of the network stacks code, which currently yields IEEE 802.15.4 packages on native) it will of course fail ;-).

But: Another problem I have realized is, that since IEEE 802.15.4 has its frame length in the PHY header (directly before the MAC header which is provided here), wireshark does not get the length of the frame and won't for that reason (I guess) parse the 6LoWPAN header. The optimal result would look somewhat like this (http://cloudshark.org/captures/18efd3ef7114) but with this dissector it stops after the IEEE 802.15.4 header.

@OlegHahm: the "installation" is just an addition of 2 lines in wireshark's config ;-), but with the problem stated above I see why we might need a ZEP layer (though I don't know if it is necessary to send it via UDP).

@mehlis
Copy link
Contributor

mehlis commented Feb 9, 2014

@authmillenon I see, because of using 15.4 results in less output I assumed, that sixlowpan is the right next layer:)

@miri64
Copy link
Member Author

miri64 commented Feb 9, 2014

But: Another problem I have realized is, that since IEEE 802.15.4 has its frame length in the PHY header (directly before the MAC header which is provided here), wireshark does not get the length of the frame and won't for that reason (I guess) parse the 6LoWPAN header. The optimal result would look somewhat like this (http://cloudshark.org/captures/18efd3ef7114) but with this dissector it stops after the IEEE 802.15.4 header.

okay nope, it's because the IEEE 802.15.4 checksum is calculated wrong (in the current implementation not at all, but set to a constant value).

@miri64
Copy link
Member Author

miri64 commented Feb 9, 2014

Fixed it (see #644)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you put this stuff in $HOME/.wireshark/preferences? There are people who are working on multi user systems....

@OlegHahm
Copy link
Member

ACK

@mehlis
Copy link
Contributor

mehlis commented Feb 16, 2014

successfully tested, ACK, GO

mehlis pushed a commit that referenced this pull request Feb 16, 2014
Add wireshark dissector for native packets
@mehlis mehlis merged commit 4a3d8cd into RIOT-OS:master Feb 16, 2014
@miri64 miri64 deleted the wireshark-dissector branch February 19, 2014 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Platform: native Platform: This PR/issue effects the native platform 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