Sponsored Content
Operating Systems Solaris Solaris 5.8 - BinaryFile - Endianness Post 302349905 by jlliagre on Wednesday 2nd of September 2009 07:51:32 AM
Old 09-02-2009
Not only the data would be garbage but also the offset if not hardcoded.

You didn't tell you had the parser source code. In that case, you need to modify that code for it to be able to correctly parse the data. You can use the htonl family of macros on the x86 machine to convert from network (big endian) to host (little endian) order.

Last edited by jlliagre; 09-06-2009 at 04:47 AM.. Reason: typo
 

5 More Discussions You Might Find Interesting

1. Solaris

application compiled on solaris 10 throwing error when executed on solaris 9

I have compiled my application on Solaris 10 with following description SunOS ldg1 5.10 Generic_138888-03 sun4v sparc SUNW,Sun-Blade-T6320 The compiler is Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25 But when installing the application on Solaris 9 SunOS odcarch02 5.9... (2 Replies)
Discussion started by: ash_bit2k2
2 Replies

2. Solaris

Unable to login using ssh,telnet onto my solaris machine with solaris 10 installed

Hi, I am unable to login into my terminal hosting Solaris 10 and get the below error message "Server refused to allocate pty ld.so.1: sh: fatal: libc.so.1: open failed: No such file or directory " Is there anyways i can get into my machine and what kind of changes are required to be... (7 Replies)
Discussion started by: sankasu
7 Replies

3. UNIX for Advanced & Expert Users

How to know endianness of a machine

hi I have a ubuntu machine and want to know the endianness of the system.... How would i get to know..... The information of my machine is: uname -a 42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 201 1 i686 i686 i386 GNU/Linux and lsb_release -a No LSB modules are available.... (6 Replies)
Discussion started by: Ankita Singlaa
6 Replies

4. Solaris

How to add Solaris text console to Solaris grub2 menu?

Hi, I am new to sloaris and just instlled the solaris 11.2, i know little more about linux, i open the /boot/grub/grub.cfg in solaris and there is many other entries forl solaris 11.2 one of them is for 'Oracle Solaris 11.2 text console' but at boot grub2 only show the first default entry that... (1 Reply)
Discussion started by: shamsat
1 Replies

5. AIX

IBM TDS/SDS (LDAP) - can I mix endianness among servers in an instance ?

I'd like to add some x/linux-based servers to my current AIX-based TDS/SDS server community. Reading the Fine Install Guide (rtfig ?) I believe this may be covered by the section "Upgrade an instance of a previous version to a different computer" i.e. I'm going to install latest/greatest SDS on a... (4 Replies)
Discussion started by: maraixadm
4 Replies
BYTEORDER(3)						   BSD Library Functions Manual 					      BYTEORDER(3)

NAME
htonl, htons, ntohl, ntohs -- convert values between host and network byte order LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <arpa/inet.h> uint32_t htonl(uint32_t hostlong); uint16_t htons(uint16_t hostshort); uint32_t ntohl(uint32_t netlong); uint16_t ntohs(uint16_t netshort); DESCRIPTION
These routines convert 16 and 32 bit quantities between network byte order and host byte order. (Network byte order is big endian, or most significant byte first.) On machines which have a byte order which is the same as the network order, routines are defined as null macros. These routines are most often used in conjunction with Internet addresses and ports as returned by gethostbyname(3) and getservent(3). SEE ALSO
gethostbyname(3), getservent(3) STANDARDS
The byteorder functions are expected to conform with IEEE Std POSIX.1-200x (``POSIX.1''). HISTORY
The byteorder functions appeared in 4.2BSD. BUGS
On the VAX bytes are handled backwards from most everyone else in the world. This is not expected to be fixed in the near future. BSD
June 4, 1993 BSD
All times are GMT -4. The time now is 02:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy