Lines Matching refs:serveraddr
35 struct sockaddr_in serveraddr; in main() local
39 memset(&serveraddr, 0, sizeof(serveraddr)); in main()
40 serveraddr.sin_family = AF_INET; in main()
41 serveraddr.sin_addr.s_addr = htonl(INADDR_ANY); in main()
42 serveraddr.sin_port = 0; in main()
44 bind(sockfd, (struct sockaddr *)&serveraddr, sizeof(serveraddr)); in main()
45 socklen_t addrlen = sizeof(serveraddr); in main()
46 getsockname(sockfd, (struct sockaddr *)&serveraddr, &addrlen); in main()
55 msg.msg_name = &serveraddr; in main()
65 ret = connect(sockfd, (struct sockaddr *)&serveraddr, addrlen); in main()
72 sendto(sockfd, buf, kBufSize, 0, (struct sockaddr *)&serveraddr, addrlen); in main()