version 1.21, 2015/10/10 11:29:46 |
version 1.22, 2020/10/06 11:33:47 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/plugin/sm1Socket.c,v 1.20 2005/07/03 11:08:54 ohara Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/plugin/sm1Socket.c,v 1.21 2015/10/10 11:29:46 takayama Exp $ */ |
/* msg0s.c */ |
/* msg0s.c */ |
#include <stdio.h> |
#include <stdio.h> |
#include <string.h> |
#include <string.h> |
|
|
#include <netdb.h> |
#include <netdb.h> |
#include <errno.h> |
#include <errno.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
#include <unistd.h> |
|
|
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
Line 148 struct object KsocketConnect(struct object obj) { |
|
Line 149 struct object KsocketConnect(struct object obj) { |
|
perror("socket"); errorMsg1s("socket allocation is failed.\n"); |
perror("socket"); errorMsg1s("socket allocation is failed.\n"); |
} |
} |
if (!Quiet) { |
if (!Quiet) { |
fprintf(stderr,"Trying to connect port %d, ip=%x\n",ntohs(server.sin_port),server.sin_addr); |
fprintf(stderr,"Trying to connect port %d, ip=%lx\n",ntohs(server.sin_port),(long) server.sin_addr.s_addr); |
} |
} |
if (connect(socketid,(struct sockaddr *)&server,sizeof(server)) == -1) { |
if (connect(socketid,(struct sockaddr *)&server,sizeof(server)) == -1) { |
perror("connect"); errorMsg1s("cannot connect"); |
perror("connect"); errorMsg1s("cannot connect"); |