socket: can't find where is sockaddr

Status
Not open for further replies.

ravi.xolve

Broken In
*pastebin.com/m42b627b9
here when I compile it gcc gives the error "cannot convert to a pointer type" for line 24. I tried to find where struct sockaddr is defined but can't find. man pages say no thing about it.

Please help.
 

mehulved

18 Till I Die............
Try sys/socket.h file. It should have your struct socketaddr defined, line 218 as per the libraries I have got.
It looks something like
Code:
struct sockaddr {
	unsigned char	sa_len;		/* total length */
	sa_family_t	sa_family;	/* address family */
	char		sa_data[14];	/* actually longer; address value */
};
 
Status
Not open for further replies.
Top Bottom