script: DEFAULT_SCRIPT,
clientid: NULL,
hostname: NULL,
+ fqdn: NULL,
ifindex: 0,
arp: "\0\0\0\0\0\0", /* appease gcc-3.0 */
};
" -c, --clientid=CLIENTID Client identifier\n"
" -H, --hostname=HOSTNAME Client hostname\n"
" -h Alias for -H\n"
+" -F, --fqdn=FQDN Client fully qualified domain name\n"
" -f, --foreground Do not fork after getting lease\n"
" -b, --background Fork to background if lease cannot be\n"
" immediately negotiated.\n"
{"foreground", no_argument, 0, 'f'},
{"background", no_argument, 0, 'b'},
{"hostname", required_argument, 0, 'H'},
- {"hostname", required_argument, 0, 'h'},
+ {"hostname", required_argument, 0, 'h'},
+ {"fqdn", required_argument, 0, 'F'},
{"interface", required_argument, 0, 'i'},
{"now", no_argument, 0, 'n'},
{"pidfile", required_argument, 0, 'p'},
/* get options */
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "c:fbH:h:i:np:qr:s:v", arg_options, &option_index);
+ c = getopt_long(argc, argv, "c:fbH:h:F:i:np:qr:s:v", arg_options, &option_index);
if (c == -1) break;
switch (c) {
client_config.hostname[OPT_LEN] = len;
strncpy(client_config.hostname + 2, optarg, len);
break;
+ case 'F':
+ len = strlen(optarg) > 255 ? 255 : strlen(optarg);
+ if (client_config.fqdn) free(client_config.fqdn);
+ client_config.fqdn = xmalloc(len + 5);
+ client_config.fqdn[OPT_CODE] = DHCP_FQDN;
+ client_config.fqdn[OPT_LEN] = len + 3;
+ /* Flags: 0000NEOS
+ S: 1 => Client requests Server to update A RR in DNS as well as PTR
+ O: 1 => Server indicates to client that DNS has been updated regardless
+ E: 1 => Name data is DNS format, i.e. <4>host<6>domain<4>com<0> not "host.domain.com"
+ N: 1 => Client requests Server to not update DNS
+ */
+ client_config.fqdn[OPT_LEN + 1] = 0x1;
+ client_config.fqdn[OPT_LEN + 2] = 0;
+ client_config.fqdn[OPT_LEN + 3] = 0;
+ strncpy(client_config.fqdn + 5, optarg, len);
+ break;
case 'i':
client_config.interface = optarg;
break;
{"ipttl", OPTION_U8, 0x17},
{"mtu", OPTION_U16, 0x1a},
{"broadcast", OPTION_IP | OPTION_REQ, 0x1c},
- {"ntpsrv", OPTION_IP | OPTION_LIST, 0x2a},
+ {"nisdomain", OPTION_STRING | OPTION_REQ, 0x28},
+ {"nissrv", OPTION_IP | OPTION_LIST | OPTION_REQ, 0x29},
+ {"ntpsrv", OPTION_IP | OPTION_LIST | OPTION_REQ, 0x2a},
{"wins", OPTION_IP | OPTION_LIST, 0x2c},
{"requestip", OPTION_IP, 0x32},
{"lease", OPTION_U32, 0x33},