#define TAG_SLP_SCOPE ((uint8_t) 79)
/* RFC 2937 */
#define TAG_NS_SEARCH ((uint8_t) 117)
+/* RFC 3004 - The User Class Option for DHCP */
+#define TAG_USER_CLASS ((uint8_t) 77)
/* RFC 3011 */
#define TAG_IP4_SUBNET_SELECT ((uint8_t) 118)
/* RFC 3442 */
#define TAG_CLASSLESS_STATIC_RT ((uint8_t) 121)
#define TAG_CLASSLESS_STA_RT_MS ((uint8_t) 249)
/* ftp://ftp.isi.edu/.../assignments/bootp-dhcp-extensions */
-#define TAG_USER_CLASS ((uint8_t) 77)
#define TAG_SLP_NAMING_AUTH ((uint8_t) 80)
#define TAG_CLIENT_FQDN ((uint8_t) 81)
#define TAG_AGENT_CIRCUIT ((uint8_t) 82)
{ TAG_SLP_SCOPE, "bSLP-SCOPE" }, /*"b" is a little wrong */
/* RFC 2937 */
{ TAG_NS_SEARCH, "sNSSEARCH" }, /* XXX 's' */
+/* RFC 3004 - The User Class Option for DHCP */
+ { TAG_USER_CLASS, "$User-Class" },
/* RFC 3011 */
{ TAG_IP4_SUBNET_SELECT, "iSUBNET" },
/* RFC 3442 */
{ TAG_CLASSLESS_STATIC_RT, "$Classless-Static-Route" },
{ TAG_CLASSLESS_STA_RT_MS, "$Classless-Static-Route-Microsoft" },
/* http://www.iana.org/assignments/bootp-dhcp-extensions/index.htm */
- { TAG_USER_CLASS, "aCLASS" },
{ TAG_SLP_NAMING_AUTH, "aSLP-NA" },
{ TAG_CLIENT_FQDN, "$FQDN" },
{ TAG_AGENT_CIRCUIT, "$Agent-Information" },
}
break;
+ case TAG_USER_CLASS:
+ {
+ u_int suboptnumber = 1;
+
+ first = 1;
+ if (len < 2) {
+ ND_PRINT((ndo, "ERROR: length < 2 bytes"));
+ bp += len;
+ len = 0;
+ break;
+ }
+ while (len > 0) {
+ suboptlen = *bp++;
+ len--;
+ ND_PRINT((ndo, "\n\t "));
+ ND_PRINT((ndo, "instance#%u: ", suboptnumber));
+ if (suboptlen == 0) {
+ ND_PRINT((ndo, "ERROR: suboption length must be non-zero"));
+ bp += len;
+ len = 0;
+ break;
+ }
+ if (len < suboptlen) {
+ ND_PRINT((ndo, "ERROR: malformed option"));
+ bp += len;
+ len = 0;
+ break;
+ }
+ ND_PRINT((ndo, "\""));
+ if (fn_printn(ndo, bp, suboptlen, ndo->ndo_snapend)) {
+ ND_PRINT((ndo, "\""));
+ goto trunc;
+ }
+ ND_PRINT((ndo, "\""));
+ ND_PRINT((ndo, ", length %d", suboptlen));
+ suboptnumber++;
+ len -= suboptlen;
+ bp += suboptlen;
+ }
+ }
+ break;
+
default:
ND_PRINT((ndo, "[unknown special tag %u, size %u]",
tag, len));
--- /dev/null
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+ 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:0c:29:1f:74:06, length 300, xid 0x6e32864, Flags [none]
+ Client-Ethernet-Address 00:0c:29:1f:74:06
+ Vendor-rfc1048 Extensions
+ Magic Cookie 0x63825363
+ DHCP-Message Option 53, length 1: Discover
+ Requested-IP Option 50, length 4: 192.168.1.4
+ Parameter-Request Option 55, length 7:
+ Subnet-Mask, BR, Time-Zone, Default-Gateway
+ Domain-Name, Domain-Name-Server, Hostname
+ User-Class Option 77, length 37:
+ instance#1: "subopt1", length 7
+ instance#2: "subopt2-123456789", length 17
+ instance#3: "subopt3-12", length 10
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 308)
+ 192.168.1.1.67 > 192.168.1.4.68: BOOTP/DHCP, Reply, length 280, xid 0x6e32864, Flags [none]
+ Your-IP 192.168.1.4
+ Client-Ethernet-Address 00:0c:29:1f:74:06
+ Vendor-rfc1048 Extensions
+ Magic Cookie 0x63825363
+ DHCP-Message Option 53, length 1: Offer
+ Server-ID Option 54, length 4: 192.168.1.1
+ Lease-Time Option 51, length 4: 86400
+ Subnet-Mask Option 1, length 4: 255.255.255.0
+ Default-Gateway Option 3, length 4: 192.168.1.1
+ Domain-Name-Server Option 6, length 4: 192.168.1.1
+ Domain-Name Option 15, length 4: "Home"
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 332)
+ 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:0c:29:1f:74:06, length 304, xid 0x6e32864, Flags [none]
+ Client-Ethernet-Address 00:0c:29:1f:74:06
+ Vendor-rfc1048 Extensions
+ Magic Cookie 0x63825363
+ DHCP-Message Option 53, length 1: Request
+ Server-ID Option 54, length 4: 192.168.1.1
+ Requested-IP Option 50, length 4: 192.168.1.4
+ Parameter-Request Option 55, length 7:
+ Subnet-Mask, BR, Time-Zone, Default-Gateway
+ Domain-Name, Domain-Name-Server, Hostname
+ User-Class Option 77, length 37:
+ instance#1: "subopt1", length 7
+ instance#2: "subopt2-123456789", length 17
+ instance#3: "subopt3-12", length 10
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 308)
+ 192.168.1.1.67 > 192.168.1.4.68: BOOTP/DHCP, Reply, length 280, xid 0x6e32864, Flags [none]
+ Your-IP 192.168.1.4
+ Client-Ethernet-Address 00:0c:29:1f:74:06
+ Vendor-rfc1048 Extensions
+ Magic Cookie 0x63825363
+ DHCP-Message Option 53, length 1: ACK
+ Server-ID Option 54, length 4: 192.168.1.1
+ Lease-Time Option 51, length 4: 86400
+ Subnet-Mask Option 1, length 4: 255.255.255.0
+ Default-Gateway Option 3, length 4: 192.168.1.1
+ Domain-Name-Server Option 6, length 4: 192.168.1.1
+ Domain-Name Option 15, length 4: "Home"