Untabify and headerize config.h.

This commit is contained in:
Nicholas J. Kain 2011-03-30 23:33:46 -04:00
parent b5e5685d01
commit 147e2d0fd9

View File

@ -1,5 +1,25 @@
#ifndef DHCPC_H_ /* config.h - internal configuration and state for ndhc
#define DHCPC_H_ * Time-stamp: <2011-03-30 23:33:07 nk>
*
* (c) 2004-2011 Nicholas J. Kain <njkain at gmail dot com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef NDHC_CONFIG_H_
#define NDHC_CONFIG_H_
#include <stdint.h> #include <stdint.h>
@ -44,7 +64,7 @@ struct client_state_t {
int timeout, oldTimeout; int timeout, oldTimeout;
uint32_t requestedIP, serverAddr, routerAddr; uint32_t requestedIP, serverAddr, routerAddr;
uint32_t lease, t1, t2, xid; uint32_t lease, t1, t2, xid;
unsigned char routerArp[6]; uint8_t routerArp[6];
}; };
struct client_config_t { struct client_config_t {
@ -53,13 +73,13 @@ struct client_config_t {
char abort_if_no_lease; /* Abort if no lease */ char abort_if_no_lease; /* Abort if no lease */
char background_if_no_lease; /* Fork to background if no lease */ char background_if_no_lease; /* Fork to background if no lease */
char *interface; /* The name of the interface to use */ char *interface; /* The name of the interface to use */
unsigned char *clientid; /* Optional client id to use (unterminated) */ uint8_t *clientid; /* Optional client id to use (unterminated) */
unsigned char *hostname; /* Optional hostname to use (unterminated) */ uint8_t *hostname; /* Optional hostname to use (unterminated) */
int ifindex; /* Index number of the interface to use */ int ifindex; /* Index number of the interface to use */
unsigned char arp[6]; /* Our arp address */ uint8_t arp[6]; /* Our arp address */
}; };
extern struct client_config_t client_config; extern struct client_config_t client_config;
#endif #endif /* NDHC_CONFIG_H_ */