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

Change Endianness (question) #64

Open
bucweat opened this issue Jul 6, 2018 · 4 comments
Open

Change Endianness (question) #64

bucweat opened this issue Jul 6, 2018 · 4 comments

Comments

@bucweat
Copy link

bucweat commented Jul 6, 2018

I’m parsing PCAP files...PCAP headers are little endian however Ethernet/IP/TCP and payload in most cases are big endian. Is it possible to switch endianness while parsing a given type in a typeset?

@RReverser
Copy link
Member

Yes, absolutely, this is covered in docs as far as I remember.

@bucweat
Copy link
Author

bucweat commented Jul 6, 2018

Assuming you are talking about the wiki. Endianness is mentioned when defining typeset. Can this be used in a template?

@RReverser
Copy link
Member

I don't think it is, but note that typeset config just changes the default endianness; instead, you can pass it on field-by-field basis as type param by using ['uint16', true] for explicit little-endian and false for big-endian.

@bucweat
Copy link
Author

bucweat commented Jul 9, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants