]>
The Tcpdump Group git mirrors - tcpdump/blob - print-decnet.c
2 * Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that: (1) source code distributions
7 * retain the above copyright notice and this paragraph in its entirety, (2)
8 * distributions including binary code include the above copyright notice and
9 * this paragraph in its entirety in the documentation or other materials
10 * provided with the distribution, and (3) all advertising materials mentioning
11 * features or use of this software display the following acknowledgement:
12 * ``This product includes software developed by the University of California,
13 * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
14 * the University nor the names of its contributors may be used to endorse
15 * or promote products derived from this software without specific prior
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
18 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23 static const char rcsid
[] =
24 "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.28 2000-01-17 06:24:24 itojun Exp $ (LBL)";
31 #include <sys/param.h>
33 #include <sys/socket.h>
42 #include <netdnet/dnetdb.h>
56 #include "interface.h"
57 #include "addrtoname.h"
60 static void print_decnet_ctlmsg(const union routehdr
*, u_int
);
61 static void print_t_info(int);
62 static void print_l1_routes(const char *, u_int
);
63 static void print_l2_routes(const char *, u_int
);
64 static void print_i_info(int);
65 static void print_elist(const char *, u_int
);
66 static void print_nsp(const u_char
*, u_int
);
67 static void print_reason(int);
69 static void pdata(u_char
*, int);
73 extern char *dnet_htoa(struct dn_naddr
*);
77 decnet_print(register const u_char
*ap
, register u_int length
,
78 register u_int caplen
)
80 static union routehdr rhcopy
;
81 register union routehdr
*rhp
= &rhcopy
;
84 u_int rhlen
, nsplen
, pktlen
;
87 if (length
< sizeof(struct shorthdr
)) {
88 (void)printf("[|decnet]");
92 pktlen
= EXTRACT_LE_16BITS(ap
);
94 rhlen
= min(length
, caplen
);
95 rhlen
= min(rhlen
, sizeof(*rhp
));
96 memcpy((char *)rhp
, (char *)&(ap
[sizeof(short)]), rhlen
);
98 mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
100 if (mflags
& RMF_PAD
) {
101 /* pad bytes of some sort in front of message */
102 u_int padlen
= mflags
& RMF_PADMASK
;
104 (void) printf("[pad:%d] ", padlen
);
108 rhlen
= min(length
, caplen
);
109 rhlen
= min(rhlen
, sizeof(*rhp
));
110 memcpy((char *)rhp
, (char *)&(ap
[sizeof(short)]), rhlen
);
111 mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
114 if (mflags
& RMF_FVER
) {
115 (void) printf("future-version-decnet");
116 default_print(ap
, length
);
120 /* is it a control message? */
121 if (mflags
& RMF_CTLMSG
) {
122 print_decnet_ctlmsg(rhp
, min(length
, caplen
));
126 switch (mflags
& RMF_MASK
) {
129 EXTRACT_LE_16BITS(rhp
->rh_long
.lg_dst
.dne_remote
.dne_nodeaddr
);
131 EXTRACT_LE_16BITS(rhp
->rh_long
.lg_src
.dne_remote
.dne_nodeaddr
);
132 hops
= EXTRACT_LE_8BITS(rhp
->rh_long
.lg_visits
);
133 nspp
= &(ap
[sizeof(short) + sizeof(struct longhdr
)]);
134 nsplen
= min((length
- sizeof(struct longhdr
)),
135 (caplen
- sizeof(struct longhdr
)));
138 dst
= EXTRACT_LE_16BITS(rhp
->rh_short
.sh_dst
);
139 src
= EXTRACT_LE_16BITS(rhp
->rh_short
.sh_src
);
140 hops
= (EXTRACT_LE_8BITS(rhp
->rh_short
.sh_visits
) & VIS_MASK
)+1;
141 nspp
= &(ap
[sizeof(short) + sizeof(struct shorthdr
)]);
142 nsplen
= min((length
- sizeof(struct shorthdr
)),
143 (caplen
- sizeof(struct shorthdr
)));
146 (void) printf("unknown message flags under mask");
147 default_print((u_char
*)ap
, length
);
151 (void)printf("%s > %s %d ",
152 dnaddr_string(src
), dnaddr_string(dst
), pktlen
);
154 if (mflags
& RMF_RQR
)
155 (void)printf("RQR ");
156 if (mflags
& RMF_RTS
)
157 (void)printf("RTS ");
160 (void)printf("%d hops ", hops
);
163 print_nsp(nspp
, nsplen
);
167 print_decnet_ctlmsg(register const union routehdr
*rhp
, u_int length
)
169 int mflags
= EXTRACT_LE_8BITS(rhp
->rh_short
.sh_flags
);
170 register union controlmsg
*cmp
= (union controlmsg
*)rhp
;
171 int src
, dst
, info
, blksize
, eco
, ueco
, hello
, other
, vers
;
172 etheraddr srcea
, rtea
;
174 char *rhpx
= (char *)rhp
;
176 switch (mflags
& RMF_CTLMASK
) {
178 (void)printf("init ");
179 src
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_src
);
180 info
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_info
);
181 blksize
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_blksize
);
182 vers
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_vers
);
183 eco
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_eco
);
184 ueco
= EXTRACT_LE_8BITS(cmp
->cm_init
.in_ueco
);
185 hello
= EXTRACT_LE_16BITS(cmp
->cm_init
.in_hello
);
188 "src %sblksize %d vers %d eco %d ueco %d hello %d",
189 dnaddr_string(src
), blksize
, vers
, eco
, ueco
,
193 (void)printf("verification ");
194 src
= EXTRACT_LE_16BITS(cmp
->cm_ver
.ve_src
);
195 other
= EXTRACT_LE_8BITS(cmp
->cm_ver
.ve_fcnval
);
196 (void)printf("src %s fcnval %o", dnaddr_string(src
), other
);
199 (void)printf("test ");
200 src
= EXTRACT_LE_16BITS(cmp
->cm_test
.te_src
);
201 other
= EXTRACT_LE_8BITS(cmp
->cm_test
.te_data
);
202 (void)printf("src %s data %o", dnaddr_string(src
), other
);
205 (void)printf("lev-1-routing ");
206 src
= EXTRACT_LE_16BITS(cmp
->cm_l1rou
.r1_src
);
207 (void)printf("src %s ", dnaddr_string(src
));
208 print_l1_routes(&(rhpx
[sizeof(struct l1rout
)]),
209 length
- sizeof(struct l1rout
));
212 (void)printf("lev-2-routing ");
213 src
= EXTRACT_LE_16BITS(cmp
->cm_l2rout
.r2_src
);
214 (void)printf("src %s ", dnaddr_string(src
));
215 print_l2_routes(&(rhpx
[sizeof(struct l2rout
)]),
216 length
- sizeof(struct l2rout
));
219 (void)printf("router-hello ");
220 vers
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_vers
);
221 eco
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_eco
);
222 ueco
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_ueco
);
223 memcpy((char *)&srcea
, (char *)&(cmp
->cm_rhello
.rh_src
),
225 src
= EXTRACT_LE_16BITS(srcea
.dne_remote
.dne_nodeaddr
);
226 info
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_info
);
227 blksize
= EXTRACT_LE_16BITS(cmp
->cm_rhello
.rh_blksize
);
228 priority
= EXTRACT_LE_8BITS(cmp
->cm_rhello
.rh_priority
);
229 hello
= EXTRACT_LE_16BITS(cmp
->cm_rhello
.rh_hello
);
232 "vers %d eco %d ueco %d src %s blksize %d pri %d hello %d",
233 vers
, eco
, ueco
, dnaddr_string(src
),
234 blksize
, priority
, hello
);
235 print_elist(&(rhpx
[sizeof(struct rhellomsg
)]),
236 length
- sizeof(struct rhellomsg
));
239 (void)printf("endnode-hello ");
240 vers
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_vers
);
241 eco
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_eco
);
242 ueco
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_ueco
);
243 memcpy((char *)&srcea
, (char *)&(cmp
->cm_ehello
.eh_src
),
245 src
= EXTRACT_LE_16BITS(srcea
.dne_remote
.dne_nodeaddr
);
246 info
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_info
);
247 blksize
= EXTRACT_LE_16BITS(cmp
->cm_ehello
.eh_blksize
);
249 memcpy((char *)&rtea
, (char *)&(cmp
->cm_ehello
.eh_router
),
251 dst
= EXTRACT_LE_16BITS(rtea
.dne_remote
.dne_nodeaddr
);
252 hello
= EXTRACT_LE_16BITS(cmp
->cm_ehello
.eh_hello
);
253 other
= EXTRACT_LE_8BITS(cmp
->cm_ehello
.eh_data
);
256 "vers %d eco %d ueco %d src %s blksize %d rtr %s hello %d data %o",
257 vers
, eco
, ueco
, dnaddr_string(src
),
258 blksize
, dnaddr_string(dst
), hello
, other
);
262 (void)printf("unknown control message");
263 default_print((u_char
*)rhp
, length
);
269 print_t_info(int info
)
271 int ntype
= info
& 3;
273 case 0: (void)printf("reserved-ntype? "); break;
274 case TI_L2ROUT
: (void)printf("l2rout "); break;
275 case TI_L1ROUT
: (void)printf("l1rout "); break;
276 case TI_ENDNODE
: (void)printf("endnode "); break;
279 (void)printf("verif ");
281 (void)printf("blo ");
285 print_l1_routes(const char *rp
, u_int len
)
291 /* The last short is a checksum */
292 while (len
> (3 * sizeof(short))) {
293 count
= EXTRACT_LE_16BITS(rp
);
295 return; /* seems to be bogus from here on */
297 len
-= sizeof(short);
298 id
= EXTRACT_LE_16BITS(rp
);
300 len
-= sizeof(short);
301 info
= EXTRACT_LE_16BITS(rp
);
303 len
-= sizeof(short);
304 (void)printf("{ids %d-%d cost %d hops %d} ", id
, id
+ count
,
305 RI_COST(info
), RI_HOPS(info
));
310 print_l2_routes(const char *rp
, u_int len
)
316 /* The last short is a checksum */
317 while (len
> (3 * sizeof(short))) {
318 count
= EXTRACT_LE_16BITS(rp
);
320 return; /* seems to be bogus from here on */
322 len
-= sizeof(short);
323 area
= EXTRACT_LE_16BITS(rp
);
325 len
-= sizeof(short);
326 info
= EXTRACT_LE_16BITS(rp
);
328 len
-= sizeof(short);
329 (void)printf("{areas %d-%d cost %d hops %d} ", area
, area
+ count
,
330 RI_COST(info
), RI_HOPS(info
));
335 print_i_info(int info
)
337 int ntype
= info
& II_TYPEMASK
;
339 case 0: (void)printf("reserved-ntype? "); break;
340 case II_L2ROUT
: (void)printf("l2rout "); break;
341 case II_L1ROUT
: (void)printf("l1rout "); break;
342 case II_ENDNODE
: (void)printf("endnode "); break;
345 (void)printf("verif ");
346 if (info
& II_NOMCAST
)
347 (void)printf("nomcast ");
349 (void)printf("blo ");
353 print_elist(const char *elp
, u_int len
)
355 /* Not enough examples available for me to debug this */
359 print_nsp(const u_char
*nspp
, u_int nsplen
)
361 const struct nsphdr
*nsphp
= (struct nsphdr
*)nspp
;
364 flags
= EXTRACT_LE_8BITS(nsphp
->nh_flags
);
365 dst
= EXTRACT_LE_16BITS(nsphp
->nh_dst
);
366 src
= EXTRACT_LE_16BITS(nsphp
->nh_src
);
368 switch (flags
& NSP_TYPEMASK
) {
370 switch (flags
& NSP_SUBMASK
) {
374 case MFS_BOM
+MFS_EOM
:
375 printf("data %d>%d ", src
, dst
);
377 struct seghdr
*shp
= (struct seghdr
*)nspp
;
382 u_int data_off
= sizeof(struct minseghdr
);
384 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
385 if (ack
& SGQ_ACK
) { /* acknum field */
386 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
387 (void)printf("nak %d ", ack
& SGQ_MASK
);
389 (void)printf("ack %d ", ack
& SGQ_MASK
);
390 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
391 data_off
+= sizeof(short);
392 if (ack
& SGQ_OACK
) { /* ackoth field */
393 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
394 (void)printf("onak %d ", ack
& SGQ_MASK
);
396 (void)printf("oack %d ", ack
& SGQ_MASK
);
397 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
398 data_off
+= sizeof(short);
401 (void)printf("seg %d ", ack
& SGQ_MASK
);
403 dp
= &(nspp
[data_off
]);
408 case MFS_ILS
+MFS_INT
:
411 struct seghdr
*shp
= (struct seghdr
*)nspp
;
416 u_int data_off
= sizeof(struct minseghdr
);
418 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
419 if (ack
& SGQ_ACK
) { /* acknum field */
420 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
421 (void)printf("nak %d ", ack
& SGQ_MASK
);
423 (void)printf("ack %d ", ack
& SGQ_MASK
);
424 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
425 data_off
+= sizeof(short);
426 if (ack
& SGQ_OACK
) { /* ackdat field */
427 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
428 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
430 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
431 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
432 data_off
+= sizeof(short);
435 (void)printf("seg %d ", ack
& SGQ_MASK
);
437 dp
= &(nspp
[data_off
]);
443 (void)printf("link-service %d>%d ", src
, dst
);
445 struct seghdr
*shp
= (struct seghdr
*)nspp
;
447 (struct lsmsg
*)&(nspp
[sizeof(struct seghdr
)]);
451 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[0]);
452 if (ack
& SGQ_ACK
) { /* acknum field */
453 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
454 (void)printf("nak %d ", ack
& SGQ_MASK
);
456 (void)printf("ack %d ", ack
& SGQ_MASK
);
457 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[1]);
458 if (ack
& SGQ_OACK
) { /* ackdat field */
459 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
460 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
462 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
463 ack
= EXTRACT_LE_16BITS(shp
->sh_seq
[2]);
466 (void)printf("seg %d ", ack
& SGQ_MASK
);
467 lsflags
= EXTRACT_LE_8BITS(lsmp
->ls_lsflags
);
468 fcval
= EXTRACT_LE_8BITS(lsmp
->ls_fcval
);
469 switch (lsflags
& LSI_MASK
) {
471 (void)printf("dat seg count %d ", fcval
);
472 switch (lsflags
& LSM_MASK
) {
476 (void)printf("donotsend-data ");
479 (void)printf("send-data ");
482 (void)printf("reserved-fcmod? %x", lsflags
);
487 (void)printf("intr req count %d ", fcval
);
490 (void)printf("reserved-fcval-int? %x", lsflags
);
496 (void)printf("reserved-subtype? %x %d > %d", flags
, src
, dst
);
501 switch (flags
& NSP_SUBMASK
) {
503 (void)printf("data-ack %d>%d ", src
, dst
);
505 struct ackmsg
*amp
= (struct ackmsg
*)nspp
;
508 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[0]);
509 if (ack
& SGQ_ACK
) { /* acknum field */
510 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
511 (void)printf("nak %d ", ack
& SGQ_MASK
);
513 (void)printf("ack %d ", ack
& SGQ_MASK
);
514 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[1]);
515 if (ack
& SGQ_OACK
) { /* ackoth field */
516 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
517 (void)printf("onak %d ", ack
& SGQ_MASK
);
519 (void)printf("oack %d ", ack
& SGQ_MASK
);
525 (void)printf("ils-ack %d>%d ", src
, dst
);
527 struct ackmsg
*amp
= (struct ackmsg
*)nspp
;
530 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[0]);
531 if (ack
& SGQ_ACK
) { /* acknum field */
532 if ((ack
& SGQ_NAK
) == SGQ_NAK
)
533 (void)printf("nak %d ", ack
& SGQ_MASK
);
535 (void)printf("ack %d ", ack
& SGQ_MASK
);
536 ack
= EXTRACT_LE_16BITS(amp
->ak_acknum
[1]);
537 if (ack
& SGQ_OACK
) { /* ackdat field */
538 if ((ack
& SGQ_ONAK
) == SGQ_ONAK
)
539 (void)printf("nakdat %d ", ack
& SGQ_MASK
);
541 (void)printf("ackdat %d ", ack
& SGQ_MASK
);
547 (void)printf("conn-ack %d", dst
);
550 (void)printf("reserved-acktype? %x %d > %d", flags
, src
, dst
);
555 switch (flags
& NSP_SUBMASK
) {
558 if ((flags
& NSP_SUBMASK
) == MFS_CI
)
559 (void)printf("conn-initiate ");
561 (void)printf("retrans-conn-initiate ");
562 (void)printf("%d>%d ", src
, dst
);
564 struct cimsg
*cimp
= (struct cimsg
*)nspp
;
565 int services
, info
, segsize
;
570 services
= EXTRACT_LE_8BITS(cimp
->ci_services
);
571 info
= EXTRACT_LE_8BITS(cimp
->ci_info
);
572 segsize
= EXTRACT_LE_16BITS(cimp
->ci_segsize
);
574 switch (services
& COS_MASK
) {
578 (void)printf("seg ");
581 (void)printf("msg ");
584 (void)printf("crypt ");
587 switch (info
& COI_MASK
) {
589 (void)printf("ver 3.2 ");
592 (void)printf("ver 3.1 ");
595 (void)printf("ver 4.0 ");
598 (void)printf("ver 4.1 ");
601 (void)printf("segsize %d ", segsize
);
603 dp
= &(nspp
[sizeof(struct cimsg
)]);
604 pdata(dp
, nsplen
- sizeof(struct cimsg
));
609 (void)printf("conn-confirm %d>%d ", src
, dst
);
611 struct ccmsg
*ccmp
= (struct ccmsg
*)nspp
;
613 u_int segsize
, optlen
;
618 services
= EXTRACT_LE_8BITS(ccmp
->cc_services
);
619 info
= EXTRACT_LE_8BITS(ccmp
->cc_info
);
620 segsize
= EXTRACT_LE_16BITS(ccmp
->cc_segsize
);
621 optlen
= EXTRACT_LE_8BITS(ccmp
->cc_optlen
);
623 switch (services
& COS_MASK
) {
627 (void)printf("seg ");
630 (void)printf("msg ");
633 (void)printf("crypt ");
636 switch (info
& COI_MASK
) {
638 (void)printf("ver 3.2 ");
641 (void)printf("ver 3.1 ");
644 (void)printf("ver 4.0 ");
647 (void)printf("ver 4.1 ");
650 (void)printf("segsize %d ", segsize
);
652 (void)printf("optlen %d ", optlen
);
654 optlen
= min(optlen
, nsplen
- sizeof(struct ccmsg
));
655 dp
= &(nspp
[sizeof(struct ccmsg
)]);
662 (void)printf("disconn-initiate %d>%d ", src
, dst
);
664 struct dimsg
*dimp
= (struct dimsg
*)nspp
;
671 reason
= EXTRACT_LE_16BITS(dimp
->di_reason
);
672 optlen
= EXTRACT_LE_8BITS(dimp
->di_optlen
);
674 print_reason(reason
);
676 (void)printf("optlen %d ", optlen
);
678 optlen
= min(optlen
, nsplen
- sizeof(struct dimsg
));
679 dp
= &(nspp
[sizeof(struct dimsg
)]);
686 (void)printf("disconn-confirm %d>%d ", src
, dst
);
688 struct dcmsg
*dcmp
= (struct dcmsg
*)nspp
;
691 reason
= EXTRACT_LE_16BITS(dcmp
->dc_reason
);
693 print_reason(reason
);
697 (void)printf("reserved-ctltype? %x %d > %d", flags
, src
, dst
);
702 (void)printf("reserved-type? %x %d > %d", flags
, src
, dst
);
707 static struct tok reason2str
[] = {
708 { UC_OBJREJECT
, "object rejected connect" },
709 { UC_RESOURCES
, "insufficient resources" },
710 { UC_NOSUCHNODE
, "unrecognized node name" },
711 { DI_SHUT
, "node is shutting down" },
712 { UC_NOSUCHOBJ
, "unrecognized object" },
713 { UC_INVOBJFORMAT
, "invalid object name format" },
714 { UC_OBJTOOBUSY
, "object too busy" },
715 { DI_PROTOCOL
, "protocol error discovered" },
716 { DI_TPA
, "third party abort" },
717 { UC_USERABORT
, "user abort" },
718 { UC_INVNODEFORMAT
, "invalid node name format" },
719 { UC_LOCALSHUT
, "local node shutting down" },
720 { DI_LOCALRESRC
, "insufficient local resources" },
721 { DI_REMUSERRESRC
, "insufficient remote user resources" },
722 { UC_ACCESSREJECT
, "invalid access control information" },
723 { DI_BADACCNT
, "bad ACCOUNT information" },
724 { UC_NORESPONSE
, "no response from object" },
725 { UC_UNREACHABLE
, "node unreachable" },
726 { DC_NOLINK
, "no link terminate" },
727 { DC_COMPLETE
, "disconnect complete" },
728 { DI_BADIMAGE
, "bad image data in connect" },
729 { DI_SERVMISMATCH
, "cryptographic service mismatch" },
734 print_reason(register int reason
)
736 printf("%s ", tok2str(reason2str
, "reason-%d", reason
));
740 dnnum_string(u_short dnaddr
)
744 int area
= (u_short
)(dnaddr
& AREAMASK
) >> AREASHIFT
;
745 int node
= dnaddr
& NODEMASK
;
747 str
= (char *)malloc(siz
= sizeof("00.0000"));
749 error("dnnum_string: malloc");
750 snprintf(str
, siz
, "%d.%d", area
, node
);
755 dnname_string(u_short dnaddr
)
760 dna
.a_len
= sizeof(short);
761 memcpy((char *)dna
.a_addr
, (char *)&dnaddr
, sizeof(short));
762 return (savestr(dnet_htoa(&dna
)));
764 return(dnnum_string(dnaddr
)); /* punt */
770 pdata(u_char
*dp
, u_int maxlen
)
780 printf("\\%o", c
& 0xFF);