Changeset 20297 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jun 5, 2009 5:38:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/socket.c
r19839 r20297 691 691 socklen_t addrlen = sizeof(addr); 692 692 int s, opt = 1; 693 int status; 693 694 694 695 DEBUG_CALL("solisten"); … … 756 757 return NULL; 757 758 } 759 fd_nonblock(s); 758 760 setsockopt(s, SOL_SOCKET, SO_OOBINLINE,(char *)&opt, sizeof(int)); 759 761 760 762 getsockname(s,(struct sockaddr *)&addr,&addrlen); 761 763 so->so_fport = addr.sin_port; 764 /* set socket buffers */ 765 opt = 64 * _1K; 766 status = setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, sizeof(int)); 767 if (status < 0) 768 { 769 LogRel(("NAT: Error(%d) while setting RCV capacity to (%d)\n", errno, opt)); 770 goto no_sockopt; 771 } 772 opt = 64 * _1K; 773 status = setsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *)&opt, sizeof(int)); 774 if (status < 0) 775 { 776 LogRel(("NAT: Error(%d) while setting SND capacity to (%d)\n", errno, opt)); 777 goto no_sockopt; 778 } 779 no_sockopt: 762 780 if (addr.sin_addr.s_addr == 0 || addr.sin_addr.s_addr == loopback_addr.s_addr) 763 781 so->so_faddr = alias_addr;
Note:
See TracChangeset
for help on using the changeset viewer.