summaryrefslogtreecommitdiffstats
path: root/dhcpcd.h
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-06-29 18:28:19 +0000
committerRoy Marples <roy@marples.name>2008-06-29 18:28:19 +0000
commitabc5592709affc9ec3f88ec786b624b69ee9f28f (patch)
tree402ab0d388cb1921a29c350c84831c8b311d1174 /dhcpcd.h
parent1f96a7d73e5e735ffe3a34ddb892abda5cd7eaae (diff)
downloaddhcpcd-abc5592709affc9ec3f88ec786b624b69ee9f28f.tar.xz
Save a few bytes by treating some strings like DHCP options, having the first byte as the length.
Diffstat (limited to 'dhcpcd.h')
-rw-r--r--dhcpcd.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/dhcpcd.h b/dhcpcd.h
index ac1a651a..7b1ee396 100644
--- a/dhcpcd.h
+++ b/dhcpcd.h
@@ -41,8 +41,8 @@
#define DEFAULT_TIMEOUT 30
#define DEFAULT_LEASETIME 3600 /* 1 hour */
-#define CLASS_ID_MAX_LEN 48
-#define CLIENT_ID_MAX_LEN 48
+#define CLASSID_MAX_LEN 48
+#define CLIENTID_MAX_LEN 48
#define USERCLASS_MAX_LEN 255
#ifdef THERE_IS_NO_FORK
@@ -72,12 +72,11 @@ struct options {
char interface[IF_NAMESIZE];
char hostname[MAXHOSTNAMELEN];
int fqdn;
- char classid[CLASS_ID_MAX_LEN];
- char clientid[CLIENT_ID_MAX_LEN];
- char userclass[USERCLASS_MAX_LEN];
+ char classid[CLASSID_MAX_LEN + 1];
+ char clientid[CLIENTID_MAX_LEN + 1];
+ char userclass[USERCLASS_MAX_LEN + 1];
uint8_t reqmask[256 / 8];
uint8_t nomask[256 / 8];
- size_t userclass_len;
uint32_t leasetime;
time_t timeout;
int metric;