# ifndef DISABLE_ARP
# define DISABLE_ARP
# endif
+# ifndef DISABLE_CLASSID
+# define DISABLE_CLASSID
+# endif
# ifndef DISABLE_CLIENTID
# define DISABLE_CLIENTID
# endif
# define ENABLE_ARP
#endif
+/* Allow dhcpcd to send a ClassID */
+#ifndef DISABLE_CLASSID
+# define ENABLE_CLASSID
+#endif
+
/* Send a ClientID in all messages. */
#ifndef DISABLE_CLIENTID
# define ENABLE_CLIENTID
}
#endif
+#ifdef ENABLE_CLASSID
if (options->classid[0]) {
*p++ = DHCP_CLASSID;
memcpy(p, options->classid, options->classid[0] + 1);
p += options->classid[0] + 1;
}
+#endif
}
if (type == DHCP_DISCOVER || type == DHCP_REQUEST) {
sizeof(options->hostname));
break;
case 'i':
+#ifdef ENABLE_CLASSID
if (!oarg) {
*options->classid = '\0';
} else if (olen >= CLASSID_MAX_LEN) {
strlcpy((char *)options->classid + 1, oarg,
sizeof(options->classid));
}
+#endif
break;
case 'l':
if (*oarg == '-') {
options = xzalloc(sizeof(*options));
strlcpy(options->script, SCRIPT, sizeof(options->script));
+#ifdef ENABLE_CLASSID
options->classid[0] = snprintf((char *)options->classid + 1, CLASSID_MAX_LEN,
"%s %s", PACKAGE, VERSION);
+#endif
options->options |= DHCPCD_GATEWAY | DHCPCD_DAEMONISE;
#ifdef ENABLE_ARP
#ifdef ENABLE_ARP
" ARP"
#endif
+#ifdef ENABLE_CLASSID
+ " CLASSID"
+#endif
#ifdef ENABLE_CLIENTID
" CLIENTID"
#endif
char interface[IF_NAMESIZE];
char hostname[MAXHOSTNAMELEN];
int fqdn;
+#ifdef ENABLE_CLASSID
uint8_t classid[CLASSID_MAX_LEN + 1];
+#endif
#ifdef ENABLE_CLIENTID
char clientid[CLIENTID_MAX_LEN + 1];
#endif