- Timestamp:
- Jun 8, 2009 9:29:06 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r20379 r20388 1866 1866 } while (0) 1867 1867 1868 /* don't allow user set negativeand more than 1M values */1869 #define _ 1M_CHECK_ARG(name, val) CHECK_ARG(name, (val), 0, 1024)1868 /* don't allow user set less 8kB and more than 1M values */ 1869 #define _8K_1M_CHECK_ARG(name, val) CHECK_ARG(name, (val), 8, 1024) 1870 1870 void slirp_set_rcvbuf(PNATState pData, int kilobytes) 1871 1871 { 1872 _ 1M_CHECK_ARG("SOCKET_RCVBUF", kilobytes);1872 _8K_1M_CHECK_ARG("SOCKET_RCVBUF", kilobytes); 1873 1873 pData->socket_rcv = kilobytes; 1874 1874 } 1875 1875 void slirp_set_sndbuf(PNATState pData, int kilobytes) 1876 1876 { 1877 _ 1M_CHECK_ARG("SOCKET_SNDBUF", kilobytes);1877 _8K_1M_CHECK_ARG("SOCKET_SNDBUF", kilobytes); 1878 1878 pData->socket_snd = kilobytes * _1K; 1879 1879 } 1880 1880 void slirp_set_tcp_rcvspace(PNATState pData, int kilobytes) 1881 1881 { 1882 _ 1M_CHECK_ARG("TCP_RCVSPACE", kilobytes);1882 _8K_1M_CHECK_ARG("TCP_RCVSPACE", kilobytes); 1883 1883 tcp_rcvspace = kilobytes * _1K; 1884 1884 } 1885 1885 void slirp_set_tcp_sndspace(PNATState pData, int kilobytes) 1886 1886 { 1887 _ 1M_CHECK_ARG("TCP_SNDSPACE", kilobytes);1887 _8K_1M_CHECK_ARG("TCP_SNDSPACE", kilobytes); 1888 1888 tcp_sndspace = kilobytes * _1K; 1889 1889 }
Note:
See TracChangeset
for help on using the changeset viewer.