structsockaddr_in6servaddr;bzero(&servaddr,sizeof(servaddr));servaddr.sin6_family=AF_INET6;servaddr.sin6_port=htons(atoi(argv[2]));//Convert the IPv6 Address in the network representation
if(inet_pton(AF_INET6,argv[1],&servaddr.sin6_addr)<=0){perror("inet_pton");return-1;}charsendline[MAXLINE];if(fgets(sendline,MAXLINE,fp)!=NULL){if(sendto(sockfd,sendline,strlen(sendline),0,servaddr,sizeof(servaddr)<0){perror("sendto");return-1;}}