Lines Matching +full:ascii +full:. +full:d

2  * msg.c
4 * Copyright (c) 1999 Whistle Communications, Inc.
5 * All rights reserved.
11 * 1. Any and all reproductions of the source or object code must include the
13 * 2. No rights are granted, in any manner or form, to use Whistle
14 * Communications, Inc. trademarks, including the mark "WHISTLE
16 * such appears in the above copyright notice or in the software.
22 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
25 * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE.
34 * OF SUCH DAMAGE.
36 * $Whistle: msg.c,v 1.2 1999/11/29 23:38:35 archie Exp $
37 * $FreeBSD: src/usr.sbin/ngctl/msg.c,v 1.1.4.1 2000/07/27 22:05:36 archie Exp $
38 * $DragonFly: src/usr.sbin/ngctl/msg.c,v 1.5 2007/06/04 00:40:31 swildner Exp $
41 #include "ngctl.h"
49 "msg path command [args ... ]",
52 " command name and ASCII arguments (if any) and sends that message"
53 " to the node. It does this by first asking the node to convert"
54 " the ASCII message into binary format, and resending the result.",
114 struct ng_mesg *const ascii = (struct ng_mesg *)m->data; in MsgRead() local
123 /* Ask originating node to convert message to ASCII */ in MsgRead()
125 NGM_BINARY2ASCII, m, sizeof(*m) + m->header.arglen) < 0 in MsgRead()
127 printf("Rec'd %s %d from \"%s\":\n", in MsgRead()
128 (m->header.flags & NGF_RESP) != 0 ? "response" : "command", in MsgRead()
129 m->header.cmd, path); in MsgRead()
130 if (m->header.arglen == 0) in MsgRead()
133 DumpAscii(m->data, m->header.arglen); in MsgRead()
137 /* Display message in ASCII form */ in MsgRead()
138 printf("Rec'd %s \"%s\" (%d) from \"%s\":\n", in MsgRead()
139 (ascii->header.flags & NGF_RESP) != 0 ? "response" : "command", in MsgRead()
140 ascii->header.cmdstr, ascii->header.cmd, path); in MsgRead()
141 if (*ascii->data != '\0') in MsgRead()
142 printf("Args:\t%s\n", ascii->data); in MsgRead()