- /* http://www.cisco.com/univercd/cc/td/doc/product/voice/ata/atarn/186rn21m.htm
- * plus more details from other sources
- */
- case 0x0e: /* ATA-186 VoIP VLAN request - incomplete doc. */
- printf("app %d, vlan %d",
- *(tptr), EXTRACT_16BITS(tptr+1));
+ /* https://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cata/186/2_12_m/english/release/notes/186rn21m.html
+ * plus more details from other sources
+ *
+ * There are apparently versions of the request with both
+ * 2 bytes and 3 bytes of value. The 3 bytes of value
+ * appear to be a 1-byte application type followed by a
+ * 2-byte VLAN ID; the 2 bytes of value are unknown
+ * (they're 0x20 0x00 in some captures I've seen; that
+ * is not a valid VLAN ID, as VLAN IDs are 12 bits).
+ *
+ * The replies all appear to be 3 bytes long.
+ */
+ case 0x0e: /* ATA-186 VoIP VLAN assignment - incomplete doc. */
+ if (len < 3)
+ goto trunc;
+ ND_PRINT("app %u, vlan %u", GET_U_1(tptr),
+ GET_BE_U_2(tptr + 1));
+ break;
+ case 0x0f: /* ATA-186 VoIP VLAN request - incomplete doc. */
+ if (len < 2)
+ goto trunc;
+ if (len == 2)
+ ND_PRINT("unknown 0x%04x", GET_BE_U_2(tptr));
+ else
+ ND_PRINT("app %u, vlan %u", GET_U_1(tptr),
+ GET_BE_U_2(tptr + 1));