Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    doubt on __be32 and __be16

    Hello All,

    I am a newbie linux kernel developer and excuse me if my question look really stupid

    I am trying to implement a NAT module in netfilter (nothing fancy, a very simple and primitive version, just to learn)..

    One thing I don't understand is how to convert my integer (ip) and short (for port) to and from __be32 and __be16?

    can someone help me with understanding of how __be32 and __be16 data type works? Thanks a lot.

  2. #2
    I just realized the simple way to do it.. I just have to use ntohs and htons() for port..! sorry to bother u all...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts