newbie: segmentation fault

kamal kc rosey_kc at yahoo.com
Fri Jul 2 02:07:07 PDT 2004


first of all thanks for solving my previous problem.
my previous problem was about the ip and ethernet header.
this is how i solved it:
--------
char *sender,*dest;
char *ptr;
struct ether_header eth;
ptr=pcap_next(..);
sender=ether_ntoa(ether->s_host);
printf("%s", sender);
dest=ether_ntoa(ether->d_host);
printf("%s",dest);
-------------------------------------------------------------------------
The above code did the trick.

NOW i face a bizarre problem;
when i write the following piece of code it successfully gets compiled but generates 
segmentation fault when run.
----
struct sockaddr_in *sock;
sock->sin_family=AF_INET;
/* rest of the code */
------
And i also don't know much about the segmentation fault error message. 
By the way can i know about it in the man pages. if there are any please mention.
Kamal

		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!


More information about the freebsd-net mailing list