Untabify and headerize ifchange.[ch].
This commit is contained in:
parent
6265a0e973
commit
953443f688
@ -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 <njkain at gmail dot com>
|
||||
*
|
||||
@ -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)
|
||||
|
@ -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 <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 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user