82{
86 UINT bogus[] = { 1,2,3,4 };
88 UINT mib2If[] = { 1,3,6,1,2,1,2 };
89 UINT mib2IfTable[] = { 1,3,6,1,2,1,2,2 };
90 UINT mib2IfDescr[] = { 1,3,6,1,2,1,2,2,1,2 };
91 UINT mib2IfAdminStatus[] = { 1,3,6,1,2,1,2,2,1,7 };
92 UINT mib2IfOperStatus[] = { 1,3,6,1,2,1,2,2,1,8 };
94 UINT mib2IpRouteTable[] = { 1,3,6,1,2,1,4,21,1,1 };
95 UINT mib2UdpTable[] = { 1,3,6,1,2,1,7,5,1,1 };
98
99 if (!pSnmpExtensionQuery)
100 {
101 win_skip(
"couldn't find SnmpExtensionQuery\n");
102 return;
103 }
104
105if (0)
106{
112}
113
120 "expected SNMP_ERRORSTATUS_NOERROR, got %d\n",
error);
122
123
124
125
138 "expected SNMP_ERRORSTATUS_NOERROR or ERROR_FILE_NOT_FOUND, got %d\n",
144
147
148
150 vars[0].
name.
ids = mib2IfTable;
157 "expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d\n",
error);
158
160
161
162
163
165 vars[0].
name.
ids = mib2IfDescr;
167 vars[1].
name.
ids = mib2IfAdminStatus;
169 vars[2].
name.
ids = mib2IfOperStatus;
177 "expected SNMP_ERRORSTATUS_NOSUCHNAME, got %d\n",
error);
179
180
181
182
183
184
192 do {
199 "expected SNMP_ERRORSTATUS_NOERROR, got %d\n",
error);
206 vars[0].
name.idLength))
209 vars[1].
name.idLength))
212 vars[2].
name.idLength))
217 {
218
219
220
222 }
223 if (moreData)
224 {
226
227
228
229
230
231
232
233 ok(vars2[0].
name.idLength == vars[0].
name.idLength + 1,
234 "expected length %d, got %d\n", vars[0].name.idLength + 1,
235 vars2[0].name.idLength);
238 "expected %d, got %d\n",
entry + 1, lastID);
239 ok(vars2[1].
name.idLength == vars[1].
name.idLength + 1,
240 "expected length %d, got %d\n", vars[1].name.idLength + 1,
241 vars2[1].name.idLength);
244 "expected %d, got %d\n",
entry + 1, lastID);
245 ok(vars2[2].
name.idLength == vars[2].
name.idLength + 1,
246 "expected length %d, got %d\n", vars[2].name.idLength + 1,
247 vars2[2].name.idLength);
250 "expected %d, got %d\n",
entry + 1, lastID);
252
254 "expected ASN_OCTETSTRING, got %02x\n", vars2[0].
value.asnType);
256 "expected ASN_INTEGER, got %02x\n", vars2[1].
value.asnType);
258 "expected ASN_INTEGER, got %02x\n", vars2[2].
value.asnType);
259 }
260 else if (noChange)
261 skip(
"no change in OID, no MIB2 IF table implementation\n");
262 } while (moreData && !noChange);
266
267
268
269
270
281 "expected SNMP_ERRORSTATUS_NOERROR, got %d\n",
error);
287 "expected 1.3.6.1.2.1.1 or 1.3.6.1.2.1.2, got %s\n",
290
291
299 do {
303 "expected SNMP_ERRORSTATUS_NOERROR, got %d\n",
error);
310 vars[0].
name.idLength))
313 {
314
315
316
318 }
319 if (moreData)
320 {
321
322
323
324
325 ok(vars2[0].
name.idLength == vars[0].
name.idLength + 4,
326 "expected length %d, got %d\n", vars[0].name.idLength + 4,
327 vars2[0].name.idLength);
328
330 "expected type ASN_IPADDRESS, got %02x\n",
331 vars2[0].
value.asnType);
333 {
335
336
337
338
339
340
342 {
343 ok(vars2[0].
value.asnValue.address.stream[
i] ==
344 vars2[0].name.ids[vars2[0].name.idLength - 4 +
i],
345 "expected ident byte %d to be %d, got %d\n",
i,
346 vars2[0].value.asnValue.address.stream[
i],
347 vars2[0].name.ids[vars2[0].name.idLength - 4 +
i]);
348 }
349 }
350 }
351 else if (noChange)
352 skip(
"no change in OID, no MIB2 IP address table implementation\n");
353 } while (moreData && !noChange);
355
356
358 vars[0].
name.
ids = mib2IpRouteTable;
365 do {
369 "expected SNMP_ERRORSTATUS_NOERROR, got %d\n",
error);
376 vars[0].
name.idLength))
379 {
380
381
382
384 }
385 if (moreData)
386 {
387
388
389
390
391 ok(vars2[0].
name.idLength == vars[0].
name.idLength + 4,
392 "expected length %d, got %d\n", vars[0].name.idLength + 4,
393 vars2[0].name.idLength);
394
396 "expected type ASN_IPADDRESS, got %02x\n",
397 vars2[0].
value.asnType);
399 {
401
402
403
404
405
406
408 {
409 ok(vars2[0].
value.asnValue.address.stream[
i] ==
410 vars2[0].name.ids[vars2[0].name.idLength - 4 +
i],
411 "expected ident byte %d to be %d, got %d\n",
i,
412 vars2[0].value.asnValue.address.stream[
i],
413 vars2[0].name.ids[vars2[0].name.idLength - 4 +
i]);
414 }
415 }
416 }
417 else if (noChange)
418 skip(
"no change in OID, no MIB2 IP route table implementation\n");
419 } while (moreData && !noChange);
421
422
424 vars[0].
name.
ids = mib2UdpTable;
431 do {
434
435
436
437
438
439
440 if (0) {
442 "expected SNMP_ERRORSTATUS_NOERROR, got %d\n",
error);
444 }
450 vars[0].
name.idLength))
453 {
454
455
456
458 }
459 if (moreData)
460 {
461
462 ok(vars2[0].
name.idLength == vars[0].
name.idLength + 5,
463 "expected length %d, got %d\n", vars[0].name.idLength + 5,
464 vars2[0].name.idLength);
465
467 "expected type ASN_IPADDRESS, got %02x\n",
468 vars2[0].
value.asnType);
470 {
472
473
474
475
476
477
478
480 {
481 ok(vars2[0].
value.asnValue.address.stream[
i] ==
482 vars2[0].name.ids[vars2[0].name.idLength - 5 +
i],
483 "expected ident byte %d to be %d, got %d\n",
i,
484 vars2[0].value.asnValue.address.stream[
i],
485 vars2[0].name.ids[vars2[0].name.idLength - 5 +
i]);
486 }
487 }
488 }
489 else if (noChange)
490 skip(
"no change in OID, no MIB2 UDP table implementation\n");
491 } while (moreData && !noChange);
493}
list(size_type __n, const_reference __val=_STLP_DEFAULT_CONSTRUCTED(value_type), const allocator_type &__a=allocator_type())
INT WINAPI SnmpUtilOidCmp(AsnObjectIdentifier *oid1, AsnObjectIdentifier *oid2)
INT WINAPI SnmpUtilOidNCmp(AsnObjectIdentifier *oid1, AsnObjectIdentifier *oid2, UINT count)
INT WINAPI SnmpUtilOidCpy(AsnObjectIdentifier *dst, AsnObjectIdentifier *src)
VOID WINAPI SnmpUtilVarBindFree(SnmpVarBind *vb)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define ERROR_FILE_NOT_FOUND
#define SNMP_ERRORSTATUS_NOSUCHNAME
#define SNMP_ERRORSTATUS_NOERROR
union AsnAny::@3228 asnValue