- Timestamp:
- Jun 16, 2010 1:48:47 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/lwip/src/api/sockets.c
r17797 r30220 34 34 35 35 #include <string.h> 36 #include <errno.h> 36 #ifndef _MSC_VER /* Why is errno.h included here - see lwip/arch.h -> lwip/cc.h */ 37 # include <errno.h> 38 #endif 37 39 38 40 #include "lwip/opt.h" … … 97 99 #ifdef ERRNO 98 100 #define set_errno(err) errno = (err) 101 # ifdef _MSC_VER 102 # error "Curious bird: Where is ERRNO defined for MSC?" 103 # endif 99 104 #else 100 105 #define set_errno(err) … … 984 989 /* Do length and type checks for the various options first, to keep it readable. */ 985 990 switch( level ) { 986 991 987 992 /* Level: SOL_SOCKET */ 988 993 case SOL_SOCKET: 989 994 switch(optname) { 990 995 991 996 case SO_ACCEPTCONN: 992 997 case SO_BROADCAST: … … 1016 1021 } /* switch */ 1017 1022 break; 1018 1023 1019 1024 /* Level: IPPROTO_IP */ 1020 1025 case IPPROTO_IP: … … 1035 1040 } /* switch */ 1036 1041 break; 1037 1042 1038 1043 /* Level: IPPROTO_TCP */ 1039 1044 case IPPROTO_TCP: … … 1042 1047 break; 1043 1048 } 1044 1049 1045 1050 /* If this is no TCP socket, ignore any options. */ 1046 1051 if ( sock->conn->type != NETCONN_TCP ) return 0; … … 1050 1055 case TCP_KEEPALIVE: 1051 1056 break; 1052 1057 1053 1058 default: 1054 1059 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_TCP, UNIMPL: optname=0x%x, ..)\n", s, optname)); … … 1063 1068 } /* switch */ 1064 1069 1065 1070 1066 1071 if( 0 != err ) { 1067 1072 sock_set_errno(sock, err); 1068 1073 return -1; 1069 1074 } 1070 1075 1071 1076 1072 1077 … … 1074 1079 1075 1080 switch(level) { 1076 1081 1077 1082 /* Level: SOL_SOCKET */ 1078 1083 case SOL_SOCKET: … … 1243 1248 break; 1244 1249 1245 /* UNDEFINED LEVEL */ 1250 /* UNDEFINED LEVEL */ 1246 1251 default: 1247 1252 LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, level=0x%x, UNIMPL: optname=0x%x, ..)\n", s, level, optname));
Note:
See TracChangeset
for help on using the changeset viewer.