- Timestamp:
- May 27, 2010 9:41:25 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTCidr.cpp
r29834 r29836 67 67 RTTestBanner(hTest); 68 68 69 CHECKNETWORK("10.0.0/45", VERR_INVALID_PARAMETER, 0,0);70 CHECKNETWORK("10.0.0/-45", VERR_INVALID_PARAMETER, 0,0);69 CHECKNETWORK("10.0.0/45", VERR_INVALID_PARAMETER, 0, 0); 70 CHECKNETWORK("10.0.0/-45", VERR_INVALID_PARAMETER, 0, 0); 71 71 CHECKNETWORK("10.0.0/24", VINF_SUCCESS, 0x0A000000, 0xFFFFFF00); 72 72 CHECKNETWORK("10.0.0/8", VINF_SUCCESS, 0x0A000000, 0xFF000000); 73 73 CHECKNETWORK("10.0.0./24", VERR_INVALID_PARAMETER, 0, 0); 74 74 CHECKNETWORK("0.1.0/24", VERR_INVALID_PARAMETER, 0, 0); 75 /* vvl: (changed exp to VINF_SUCCESS) according to rfc4632 s3.1: n.n.n.0/24, where n is an 8-bit decimal octet value*/76 CHECKNETWORK("10.255.0.0/24", VINF_SUCCESS, 0x0AFF0000,0xFFFFFF00);75 /* RFC 4632 s3.1: n.n.n.0/24, where n is an 8-bit decimal octet value*/ 76 CHECKNETWORK("10.255.0.0/24", VINF_SUCCESS, 0x0AFF0000, 0xFFFFFF00); 77 77 CHECKNETWORK("10.1234.0.0/24", VERR_INVALID_PARAMETER, 0, 0); 78 78 CHECKNETWORK("10.256.0.0/24", VERR_INVALID_PARAMETER, 0, 0); 79 79 CHECKNETWORK("10.0.0/3", VERR_INVALID_PARAMETER, 0, 0); 80 /* vvl: (changed exp to VERR_INVALID_PARAMETER) according to rfc4632 s3.1: legacy "Class A" is n.0.0.0/8 */81 CHECKNETWORK("10.1.2.3/8", VERR_INVALID_PARAMETER, 0,0);82 CHECKNETWORK("10.1.2.4/30", 80 /* RFC 4632 s3.1: legacy "Class A" is n.0.0.0/8 */ 81 CHECKNETWORK("10.1.2.3/8", VERR_INVALID_PARAMETER, 0, 0); 82 CHECKNETWORK("10.1.2.4/30", VINF_SUCCESS, 0x0A010204, 0xFFFFFFFC); 83 83 CHECKNETWORK("10.0.0/29", VERR_INVALID_PARAMETER, 0, 0); 84 84 CHECKNETWORK("10.0.0/240", VERR_INVALID_PARAMETER, 0, 0); 85 85 CHECKNETWORK("10.0.0/24.", VERR_INVALID_PARAMETER, 0, 0); 86 /* vvl: (changed exp to VERR_INVALID_PARAMETER) according to rfc4632 s3.1: legacy "Class B" is n.n.0.0/16 */86 /* RFC 4632 s3.1: legacy "Class B" is n.n.0.0/16 */ 87 87 CHECKNETWORK("10.1.2/16", VERR_INVALID_PARAMETER, 0, 0); 88 CHECKNETWORK("10.1.0.0/16", VINF_SUCCESS, 0x0A010000, 0xFFFF0000); 89 CHECKNETWORK("10.1/16", VINF_SUCCESS, 0x0A010000, 0xFFFF0000); 88 90 CHECKNETWORK("1.2.3.4", VINF_SUCCESS, 0x01020304, 0xFFFFFFFF); 89 CHECKNETWORK("10.1.255/24", VINF_SUCCESS, 0x0A01FF00, 0xFFFFFF00); 90 CHECKNETWORK("10.1.254/24", VINF_SUCCESS, 0x0A01FE00, 0xFFFFFF00); 91 CHECKNETWORK("10.255.1/24", VINF_SUCCESS, 0x0AFF0100, 0xFFFFFF00); 91 CHECKNETWORK("1.2.3.255", VINF_SUCCESS, 0x010203FF, 0xFFFFFFFF); 92 CHECKNETWORK("1.2.3.256", VERR_INVALID_PARAMETER, 0, 0); 93 CHECKNETWORK("10.1.255/24", VINF_SUCCESS, 0x0A01FF00, 0xFFFFFF00); 94 CHECKNETWORK("10.1.254/24", VINF_SUCCESS, 0x0A01FE00, 0xFFFFFF00); 95 CHECKNETWORK("10.255.1/24", VINF_SUCCESS, 0x0AFF0100, 0xFFFFFF00); 96 CHECKNETWORK("10.255.1.1/24", VERR_INVALID_PARAMETER, 0, 0); 92 97 93 98 return RTTestSummaryAndDestroy(hTest);
Note:
See TracChangeset
for help on using the changeset viewer.