![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unix to LINUX | Kuz972 | UNIX for Dummies Questions & Answers | 0 | 09-22-2005 05:44 AM |
| Unix, Linux etc | Kynaeus | UNIX for Dummies Questions & Answers | 2 | 10-04-2004 04:26 PM |
| What is unix and is linux a unix system | Perderabo | Answers to Frequently Asked Questions | 0 | 03-13-2004 09:22 PM |
| which is better, Unix or Linux | warmth | High Level Programming | 1 | 07-20-2001 11:48 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
'int' Unix to Linux!! Help!!
Hi!
I'm having some troubles to make a Unix system communicate with a Linux system, because the LSB and MSB of an 'int' is inverted in each other. I can't use a Algorithm for Bit Reversal, because I would have to change a lot of the services that I use im my application. Is there any way to change the LSB and MSB of the 'int' inside of Linux? Sorry for my english mistakes, and sorry for may newbie explication. This is the first time that I'm using Linux this way. |
|
||||
|
You mean you can't change the code, and want the system to somehow understand the layout of your packets and adjust it for you? That's not too likely since the system doesn't understand what layout of data you have, only your application.. you wouldn't want it to swap bytes in strings, for instance. If you can modify the code, see 'man htonl'. It would be safe to use it on both systems since it only reverses on systems where appropriate to do so.
A few processors like the G series can partially change whether they're LSB or MSB, but the emulation is imperfect and system-wide, you'd need a whole new operating system. (and of course a G3/4/5/POWER computer.) This isn't a UNIX vs Linux thing, by the way. Linux can be found on MSB and LSB systems alike, it's the architecture its running under that's MSB or LSB. Last edited by Corona688; 09-18-2009 at 05:30 PM.. |
![]() |
| Bookmarks |
| Tags |
| int, linux, lsb, msb |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|