show.c (53913) | show.c (125011) |
---|---|
1 2/* 3 * show.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 20 unchanged lines hidden (view full) --- 29 * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 30 * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * | 1 2/* 3 * show.c 4 * 5 * Copyright (c) 1996-1999 Whistle Communications, Inc. 6 * All rights reserved. 7 * 8 * Subject to the following obligations and disclaimer of warranty, use and --- 20 unchanged lines hidden (view full) --- 29 * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 30 * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 31 * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 32 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35 * OF SUCH DAMAGE. 36 * |
37 * $FreeBSD: head/usr.sbin/ngctl/show.c 53913 1999-11-30 02:45:32Z archie $ | 37 * $FreeBSD: head/usr.sbin/ngctl/show.c 125011 2004-01-26 10:27:18Z ru $ |
38 */ 39 40#include "ngctl.h" 41 42#define FMT " %-15s %-15s %-12s %-15s %-15s\n" 43#define UNNAMED "<unnamed>" 44#define NOSTATUS "<no status>" 45 --- 54 unchanged lines hidden (view full) --- 100 } 101 102 /* Show node information */ 103 if (!*ninfo->name) 104 snprintf(ninfo->name, sizeof(ninfo->name), "%s", UNNAMED); 105 printf(" Name: %-15s Type: %-15s ID: %08x Num hooks: %d\n", 106 ninfo->name, ninfo->type, ninfo->id, ninfo->hooks); 107 if (!no_hooks && ninfo->hooks > 0) { | 38 */ 39 40#include "ngctl.h" 41 42#define FMT " %-15s %-15s %-12s %-15s %-15s\n" 43#define UNNAMED "<unnamed>" 44#define NOSTATUS "<no status>" 45 --- 54 unchanged lines hidden (view full) --- 100 } 101 102 /* Show node information */ 103 if (!*ninfo->name) 104 snprintf(ninfo->name, sizeof(ninfo->name), "%s", UNNAMED); 105 printf(" Name: %-15s Type: %-15s ID: %08x Num hooks: %d\n", 106 ninfo->name, ninfo->type, ninfo->id, ninfo->hooks); 107 if (!no_hooks && ninfo->hooks > 0) { |
108 int k; | 108 u_int k; |
109 110 printf(FMT, "Local hook", "Peer name", 111 "Peer type", "Peer ID", "Peer hook"); 112 printf(FMT, "----------", "---------", 113 "---------", "-------", "---------"); 114 for (k = 0; k < ninfo->hooks; k++) { 115 struct linkinfo *const link = &hlist->link[k]; 116 struct nodeinfo *const peer = &hlist->link[k].nodeinfo; --- 15 unchanged lines hidden --- | 109 110 printf(FMT, "Local hook", "Peer name", 111 "Peer type", "Peer ID", "Peer hook"); 112 printf(FMT, "----------", "---------", 113 "---------", "-------", "---------"); 114 for (k = 0; k < ninfo->hooks; k++) { 115 struct linkinfo *const link = &hlist->link[k]; 116 struct nodeinfo *const peer = &hlist->link[k].nodeinfo; --- 15 unchanged lines hidden --- |