Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jul 2004 02:05:40 -0700 (PDT)
From:      kamal kc <rosey_kc@yahoo.com>
To:        freebsd-net@freebsd.org
Subject:   newbie: segmentation fault
Message-ID:  <20040702090540.990.qmail@web13010.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
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!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040702090540.990.qmail>