Lines Matching refs:ip
99 static int init_client_ip(int *sock,unsigned char ip[4], int port, int type);
101 static int init_server_long(int *sock, int port,char *ip, int type);
103 static int host_ip(char *str, unsigned char ip[4]);
233 unsigned char ip[4];
236 if (!host_ip(host,&(ip[0])))
241 return(init_client_ip(sock,ip,port,type));
244 static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
256 ((unsigned long)ip[0]<<24L)|
257 ((unsigned long)ip[1]<<16L)|
258 ((unsigned long)ip[2]<< 8L)|
259 ((unsigned long)ip[3]);
322 static int init_server_long(int *sock, int port, char *ip, int type)
333 if (ip == NULL)
338 memcpy(&server.sin_addr.s_addr,ip,4);
340 memcpy(&server.sin_addr,ip,4);
472 int extract_host_port(char *str, char **host_ptr, unsigned char *ip,
486 if ((ip != NULL) && !host_ip(str,ip))
497 static int host_ip(char *str, unsigned char ip[4])
510 ip[0]=in[0];
511 ip[1]=in[1];
512 ip[2]=in[2];
513 ip[3]=in[3];
533 ip[0]=he->h_addr_list[0][0];
534 ip[1]=he->h_addr_list[0][1];
535 ip[2]=he->h_addr_list[0][2];
536 ip[3]=he->h_addr_list[0][3];