Thread View: comp.unix.sys5.r4
1 messages
1 total messages
Started by Chuah Chin Ek
Sun, 05 Nov 1995 15:39
How to bind sockets in Solaris (correction)
Author: Chuah Chin Ek
Date: Sun, 05 Nov 1995 15:39
Date: Sun, 05 Nov 1995 15:39
41 lines
2171 bytes
2171 bytes
Hi there
Sorry I posted the earlier msg accidentally.
I'm trying to compile a C program written for Aix in my Solaris 2.4
environment.But it seems that the bind in Solaris does not recognise the
socket address structures as defined in AIX .
The socketaddr structure in AIX looks like this :
struct sockaddr {
u_char sa_len; /*total length */
u_char sa_family; /*address family */
char sa_data[14]; /* actually longer,address value */
In the program for AIX , the following decalaration is made :
int ls_socket ; /* FD for listening socket */
struct sockaddr_in ls_addr /*Name for listening socket */
int cl_socket; /*FD for client (call) socket */
struct sockaddr_in cl_addr; /* Address for client socket */
The bind statement used in the AIX is
bind (ls_socket, &ls_addr , mynamelen)
So can anyone who's familiar with sockets in Solaris pls help . I'm really in
a fix since the program is written by someone who's no longer with my company.
What I need to know is how to define the socket address structures in Solaris
so that it will be recognised by its BIND command .
I did a grep in my system for sockaddr and it is found in the resolv.h and the
in.h file,but even with these 2 files included in the program there are still
errors in the compile. The error that I get in the compile looks like this :
warning : argument #2 is incompatible with prototype:
prototype : pointer to struct sockaddr {ushort sa_family,arrar[14] of char
sa_data} : "/usr/include/sys/socket.h" , line 295
Please reply via email to me as I do not log into the News often,thanks.
Chin-Ek
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads