Lines Matching defs:ip
105 static int init_client_ip(int *sock,unsigned char ip[4], int port, int type);
107 static int init_server_long(int *sock, int port,char *ip, int type);
109 static int host_ip(char *str, unsigned char ip[4]);
239 unsigned char ip[4];
241 memset(ip, '\0', sizeof ip);
242 if (!host_ip(host,&(ip[0])))
244 return init_client_ip(sock,ip,port,type);
247 static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
259 ((unsigned long)ip[0]<<24L)|
260 ((unsigned long)ip[1]<<16L)|
261 ((unsigned long)ip[2]<< 8L)|
262 ((unsigned long)ip[3]);
325 static int init_server_long(int *sock, int port, char *ip, int type)
336 if (ip == NULL)
341 memcpy(&server.sin_addr.s_addr,ip,4);
343 memcpy(&server.sin_addr,ip,4);
474 int extract_host_port(char *str, char **host_ptr, unsigned char *ip,
488 if ((ip != NULL) && !host_ip(str,ip))
499 static int host_ip(char *str, unsigned char ip[4])
509 BIO_printf(bio_err,"invalid IP address\n");
512 ip[0]=in[0];
513 ip[1]=in[1];
514 ip[2]=in[2];
515 ip[3]=in[3];
535 ip[0]=he->h_addr_list[0][0];
536 ip[1]=he->h_addr_list[0][1];
537 ip[2]=he->h_addr_list[0][2];
538 ip[3]=he->h_addr_list[0][3];