1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
# PDU specifications, used by ../src/pdu-gadget to produce a
# binary PDU stream for QA
#
# PDU_INSTANCE test cases
#
# credentials: len type from ncred cred[0]
? PDU_CREDS 42 1 0x01020000
# instance: len type from indom numinst inst namelen [name] ...
# OK ... different name[] lengths
? PDU_INSTANCE 42 indom(30.2) 0
? PDU_INSTANCE 42 indom(30.2) 1 900 7 str(bin-900)
? PDU_INSTANCE 42 indom(30.2) 2 100 7 str(bin-100) 900 7 str(bin-900)
? PDU_INSTANCE 42 indom(30.2) 3 100 7 str(bin-100) 500 8 str(bin-500x) 900 7 str(bin-900)
? PDU_INSTANCE 42 indom(30.2) 3 100 7 str(bin-100) 500 9 str(bin-500xy) 900 7 str(bin-900)
? PDU_INSTANCE 42 indom(30.2) 3 100 7 str(bin-100) 500 10 str(bin-500xyz) 900 7 str(bin-900)
? PDU_INSTANCE 42 indom(30.2) 3 100 7 str(bin-100) 500 11 str(bin-500xyza) 900 7 str(bin-900)
? PDU_INSTANCE 42 indom(30.2) 4 100 7 str(bin-100) 101 0 500 11 str(bin-500xyza) 900 7 str(bin-900)
# instance: len type from indom
# BAD, short PDU < min
? PDU_INSTANCE 42 indom(30.2)
# instance: len type from indom numinst ...
# BAD, numinst > max
? PDU_INSTANCE 42 indom(30.2) 10 900 7 str(bin-900)
# instance: len type from indom numinst ...
# BAD, short PDU inst[0] namelen < 0
? PDU_INSTANCE 42 indom(30.2) 3 100 -1 str(bin-100) 500 11 str(bin-500xyza) 900 7
# instance: len type from indom numinst inst namelen [name] ...
# BAD, short PDU inst[2] len too large
? PDU_INSTANCE 42 indom(30.2) 3 100 7 str(bin-100) 500 11 str(bin-500xyza) 900 11 str(bin-900)
# BAD, short PDU inst[2] missing name[]
? PDU_INSTANCE 42 indom(30.2) 3 100 7 str(bin-100) 500 11 str(bin-500xyza) 900 7
# instance: len type from indom numinst inst namelen [name] ...
# BAD, long PDU (extra word)
? PDU_INSTANCE 42 indom(30.2) 2 100 7 str(bin-100) 900 7 str(bin-900) 0xdeadbeef
|