![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Converting Binary decimal coded values to Ascii Values | gaur.deepti | UNIX for Advanced & Expert Users | 3 | 04-02-2008 09:33 AM |
| Socket Programming socket | soshell | High Level Programming | 2 | 06-29-2004 04:49 AM |
| currupted my hard drive | xcaliber | UNIX for Dummies Questions & Answers | 5 | 01-19-2004 08:27 AM |
| socket | mercutio | UNIX for Dummies Questions & Answers | 1 | 12-06-2001 12:43 PM |
| socket | amin | IP Networking | 1 | 02-10-2001 12:45 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
hi
I am using socket programming to transfer my header object form linux machine to unix machine. when i transfer the object at unix machine the long and int values are getting currupted . So i am getting gatbage values. but if i am doing this same task for linux to linux machine the same code is woking what could be the reason behind this grabage value . please help. Thankx : |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
the problem is due to Endianess. as one of the machine is linux therefore little-endian and other is AIX therefore big-endian. can you please explain ntohs function or suggest some sites. thankx |
|
|||
|
Dear Bhakti,
have you looked into the Beej's guide for network programing. he has explained very nicely. I just repeate the same for you. ntohs ==> 'n' -> network 'h' -> host 's' -> small So you can have other combinations also like ntohl, htons to name a few. I think now you can figure out what ntol must be doing. regards Apoorva Kumar |
|||
| Google The UNIX and Linux Forums |