Changeset 47947 in vbox for trunk/src/VBox
- Timestamp:
- Aug 21, 2013 8:10:55 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/lwip-new/vbox/winutils.h
r47886 r47947 36 36 # define inet_ntop(dom, pvaddr, pstrbuf, cbstrbuf) InetNtop((dom),(pvaddr),(pstrbuf),(cbstrbuf)) 37 37 38 /** 39 * inet_pton(3) returns 1 on success (network address was successfully 40 * converted). 0 is returned if src does not contain a character string 41 * representing a valid network address in the specified address family. 42 * If af does not contain a valid address family, -1 is returned and 43 * errno is set to EAFNOSUPPORT(value 97). 44 * WSA has value most close in our case 45 * http://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx#WSAEAFNOSUPPORT (10047) 46 */ 38 47 DECLINLINE(int) inet_pton(int af_family, const char *str, void *dst) 39 48 { 40 AssertPtrReturn(str, -1);41 AssertPtrReturn(dst, -1);49 AssertPtrReturn(str, 0); 50 AssertPtrReturn(dst, 0); 42 51 43 52 switch (af_family) { … … 56 65 memcpy(dst, &a6, sizeof(RTNETADDRIPV6)); 57 66 #else 58 /* RTNetStrToIPv6Addr isn't implemented yet. */ 67 /* XXX: RTNetStrToIPv6Addr isn't implemented yet. */ 68 WSASetLastError(WSAEAFNOSUPPORT); 59 69 return -1; 60 70 #endif … … 62 72 } 63 73 default: 74 WSASetLastError(WSAEAFNOSUPPORT); 64 75 AssertMsgFailedReturn(("Unsupported internet family"), -1); 65 76 } 66 return 0;77 return 1; 67 78 } 68 79
Note:
See TracChangeset
for help on using the changeset viewer.