Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 838827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:22:04+00:00 2026-05-15T05:22:04+00:00

I am writing a Wireshark dissector plugin for a protocol that does not hton

  • 0

I am writing a Wireshark dissector plugin for a protocol that does not hton it’s data, and I need to extract a 64-bit data value without doing any endian conversions.

Is there a version of tvb_get_ntoh64 included in the Wireshark libraries that does not do the ntoh?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:22:05+00:00Added an answer on May 15, 2026 at 5:22 am

    I found the answer to my own question. The wireshark document \wireshark\doc\README.developer addresses this:

    Don’t fetch a little-endian value
    using “tvb_get_ntohs() or
    “tvb_get_ntohl()” and then using
    “g_ntohs()”, “g_htons()”, “g_ntohl()”,
    or “g_htonl()” on the resulting value
    – the g_ routines in question convert between network byte order
    (big-endian) and host byte order,
    not little-endian byte order; not
    all machines on which Wireshark runs
    are little-endian, even though PCs
    are. Fetch those values using
    “tvb_get_letohs()” and
    “tvb_get_letohl()”.

    In looking in tvbuff.h, I see there are other flavors as well:

    extern guint16 tvb_get_letohs(tvbuff_t*, const gint offset);
    extern guint32 tvb_get_letoh24(tvbuff_t*, const gint offset);
    extern guint32 tvb_get_letohl(tvbuff_t*, const gint offset);
    extern guint64 tvb_get_letoh64(tvbuff_t*, const gint offset);
    

    Posting so that people asking this question in the future will be able to find the answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in the middle of writing a Wireshark dissector for a custom protocol. However,
Writing a JSP page, what exactly does the <c:out> do? I've noticed that the
Writing my first silverlight application. I need to deliver some bitmap that the customer
I writing a report in Visual Studio that takes a user input parameter and
I'am writing a HTTP proxy that is part of a test/verification system. The proxy
I need GUI control for audio file presentation. The language is not very important
I´m writing an application for Android in which I have a character that I
When writing an Excel formula, does it make a difference whether you set a
Writing a Jabber client that uses Twisted Words. I would like to know an
Writing a PHP app and have several classes that only have static methods (no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.