inform.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1995-2001 by Sun Microsystems, Inc.
* All rights reserved.
*
* INFORM_SENT state of the client state machine.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <dhcpmsg.h>
#include "util.h"
#include "packet.h"
#include "interface.h"
/*
* dhcp_inform(): sends an INFORM packet and sets up reception for an ACK
*
* input: struct ifslist *: the interface to send the inform on, ...
* output: void
* note: the INFORM cannot be sent successfully if the interface
* does not have an IP address
*/
void
{
/*
* fetch our IP address -- since we may not manage the
* interface, go fetch it with ioctl()
*/
return;
}
/*
* the error handling here and in the check for IFF_UP below
* are handled different from most since it is the user who is
* at fault for the problem, not the machine.
*/
/* LINTED [ifr_addr is a sockaddr which will be aligned] */
"interface with no IP address");
return;
}
return;
}
"interface");
return;
}
/*
* assemble a DHCPREQUEST packet, without the server id
* option. fill in ciaddr, since we know this. if_server
* will be set to the server's IP address, which will be the
* broadcast address if we don't know it. The max dhcp message size
* option is set to the interface max, minus the size of the udp and
* ip headers.
*/
sizeof (struct udpiphdr)));
return;
}
if (register_acknak(ifsp) == 0) {
return;
}
}