shankarramv
New User
Joined: 20 Nov 2007 Posts: 5 Location: India
|
|
|
|
hi
i have been assigned to a new proj in c. its abt SSL programming. but i tried creating a socket but couldnt even create one. the following is the source code followed by JCL and the output i got. thanks in advance.please do tell me where i am wrong.
#include<stdio.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<arpa/inet.h>
#include<netinet/in.h>
#include<netdb.h>
#include<errno.h>
void main()
{
int s;
struct sockaddr_in servaddr;
int portno=6000;
s=socket(2,1,0);
perror("hi:");
printf("%d",errno);
printf("%d",s);
exit(0);
}
Code: |
//STEP1 EXEC EDCCLG,INFILE=H181345.TEST.C(S)
//COMPILE.SYSLIB DD DSN=CEE.SCEEH.SYS.H,DISP=SHR
// DD DSN=CEE.SCEEH.ARPA.H,DISP=SHR
// DD DSN=CEE.SCEEH.H,DISP=SHR
// DD DSN=CEE.SCEEH.NETINET.H,DISP=SHR
//COMPILE.USERLIB DD DSN=H181345.TEST.H,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
|
hi:: EDC5156I Process initialization error.
******************************** BOTTOM OF DATA ** |
|