Lines Matching refs:server_addr
45 static struct sockaddr server_addr; in service() local
52 &((struct sockaddr_in6 *)&server_addr)->sin6_port); in service()
56 &((struct sockaddr_in *)&server_addr)->sin_port); in service()
65 net_sin6(&server_addr)->sin6_family = AF_INET6; in service()
66 net_sin6(&server_addr)->sin6_addr = in6addr_any; in service()
67 net_sin6(&server_addr)->sin6_port = sys_cpu_to_be16(DEFAULT_PORT); in service()
69 net_sin(&server_addr)->sin_family = AF_INET; in service()
70 net_sin(&server_addr)->sin_addr.s_addr = htonl(INADDR_ANY); in service()
71 net_sin(&server_addr)->sin_port = sys_cpu_to_be16(DEFAULT_PORT); in service()
76 r = socket(server_addr.sa_family, SOCK_STREAM, 0); in service()
85 r = bind(server_fd, &server_addr, sizeof(server_addr)); in service()
92 if (server_addr.sa_family == AF_INET6) { in service()
93 addrp = &net_sin6(&server_addr)->sin6_addr; in service()
94 portp = &net_sin6(&server_addr)->sin6_port; in service()
96 addrp = &net_sin(&server_addr)->sin_addr; in service()
97 portp = &net_sin(&server_addr)->sin_port; in service()
100 inet_ntop(server_addr.sa_family, addrp, addrstr, sizeof(addrstr)); in service()
121 inet_ntop(server_addr.sa_family, addrp, addrstr, sizeof(addrstr)); in service()