![]() |
|
|
|||||||
| Home | Forums | Register | Rules & FAQ | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here! |
Other UNIX.COM Threads You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Segmentation Fault | monika | UNIX for Dummies Questions & Answers | 5 | 05-30-2008 01:30 AM |
| Segmentation fault | big123456 | Linux | 0 | 07-20-2007 02:01 AM |
| segmentation fault | rockgal | High Level Programming | 8 | 12-05-2006 08:16 AM |
| Segmentation fault | jshaulis | AIX | 1 | 06-01-2004 01:16 PM |
| segmentation fault | omran | High Level Programming | 2 | 08-01-2003 05:19 AM |
![]() |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
segmentation fault in socket application
helo,
i m using linux operationg system at both client and server side. Now in my application when i use ntohl() then it will give segmentation fault. now when i remove nothl(), then it works fine. can u tell me why this happen. amit |
| Forum Sponsor | ||
|
|
|
|||
|
helo my code is given below
static HeadderFun* listheader_ntoh(HeadderFun* lh) { lh->head_len = ntohl(lh->cl_head_len); lh->record_len = ntohl(lh->cl_record_len); lh->linecnt = ntohl(lh->cl_linecnt); return lh; } now when i use ntohl() in the above code, i got segmentation fault. when i remove it, application work fine. can u tell me whats root cause of segmentation fault . amit |