From 953443f688bbc7a920d9b6becb8dad231c025c3d Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Wed, 30 Mar 2011 16:38:53 -0400 Subject: [PATCH] Untabify and headerize ifchange.[ch]. --- ndhc/ifchange.c | 7 +++---- ndhc/ifchange.h | 28 ++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/ndhc/ifchange.c b/ndhc/ifchange.c index 2329d4a..f4f4ede 100644 --- a/ndhc/ifchange.c +++ b/ndhc/ifchange.c @@ -1,5 +1,5 @@ /* ifchange.c - functions to call the interface change daemon - * Time-stamp: <2011-03-30 13:14:37 nk> + * Time-stamp: <2011-03-30 16:37:33 nk> * * (c) 2004-2011 Nicholas J. Kain * @@ -170,11 +170,10 @@ static void deconfig_if(void) close(sockfd); } -static void send_cmd(int sockfd, struct dhcpMessage *packet, - unsigned char code) +static void send_cmd(int sockfd, struct dhcpMessage *packet, uint8_t code) { char buf[256]; - unsigned char *optdata; + uint8_t *optdata; ssize_t optlen; if (!packet) diff --git a/ndhc/ifchange.h b/ndhc/ifchange.h index 471c2de..d59d77b 100644 --- a/ndhc/ifchange.h +++ b/ndhc/ifchange.h @@ -1,13 +1,33 @@ +/* ifchange.h - functions to call the interface change daemon + * Time-stamp: <2011-03-30 16:38:19 nk> + * + * (c) 2004-2011 Nicholas J. Kain + * + * 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 IFCHANGE_H_ #define IFCHANGE_H_ #include "packet.h" enum { - IFCHANGE_DECONFIG = 0, - IFCHANGE_BOUND = 1, - IFCHANGE_RENEW = 2, - IFCHANGE_NAK = 4 + IFCHANGE_DECONFIG = 0, + IFCHANGE_BOUND = 1, + IFCHANGE_RENEW = 2, + IFCHANGE_NAK = 4 }; void ifchange(struct dhcpMessage *packet, int mode);