Ignore:
Timestamp:
Oct 10, 2001, 4:41:22 PM (24 years ago)
Author:
sandervl
Message:

added more IPPROTO_IP options (setsockopt)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wsock32/wsock32.cpp

    r6253 r6983  
    1 /* $Id: wsock32.cpp,v 1.37 2001-07-08 15:44:27 achimha Exp $ */
     1/* $Id: wsock32.cpp,v 1.38 2001-10-10 14:41:22 sandervl Exp $ */
    22
    33/*
     
    796796                nrexcept += exceptfds->fd_count;
    797797        }
     798#if 0
    798799        if(nrread + nrwrite + nrexcept  == 0) {
     800                dprintf(("ERROR: nrread + nrwrite + nrexcept  == 0"));
    799801                WSASetLastError(WSAEINVAL);
    800802                return SOCKET_ERROR;
    801803        }
     804#endif
    802805        if(timeout != NULL && (timeout->tv_sec < 0 || timeout->tv_usec < 0)) {
     806                dprintf(("ERROR: timeout->tv_sec < 0 || timeout->tv_usec < 0"));
    803807                WSASetLastError(WSAEINVAL);
    804808                return SOCKET_ERROR;
     
    10181022               break;
    10191023           }
     1024
     1025           case IP_ADD_MEMBERSHIP:
     1026           case IP_DROP_MEMBERSHIP:
     1027               if (optlen < sizeof(struct ip_mreq))
     1028               {
     1029                   dprintf(("IPPROTO_IP, IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP, optlen too small"));
     1030                   WSASetLastError(WSAEFAULT);
     1031                   return SOCKET_ERROR;
     1032               }
     1033               ret = setsockopt(s, level, optname, (char *)optval, optlen);
     1034               break;
     1035
     1036           case IP_MULTICAST_LOOP:
     1037           case IP_MULTICAST_TTL:
     1038               if (optlen < sizeof(u_char))
     1039               {
     1040                   dprintf(("IPPROTO_IP, IP_MULTICAST_LOOP/IP_MULTICAST_TTL, optlen too small"));
     1041                   WSASetLastError(WSAEFAULT);
     1042                   return SOCKET_ERROR;
     1043               }
     1044               ret = setsockopt(s, level, optname, (char *)optval, optlen);
     1045               break;
    10201046
    10211047           default:
Note: See TracChangeset for help on using the changeset viewer.