sctp_bindx (Solaris sctp library) always return “Invalid argument”
问题 I am writing a SCTP test program in Solaris OS, and use Solaris native SCTP stack. The program likes this: if ((fd = socket(AF_INET, SOCK_SEQPACKET, IPPROTO_SCTP)) < 0) { perror("socket"); } addr.sin_family = AF_INET; addr.sin_port = htons(9004); addr.sin_addr.s_addr = inet_addr("192.168.23.117"); if (sctp_bindx(fd, (struct sockaddr*)&addr, sizeof(struct sockaddr_in), SCTP_BINDX_ADD_ADDR) < 0) { perror("bind"); } When running the program, it always return error:"Invalid argument". I have used