2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * Strings returned by dhcp_status_hdr_string() and 2N/A * dhcp_status_reply_to_string(). The first define is the header line, and 2N/A * the second defines line printed underneath. 2N/A * The spacing of fields must match. 2N/A * dhcp_state_to_string(): given a state, provides the state's name 2N/A * input: DHCPSTATE: the state to get the name of 2N/A * output: const char *: the state's name 2N/A return (
"<unknown>");
2N/A * Deliver no events, don't inherit, and allow it to be orphaned. 2N/A * dhcp_start_agent(): starts the agent if not already running 2N/A * input: int: number of seconds to wait for agent to start (-1 is forever) 2N/A * output: int: 0 on success, -1 on failure 2N/A * just send a dummy request to the agent to find out if it's 2N/A * up. we do this instead of directly connecting to it since 2N/A * we want to make sure we follow its IPC conventions 2N/A * (otherwise, it will log warnings to syslog). 2N/A /* wait for the daemon to run and then abandon the contract */ 2N/A * dhcp_status_hdr_string(): Return a string suitable to use as the header 2N/A * when printing DHCP_STATUS reply. 2N/A * output: const char *: newline terminated printable string 2N/A * time_to_string(): Utility routine for printing time 2N/A * input: time_t *: time_t to stringify 2N/A * output: const char *: printable time 2N/A return (
"<unknown>");
2N/A * dhcp_status_reply_to_string(): Return DHCP IPC reply of type DHCP_STATUS 2N/A * as a printable string 2N/A * input: dhcp_reply_t *: contains the status structure to print 2N/A * output: const char *: newline terminated printable string 2N/A return (
"<Internal error: status msg size>\n");