1/* 2 * config.c 3 * 4 * Copyright (c) 1996-1999 Whistle Communications, Inc. 5 * All rights reserved. 6 * 7 * Subject to the following obligations and disclaimer of warranty, use and 8 * redistribution of this software, in source or object code forms, with or --- 19 unchanged lines hidden (view full) --- 28 * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 29 * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 30 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 34 * OF SUCH DAMAGE. 35 * |
36 * $FreeBSD: head/usr.sbin/ngctl/config.c 160423 2006-07-17 08:35:47Z stefanf $ |
37 */ 38 39#include <err.h> 40#include <errno.h> 41#include <netgraph.h> 42#include <stdio.h> 43#include <string.h> 44#include <unistd.h> --- 4 unchanged lines hidden (view full) --- 49 50static int ConfigCmd(int ac, char **av); 51 52const struct ngcmd config_cmd = { 53 ConfigCmd, 54 "config <path> [arguments]", 55 "get or set configuration of node at <path>", 56 NULL, |
57 { NULL } |
58}; 59 60static int 61ConfigCmd(int ac, char **av) 62{ 63 u_char sbuf[sizeof(struct ng_mesg) + NG_TEXTRESPONSE]; 64 struct ng_mesg *const resp = (struct ng_mesg *) sbuf; 65 char *const status = (char *) resp->data; --- 46 unchanged lines hidden --- |